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 TPageAbandonFunctionAcquireL()
IMPORT_C TAny *AllocL()
IMPORT_C TPageRefAssignL(const TAny *, TPageReclamation)
IMPORT_C TIntFlush()
IMPORT_C voidFlushL()
IMPORT_C TAny *LockL(TPageRef)
IMPORT_C voidPurge()
voidSet(CPageCache &)
IMPORT_C voidUnlock(const TAny *, TPageChange)
IMPORT_C voidUpdateL(const TAny *)
Protected Member Functions
TCachePagePool()
TCachePagePool(CPageCache &)
IMPORT_C voidDoDeleteL(TPageRef)
Private Member Functions
voidDoAbandon(MPagePool &)
TCachePage *DoAllocL(CPageCache &)
TPageRef ExtendL(const TAny *, TPageReclamation)
voidReadL(TPageRef, TAny *)
voidWriteL(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 TPageAbandonFunctionAcquireL()[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 TPageRefAssignL(const TAny *aPage,
TPageReclamationaReclamation = EPageDeleteOnly
)[virtual]

Assigns a reference to a new page and unlocks it.

Parameters

const TAny * aPagePage to assign
TPageReclamation aReclamation = EPageDeleteOnlyFlag for page reclaimation settings

DoAbandon(MPagePool &)

voidDoAbandon(MPagePool &aPool)[private, static]

Parameters

MPagePool & aPool

DoAllocL(CPageCache &)

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

Parameters

CPageCache & aCache

DoDeleteL(TPageRef)

IMPORT_C voidDoDeleteL(TPageRefaRef)[protected, virtual]

Parameters

TPageRef aRef

ExtendL(const TAny *, TPageReclamation)

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

Parameters

const TAny * aPage
TPageReclamation aReclamation

Flush()

IMPORT_C TIntFlush()

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 voidFlushL()

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(TPageRefaRef)[virtual]

Locks a page and returns a pointer to it.

Parameters

TPageRef aRefReference to page to lock

Purge()

IMPORT_C voidPurge()

Purge all pages in this pool from the cache.

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

ReadL(TPageRef, TAny *)

voidReadL(TPageRefaRef,
TAny *aPage
)[private, pure virtual]

Parameters

TPageRef aRef
TAny * aPage

Set(CPageCache &)

voidSet(CPageCache &aCache)[inline]

Sets the page cache for the pool.

Parameters

CPageCache & aCacheThe page cache for the pool.

Unlock(const TAny *, TPageChange)

IMPORT_C voidUnlock(const TAny *aPage,
TPageChangeaChange = EPageNoChange
)[virtual]

Unlocks a page.

Parameters

const TAny * aPagePage to unlock
TPageChange aChange = EPageNoChangeHow the page should be treated once it is unlocked

UpdateL(const TAny *)

IMPORT_C voidUpdateL(const TAny *aPage)[virtual]

Updates a page.

Parameters

const TAny * aPagePage to update

WriteL(TPageRef, const TAny *, TPageChange)

voidWriteL(TPageRefaRef,
const TAny *aPage,
TPageChangeaChange
)[private, pure virtual]

Parameters

TPageRef aRef
const TAny * aPage
TPageChange aChange

Member Data Documentation

CPageCache * iCache

CPageCache *iCache[private]