|
||
class MIncrementalCollector;
Interface for incrementally reclaiming or compacting space in a stream store. The interface allows these actions to be performed in small steps, so that applications can remain responsive while doing these potentially long-running tasks.
An instance of a class derived from this interface is returned by StreamStore::DoReclaimL() and DoCompactL(). Each step is
carried out in response to a call of MIncrementalCollector::DoNextL(TInt &,TInt &)
and the object is released on completion of the last step.
Notes:
One-step reclaim using CStreamStore::ReclaimL()
is actually implemented in terms of the incremental collector.
A CStreamStore
implementation will only need to implement a collector class if it supports reclamation or compaction.
Defined in MIncrementalCollector
:
Close()
Closes the collector after it is no longer required. The object should not be re...DoNextL(TInt &,TInt &)
Implementation of the public synchronous MIncrementalCollector::NextL(TInt &...DoNextL(TPckgBuf< TInt > &,TRequestStatus &,TPckgBuf< TInt > &)
Implementation of the public asynchronous MIncrementalCollector::NextL(TInt &...DoRelease()
Implementation of the public MIncrementalCollector::Release() function. This sig...DoResetL(TInt &)
Implementation of the public MIncrementalCollector::ResetL(TInt &) function....MIncrementalCollector()
Protected constructor. Protecting the constructor ensures that this abstract cla...NextL(TInt &,TInt &)
Does the next step in the reclaim synchronously.NextL(TPckgBuf< TInt > &,TRequestStatus &,TPckgBuf< TInt > &)
Does the next step in the reclaim asynchronously.Release()
Releases the collector after it is no longer required. The object should not be ...ResetL(TInt &)
Resets the collector. This leaves the collector in a state ready to start or res...protected: inline MIncrementalCollector();
Protected constructor. Protecting the constructor ensures that this abstract class cannot be instantiated.
MIncrementalCollector::MIncrementalCollector(const MIncrementalCollector &)
;
MIncrementalCollector& MIncrementalCollector::operator=(const MIncrementalCollector &)
;
Private copy constructor and copy assignment to prevent
inline void Close();
Closes the collector after it is no longer required. The object should not be referenced after calling this function. The
semantics for this function and MIncrementalCollector::Release()
are effectively the same.
inline void Release();
Releases the collector after it is no longer required. The object should not be referenced after calling this function. The
semantics for this function and MIncrementalCollector::Close()
are effectively the same.
MIncrementalCollector::DoRelease()
Implementation of the public MIncrementalCollector::Release() function. This sig...inline void ResetL(TInt &aCount);
Resets the collector. This leaves the collector in a state ready to start or restart reclaiming/compacting. On return aCount
contains a value that can be used to determine the progress of the operation the same value should be passed in to subsequent
calls to MIncrementalCollector::NextL(TInt &,TInt &)
until it reaches 0.
|
MIncrementalCollector::DoResetL(TInt &)
Implementation of the public MIncrementalCollector::ResetL(TInt &) function....inline void NextL(TInt &aStep, TInt &aTotal);
Does the next step in the reclaim synchronously.
aStep contains a progress value, which decreases every time the function is called. aTotal contains the running total of free-space that remains in the store.
|
MIncrementalCollector::DoNextL(TInt &,TInt &)
Implementation of the public synchronous MIncrementalCollector::NextL(TInt &...inline void NextL(TPckgBuf< TInt > &aStep, TRequestStatus &aStatus, TPckgBuf< TInt > &aTotal);
Does the next step in the reclaim asynchronously.
aStep contains a progress value, which decreases every time the function is called. aTotal contains the running total of free-space
that remains in the store. These parameters are asynchronous equivalents of the other MIncrementalCollector::NextL(TInt &,TInt &)
overload.
|
MIncrementalCollector::DoNextL(TInt &,TInt &)
Implementation of the public synchronous MIncrementalCollector::NextL(TInt &...private: IMPORT_C virtual void DoRelease();
Implementation of the public MIncrementalCollector::Release()
function. This signals that client has no further need of the object and all necessary clean-up should be done. e.g. if the
implementation object is allocated on the heap, it could be deleted.
private: virtual void DoResetL(TInt &aCount)=0;
Implementation of the public MIncrementalCollector::ResetL(TInt &)
function. This signals that the client wants to start or retsart the operation from the beginning. A new progress count should
be returned in aCount.
|
private: virtual void DoNextL(TInt &aStep, TInt &aTotal)=0;
Implementation of the public synchronous MIncrementalCollector::NextL(TInt &,TInt &)
function. The next step in the reclamation should be done, reporting progress in aStep and aTotal.
|
private: IMPORT_C virtual void DoNextL(TPckgBuf< TInt > &aStep, TRequestStatus &aStatus, TPckgBuf< TInt > &aTotal);
Implementation of the public asynchronous MIncrementalCollector::NextL(TInt &,TInt &)
function. The default implementation invokes the synchronous form of MIncrementalCollector::DoNextL(TInt &,TInt &)
and then reports the result by signalling the request status.
|