MPagePool Class Reference

class MPagePool

Interface to a page pool, the storage abstraction used by the B-trees API.

The interface is abstract and handles pages as TAny pointers. It is left to derived classes to implement page storage in a particular storage medium, such as memory or disk.

Public Member Functions
TPageAbandonFunction AcquireL ()
TAny * AllocL ()
TPageRef AssignL (const TAny *, TPageReclamation )
IMPORT_C void Delete ( TPageRef )
IMPORT_C void DeleteL ( TPageRef )
TAny * LockL ( TPageRef )
void Pop ()
IMPORT_C void PushL ()
void Unlock (const TAny *, TPageChange )
void UpdateL (const TAny *)
Protected Member Functions
void DoDeleteL ( TPageRef )

Member Functions Documentation

AcquireL()

TPageAbandonFunction AcquireL ( ) [pure virtual]

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

AllocL()

TAny * AllocL ( ) [pure virtual]

AssignL(const TAny *, TPageReclamation)

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

Parameters

const TAny * aPage
TPageReclamation aReclamation = EPageDeleteOnly

Delete(TPageRef)

IMPORT_C void Delete ( TPageRef aRef )

Deletes a page, ignoring any errors.

Parameters

TPageRef aRef Reference to the page to delete

DeleteL(TPageRef)

IMPORT_C void DeleteL ( TPageRef aRef )

Deletes a page, leaving if an error occurs.

Parameters

TPageRef aRef Reference to the page to delete

DoDeleteL(TPageRef)

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

Parameters

TPageRef aRef

LockL(TPageRef)

TAny * LockL ( TPageRef aRef ) [pure virtual]

Locks a page and returns a pointer to it.

Parameters

TPageRef aRef Reference to the page to lock

Pop()

void Pop ( ) [inline]

Do a pop from the cleanup stack.

PushL()

IMPORT_C void PushL ( )

Pushes this object onto the cleanup stack.

Unlock(const TAny *, TPageChange)

void Unlock ( const TAny * aPage,
TPageChange aChange = EPageNoChange
) [pure 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 *)

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

Updates a page.

This can be used for cached pages that may have become outdated.

Parameters

const TAny * aPage Page to update