MPagePool Class Reference

#include <s32page.h>

class MPagePool
Public Member Functions
pure virtual TPageAbandonFunction AcquireL()
pure virtual TAny *AllocL()
pure virtual TPageRef AssignL(const TAny *, TPageReclamation)
IMPORT_C voidDelete(TPageRef)
IMPORT_C voidDeleteL(TPageRef)
pure virtual TAny *LockL(TPageRef)
voidPop()
IMPORT_C voidPushL()
pure virtual voidUnlock(const TAny *, TPageChange)
pure virtual voidUpdateL(const TAny *)
Protected Member Functions
pure virtual voidDoDeleteL(TPageRef)

Detailed Description

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.

Member Function Documentation

AcquireL ( )

TPageAbandonFunction AcquireL()[pure virtual]

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

TAny *AllocL()[pure virtual]

AssignL ( const TAny *, TPageReclamation )

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

Delete ( TPageRef )

IMPORT_C voidDelete(TPageRefaRef)

Deletes a page, ignoring any errors.

Parameters
aRefReference to the page to delete

DeleteL ( TPageRef )

IMPORT_C voidDeleteL(TPageRefaRef)

Deletes a page, leaving if an error occurs.

Parameters
aRefReference to the page to delete

DoDeleteL ( TPageRef )

voidDoDeleteL(TPageRefaRef)[protected, pure virtual]

LockL ( TPageRef )

TAny *LockL(TPageRefaRef)[pure virtual]

Locks a page and returns a pointer to it.

Parameters
aRefReference to the page to lock
Return Value
Locked page

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
aPagePage to unlock
aChangeHow 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
aPagePage to update