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 ()
void Close ()
IMPORT_C void CompactL ( CStreamStore &, TInt &)
IMPORT_C void CompactLC ( CStreamStore &, TInt &)
IMPORT_C void Next ( TPckgBuf < TInt > &, TRequestStatus &)
IMPORT_C TInt Next ( TInt &)
IMPORT_C void NextL ( TInt &)
IMPORT_C void NextL ( TPckgBuf < TInt > &, TRequestStatus &)
IMPORT_C void OpenL ( CStreamStore &, TInt &)
IMPORT_C void OpenLC ( CStreamStore &, TInt &)
IMPORT_C void Release ()
IMPORT_C void ResetL ( 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()

void Close ( ) [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 void CompactL ( CStreamStore & aStore,
TInt & aCount
)

Parameters

CStreamStore & aStore
TInt & aCount

CompactLC(CStreamStore &, TInt &)

IMPORT_C void CompactLC ( CStreamStore & aStore,
TInt & aCount
)

Parameters

CStreamStore & aStore
TInt & aCount

Next(TPckgBuf< TInt > &, TRequestStatus &)

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

Parameters

TPckgBuf < TInt > & aStep
TRequestStatus & aStatus

Next(TInt &)

IMPORT_C TInt Next ( TInt & aStep )

Parameters

TInt & aStep

NextL(TInt &)

IMPORT_C void NextL ( TInt & aStep )

Parameters

TInt & aStep

NextL(TPckgBuf< TInt > &, TRequestStatus &)

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

Parameters

TPckgBuf < TInt > & aStep
TRequestStatus & aStatus

OpenL(CStreamStore &, TInt &)

IMPORT_C void OpenL ( CStreamStore & aStore,
TInt & aCount
)

Parameters

CStreamStore & aStore
TInt & aCount

OpenLC(CStreamStore &, TInt &)

IMPORT_C void OpenLC ( CStreamStore & aStore,
TInt & aCount
)

Parameters

CStreamStore & aStore
TInt & aCount

Release()

IMPORT_C void Release ( )

ResetL(TInt &)

IMPORT_C void ResetL ( TInt & aCount )

Parameters

TInt & aCount

Member Data Documentation

TPckgBuf< TInt > iAvail

TPckgBuf < TInt > iAvail [private]

MIncrementalCollector * iCol

MIncrementalCollector * iCol [private]