RStoreReclaim Class Reference

class RStoreReclaim

Performs space reclamation or compaction on a permanent file store in incremental steps.

Reclaiming unused space makes it available for re-use by the store. Compacting makes unused space available for re-use by the relevant system pool for example, the filing system in the case of file-based stores.

Once compaction is complete, the store must be committed.

Notes:

Space reclamation and compaction are only supported by the file store CPermanentFileStore and are not supported by embedded or direct file stores.

Use active objects when implementing space reclamation or compaction asynchronously.

This class performs incremental compaction/reclamation. These operations can be performed in a possibly long running single step using CStreamStore functions.

Public Member Functions
RStoreReclaim()
TInt Available()
voidClose()
IMPORT_C voidCompactL(CStreamStore &, TInt &)
IMPORT_C voidCompactLC(CStreamStore &, TInt &)
IMPORT_C voidNext(TPckgBuf< TInt > &, TRequestStatus &)
IMPORT_C TIntNext(TInt &)
IMPORT_C voidNextL(TInt &)
IMPORT_C voidNextL(TPckgBuf< TInt > &, TRequestStatus &)
IMPORT_C voidOpenL(CStreamStore &, TInt &)
IMPORT_C voidOpenLC(CStreamStore &, TInt &)
IMPORT_C voidRelease()
IMPORT_C voidResetL(TInt &)
Private Attributes
TPckgBuf< TInt >iAvail
MIncrementalCollector *iCol

Constructor & Destructor Documentation

RStoreReclaim()

RStoreReclaim()[inline]

Member Functions Documentation

Available()

TInt Available()const [inline]

Returns the amount of free space currently available within the store. The function may be called at any time during space reclamation or compaction.

Close()

voidClose()[inline]

Stops space reclamation or compaction. All allocated resources are freed.

Notes:

If a cleanup item was placed on the cleanup stack when the RStoreReclaim object was prepared for space reclamation or compaction (i.e. by a call to OpenLC() or CompactLC()), then this function need not be called explicitly; clean up is implicitly done by CleanupStack::PopAndDestroy().

The ResetL() member function can be used to restart abandoned space reclamation or compaction activity.

CompactL(CStreamStore &, TInt &)

IMPORT_C voidCompactL(CStreamStore &aStore,
TInt &aCount
)

Parameters

CStreamStore & aStore
TInt & aCount

CompactLC(CStreamStore &, TInt &)

IMPORT_C voidCompactLC(CStreamStore &aStore,
TInt &aCount
)

Parameters

CStreamStore & aStore
TInt & aCount

Next(TPckgBuf< TInt > &, TRequestStatus &)

IMPORT_C voidNext(TPckgBuf< TInt > &aStep,
TRequestStatus &aStatus
)

Parameters

TPckgBuf< TInt > & aStep
TRequestStatus & aStatus

Next(TInt &)

IMPORT_C TIntNext(TInt &aStep)

Parameters

TInt & aStep

NextL(TInt &)

IMPORT_C voidNextL(TInt &aStep)

Parameters

TInt & aStep

NextL(TPckgBuf< TInt > &, TRequestStatus &)

IMPORT_C voidNextL(TPckgBuf< TInt > &aStep,
TRequestStatus &aStatus
)

Parameters

TPckgBuf< TInt > & aStep
TRequestStatus & aStatus

OpenL(CStreamStore &, TInt &)

IMPORT_C voidOpenL(CStreamStore &aStore,
TInt &aCount
)

Parameters

CStreamStore & aStore
TInt & aCount

OpenLC(CStreamStore &, TInt &)

IMPORT_C voidOpenLC(CStreamStore &aStore,
TInt &aCount
)

Parameters

CStreamStore & aStore
TInt & aCount

Release()

IMPORT_C voidRelease()

ResetL(TInt &)

IMPORT_C voidResetL(TInt &aCount)

Parameters

TInt & aCount

Member Data Documentation

TPckgBuf< TInt > iAvail

TPckgBuf< TInt >iAvail[private]

MIncrementalCollector * iCol

MIncrementalCollector *iCol[private]