TCachePagePool Class Reference

#include <s32page.h>

class TCachePagePool : public MPagePool

Inherits from

Public Member Functions
virtual IMPORT_C TPageAbandonFunctionAcquireL()
virtual IMPORT_C TAny *AllocL()
virtual IMPORT_C TPageRefAssignL(const TAny *, TPageReclamation)
IMPORT_C TIntFlush()
IMPORT_C voidFlushL()
virtual IMPORT_C TAny *LockL(TPageRef)
IMPORT_C voidPurge()
voidSet(CPageCache &)
virtual IMPORT_C voidUnlock(const TAny *, TPageChange)
virtual IMPORT_C voidUpdateL(const TAny *)
Protected Member Functions
TCachePagePool()
TCachePagePool(CPageCache &)
virtual IMPORT_C voidDoDeleteL(TPageRef)
Inherited Functions
MPagePool::Delete(TPageRef)
MPagePool::DeleteL(TPageRef)
MPagePool::Pop()
MPagePool::PushL()

Detailed 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.

See also: RFilePagePool RStorePagePool

Constructor & Destructor Documentation

TCachePagePool ( )

TCachePagePool()[protected, inline]

TCachePagePool ( CPageCache & )

TCachePagePool(CPageCache &aCache)[protected, inline]

Member Function Documentation

AcquireL ( )

IMPORT_C TPageAbandonFunctionAcquireL()[virtual]

Reimplemented from MPagePool::AcquireL()

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

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

AllocL ( )

IMPORT_C TAny *AllocL()[virtual]

Reimplemented from MPagePool::AllocL()

Allocates an unassigned page.

Return Value
Newly allocated 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
aPagePage to assign
aReclamationFlag for page reclaimation settings
Return Value
Reference to page

DoDeleteL ( TPageRef )

IMPORT_C voidDoDeleteL(TPageRefaRef)[protected, virtual]

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.

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

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]

Reimplemented from MPagePool::LockL(TPageRef)

Locks a page and returns a pointer to it.

Parameters
aRefReference to page to lock
Return Value
Locked page

Purge ( )

IMPORT_C voidPurge()

Purge all pages in this pool from the cache.

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

Set ( CPageCache & )

voidSet(CPageCache &aCache)[inline]

Sets the page cache for the pool.

Parameters
aCacheThe page cache for the pool.

Unlock ( const TAny *, TPageChange )

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

Unlocks a page.

Parameters
aPagePage to unlock
aChangeHow the page should be treated once it is unlocked

UpdateL ( const TAny * )

IMPORT_C voidUpdateL(const TAny *aPage)[virtual]

Updates a page.

Parameters
aPagePage to update