Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: S32PAGE.H
Link against: estor.lib

Class TCachePagePool

class TCachePagePool : public MPagePool;

Description

Provides a page pool with cached pages.

It is an intermediary class, used in the definition of page pools that use a cache, such as RFilePagePool and RStorePagePool.

Derivation

Members

Defined in TCachePagePool:
AcquireL(), AllocL(), AssignL(), DoDeleteL(), ExtendL(), Flush(), FlushL(), LockL(), Purge(), ReadL(), Set(), TCachePagePool(), TCachePagePool(), Unlock(), UpdateL(), WriteL()

Inherited from MPagePool:
Delete(), DeleteL(), Pop(), PushL()

See also:


Construction and destruction


TCachePagePool()

protected: inline TCachePagePool();

Description


TCachePagePool()

protected: inline TCachePagePool(CPageCache &aCache);

Description

Parameters

CPageCache &aCache

[Top]


Member functions


Set()

inline void Set(CPageCache &aCache);

Description

Sets the page cache for the pool.

Parameters

CPageCache &aCache

The page cache for the pool.


AcquireL()

virtual IMPORT_C TPageAbandonFunction AcquireL();

Description

Returns a function that abandons all locked pages for this page pool.

Return value

TPageAbandonFunction

A function that abandons all locked pages for this page pool.


AllocL()

virtual IMPORT_C TAny *AllocL();

Description

Allocates an unassigned page.

Return value

TAny *

Newly allocated page.


LockL()

virtual IMPORT_C TAny *LockL(TPageRef aRef);

Description

Locks a page and returns a pointer to it.

Parameters

TPageRef aRef

Reference to page to lock

Return value

TAny *

Locked page


AssignL()

virtual IMPORT_C TPageRef AssignL(const TAny *aPage, TPageReclamation aReclamation=EPageDeleteOnly);

Description

Assigns a reference to a new page and unlocks it.

Parameters

const TAny *aPage

Page to assign

TPageReclamation aReclamation

Flag for page reclaimation settings

Return value

TPageRef

Reference to page


UpdateL()

virtual IMPORT_C void UpdateL(const TAny *aPage);

Description

Updates a page.

Parameters

const TAny *aPage

Page to update


Unlock()

virtual IMPORT_C void Unlock(const TAny *aPage, TPageChange aChange=EPageNoChange);

Description

Unlocks a page.

Parameters

const TAny *aPage

Page to unlock

TPageChange aChange

How the page should be treated once it is unlocked


Flush()

IMPORT_C TInt Flush();

Description

Flush all pages in this pool from the cache.

It ensures that any dirty pages are written into persistent storage, but does not remove them from the cache.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


FlushL()

IMPORT_C void FlushL();

Description

Flushes all pages in this pool from the cache, leaving with a system-wide error code if an error occurs.


Purge()

IMPORT_C void Purge();

Description

Purge all pages in this pool from the cache.

This discards all pages from the cache, without saving dirty pages.


DoDeleteL()

protected: virtual IMPORT_C void DoDeleteL(TPageRef aRef);

Description

Parameters

TPageRef aRef


ExtendL()

private: virtual TPageRef ExtendL(const TAny *aPage, TPageReclamation aReclamation)=0;

Description

Parameters

const TAny *aPage

TPageReclamation aReclamation

Return value

TPageRef


WriteL()

private: virtual void WriteL(TPageRef aRef, const TAny *aPage, TPageChange aChange)=0;

Description

Parameters

TPageRef aRef

const TAny *aPage

TPageChange aChange


ReadL()

private: virtual void ReadL(TPageRef aRef, TAny *aPage)=0;

Description

Parameters

TPageRef aRef

TAny *aPage