TCachePagePool Class Reference

class TCachePagePool : public MPagePool

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 .

RFilePagePool RStorePagePool

Inherits from

Public Member Functions
IMPORT_C TPageAbandonFunction AcquireL ()
IMPORT_C TAny * AllocL ()
IMPORT_C TPageRef AssignL (const TAny *, TPageReclamation )
IMPORT_C TInt Flush ()
IMPORT_C void FlushL ()
IMPORT_C TAny * LockL ( TPageRef )
IMPORT_C void Purge ()
void Set ( CPageCache &)
IMPORT_C void Unlock (const TAny *, TPageChange )
IMPORT_C void UpdateL (const TAny *)
Protected Member Functions
TCachePagePool ()
TCachePagePool ( CPageCache &)
IMPORT_C void DoDeleteL ( TPageRef )
Private Member Functions
void DoAbandon ( MPagePool &)
TCachePage * DoAllocL ( CPageCache &)
TPageRef ExtendL (const TAny *, TPageReclamation )
void ReadL ( TPageRef , TAny *)
void WriteL ( TPageRef , const TAny *, TPageChange )
Inherited Functions
MPagePool::Delete(TPageRef)
MPagePool::DeleteL(TPageRef)
MPagePool::Pop()
MPagePool::PushL()
Private Attributes
CPageCache * iCache

Constructor & Destructor Documentation

TCachePagePool()

TCachePagePool ( ) [protected, inline]

TCachePagePool(CPageCache &)

TCachePagePool ( CPageCache & aCache ) [protected, inline]

Parameters

CPageCache & aCache

Member Functions Documentation

AcquireL()

IMPORT_C TPageAbandonFunction AcquireL ( ) [virtual]

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

AllocL()

IMPORT_C TAny * AllocL ( ) [virtual]

Allocates an unassigned page.

AssignL(const TAny *, TPageReclamation)

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

Assigns a reference to a new page and unlocks it.

Parameters

const TAny * aPage Page to assign
TPageReclamation aReclamation = EPageDeleteOnly Flag for page reclaimation settings

DoAbandon(MPagePool &)

void DoAbandon ( MPagePool & aPool ) [private, static]

Parameters

MPagePool & aPool

DoAllocL(CPageCache &)

TCachePage * DoAllocL ( CPageCache & aCache ) [private, static]

Parameters

CPageCache & aCache

DoDeleteL(TPageRef)

IMPORT_C void DoDeleteL ( TPageRef aRef ) [protected, virtual]

Parameters

TPageRef aRef

ExtendL(const TAny *, TPageReclamation)

TPageRef ExtendL ( const TAny * aPage,
TPageReclamation aReclamation
) [private, pure virtual]

Parameters

const TAny * aPage
TPageReclamation aReclamation

Flush()

IMPORT_C TInt Flush ( )

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.

FlushL()

IMPORT_C void FlushL ( )

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

LockL(TPageRef)

IMPORT_C TAny * LockL ( TPageRef aRef ) [virtual]

Locks a page and returns a pointer to it.

Parameters

TPageRef aRef Reference to page to lock

Purge()

IMPORT_C void Purge ( )

Purge all pages in this pool from the cache.

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

ReadL(TPageRef, TAny *)

void ReadL ( TPageRef aRef,
TAny * aPage
) [private, pure virtual]

Parameters

TPageRef aRef
TAny * aPage

Set(CPageCache &)

void Set ( CPageCache & aCache ) [inline]

Sets the page cache for the pool.

Parameters

CPageCache & aCache The page cache for the pool.

Unlock(const TAny *, TPageChange)

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

Unlocks a page.

Parameters

const TAny * aPage Page to unlock
TPageChange aChange = EPageNoChange How the page should be treated once it is unlocked

UpdateL(const TAny *)

IMPORT_C void UpdateL ( const TAny * aPage ) [virtual]

Updates a page.

Parameters

const TAny * aPage Page to update

WriteL(TPageRef, const TAny *, TPageChange)

void WriteL ( TPageRef aRef,
const TAny * aPage,
TPageChange aChange
) [private, pure virtual]

Parameters

TPageRef aRef
const TAny * aPage
TPageChange aChange

Member Data Documentation

CPageCache * iCache

CPageCache * iCache [private]