Location:
s32stor.h
Link against: estor.lib
RStorePagePool
Supported from 5.0
Uses a store to implement the page pool interface MPagePool.
Pages can be reclaimable (tracked by the page pool, so that they can be freed when required) or not (in which case they must be deleted explicitly): this is indicated by a flag of type TPageReclamation. Non-reclaimable pages each have their own
stream in the store; reclaimable pages are bundled 15 to a stream. To track the
reclaimable pages, the page pool has a separate token, type TStorePagePoolToken, that must be saved
by the user of the pool.
The store used must support CStreamStore::ExtendL(), CStreamStore::DeleteL() and
allow streams to be re-written. CPermanentFileStore meets these conditions.
A store page pool uses a cache to store pages in-memory and to cache frequently accessed pages. You should provide a cache object (CPageCache) to the pool for this purpose.
|
Defined in RStorePagePool:
Close(), Create(), Discard(), HasAvailable(), IsDirty(), IsEmpty(), MarkCurrent(), MarkDirty(), Open(), RStorePagePool(), ReclaimAllL(), ReclaimL(), Release(), Token()
Inherited from MPagePool:
Delete(),
DeleteL(),
Pop(),
PushL()
Inherited from TCachePagePool:
AcquireL(),
AllocL(),
AssignL(),
Flush(),
FlushL(),
LockL(),
Purge(),
Set(),
Unlock(),
UpdateL()
RStorePagePool(CPageCache& aCache);
Constructor with a page cache for the pool.
|
RStorePagePool(CStreamStore& aStore);
Constructor with a stream store to use for the pool.
|
RStorePagePool(CStreamStore& aStore,const TStorePagePoolToken& aToken);
Constructor with a stream store and settings to use for the pool.
|
void Create(CStreamStore& aStore);
Creates a new pool.
|
void Open(CStreamStore& aStore,const TStorePagePoolToken& aToken);
Opens an existing pool.
|
TBool ReclaimL();
Deletes the first stream that stores reclaimable pages in the store.
|
void Discard();
Invalidates the list of free pages in the reclaimable set.
This should be done if there has been a failure in updating the BTree, as
this list is possibly corrupt now. The reclaimable set can be deleted using
ReclaimAllL(), and the BTree then repaired.
TBool HasAvailable() const;
Tests if there is a free page in the pool.
|
TBool IsDirty() const;
Tests if the dirty flag has been set on the page pool.
|
TBool IsEmpty() const;
Tests if the page pool is empty.
|
TStorePagePoolToken Token() const;
Gets an object that encapsulates the page pool settings.
That object can then be used to externalise the settings.
|