RStorePagePool Class Reference
class RStorePagePool : public TCachePagePool
|
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.
CPageCache
CPermanentFileStore
CStreamStore
TPageReclamation
Constructor & Destructor Documentation
RStorePagePool()
IMPORT_C
|
RStorePagePool
|
(
|
)
|
|
RStorePagePool(CPageCache &)
RStorePagePool(CStreamStore &)
RStorePagePool(CStreamStore &, const TStorePagePoolToken &)
Member Functions Documentation
CacheDeleteL(TPageRef)
void
|
CacheDeleteL
|
(
|
TPageRef
|
aRef
|
)
|
[private, inline]
|
Discard()
void
|
Discard
|
(
|
)
|
[inline]
|
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.
DoDeleteL(TPageRef)
IMPORT_C void
|
DoDeleteL
|
(
|
TPageRef
|
aRef
|
)
|
[protected, virtual]
|
ExtendL(const TAny *, TPageReclamation)
IMPORT_C
TPageRef
|
ExtendL
|
(
|
const
TAny
*
|
aPage,
|
|
TPageReclamation
|
aReclamation
|
|
)
|
[protected, virtual]
|
Parameters
const
TAny
* aPage
|
|
TPageReclamation
aReclamation
|
|
HasAvailable()
TBool
|
HasAvailable
|
(
|
)
|
const [inline]
|
Tests if there is a free page in the pool.
IsDirty()
TBool
|
IsDirty
|
(
|
)
|
const [inline]
|
Tests if the dirty flag has been set on the page pool.
IsEmpty()
TBool
|
IsEmpty
|
(
|
)
|
const [inline]
|
Tests if the page pool is empty.
MarkCurrent()
void
|
MarkCurrent
|
(
|
)
|
[inline]
|
MarkDirty()
void
|
MarkDirty
|
(
|
)
|
[inline]
|
Sets the dirty flag on the pool.
Open(CStreamStore &, const TStorePagePoolToken &)
ReadL(TPageRef, TAny *)
IMPORT_C void
|
ReadL
|
(
|
TPageRef
|
aRef,
|
|
TAny
*
|
aPage
|
|
)
|
[protected, virtual]
|
ReclaimAllL()
IMPORT_C void
|
ReclaimAllL
|
(
|
)
|
|
ReclaimL()
IMPORT_C
TBool
|
ReclaimL
|
(
|
)
|
|
Release()
void
|
Release
|
(
|
)
|
[inline]
|
Purges the page cache and stops using the stream store.
WriteL(TPageRef, const TAny *, TPageChange)
IMPORT_C void
|
WriteL
|
(
|
TPageRef
|
aRef,
|
|
const
TAny
*
|
aPage,
|
|
TPageChange
|
aChange
|
|
)
|
[protected, virtual]
|
Member Data Documentation
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.