Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <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:

Inherited from MPagePool:


Construction and destruction


TCachePagePool()

protected: inline TCachePagePool();

Description


TCachePagePool(CPageCache &)

protected: inline TCachePagePool(CPageCache &aCache);

Description

Parameters

CPageCache &aCache

[Top]


Member functions


Set(CPageCache &)

inline void Set(CPageCache &aCache);

Description

Sets the page cache for the pool.

Parameters

CPageCache &aCache

The page cache for the pool.


AcquireL()

IMPORT_C virtual 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()

IMPORT_C virtual TAny* AllocL();

Description

Allocates an unassigned page.

Return value

TAny *

Newly allocated page.


LockL(TPageRef)

IMPORT_C virtual 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(const TAny *,TPageReclamation)

IMPORT_C virtual 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(const TAny *)

IMPORT_C virtual void UpdateL(const TAny *aPage);

Description

Updates a page.

Parameters

const TAny *aPage

Page to update


Unlock(const TAny *,TPageChange)

IMPORT_C virtual 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(TPageRef)

protected: IMPORT_C virtual void DoDeleteL(TPageRef aRef);

Description

Parameters

TPageRef aRef


ExtendL(const TAny *,TPageReclamation)

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

Description

Parameters

const TAny *aPage

TPageReclamation aReclamation

Return value

TPageRef


WriteL(TPageRef,const TAny *,TPageChange)

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

Description

Parameters

TPageRef aRef

const TAny *aPage

TPageChange aChange


ReadL(TPageRef,TAny *)

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

Description

Parameters

TPageRef aRef

TAny *aPage