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 voidDelete(TPageRef)
IMPORT_C voidDeleteL(TPageRef)
TAny *LockL(TPageRef)
voidPop()
IMPORT_C voidPushL()
voidUnlock(const TAny *, TPageChange)
voidUpdateL(const TAny *)
Protected Member Functions
voidDoDeleteL(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,
TPageReclamationaReclamation = EPageDeleteOnly
)[pure virtual]

Parameters

const TAny * aPage
TPageReclamation aReclamation = EPageDeleteOnly

Delete(TPageRef)

IMPORT_C voidDelete(TPageRefaRef)

Deletes a page, ignoring any errors.

Parameters

TPageRef aRefReference to the page to delete

DeleteL(TPageRef)

IMPORT_C voidDeleteL(TPageRefaRef)

Deletes a page, leaving if an error occurs.

Parameters

TPageRef aRefReference to the page to delete

DoDeleteL(TPageRef)

voidDoDeleteL(TPageRefaRef)[protected, pure virtual]

Parameters

TPageRef aRef

LockL(TPageRef)

TAny *LockL(TPageRefaRef)[pure virtual]

Locks a page and returns a pointer to it.

Parameters

TPageRef aRefReference to the page to lock

Pop()

voidPop()[inline]

Do a pop from the cleanup stack.

PushL()

IMPORT_C voidPushL()

Pushes this object onto the cleanup stack.

Unlock(const TAny *, TPageChange)

voidUnlock(const TAny *aPage,
TPageChangeaChange = EPageNoChange
)[pure 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 *)

voidUpdateL(const TAny *aPage)[pure virtual]

Updates a page.

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

Parameters

const TAny * aPagePage to update