NCBI C++ ToolKit
Public Member Functions | List of all members
IMergeVolumeWalker Struct Referenceabstract

Search Toolkit Book for IMergeVolumeWalker

Interface to traverse volume for merge. More...

#include <algo/volume_merge/volume_merge.hpp>

+ Inheritance diagram for IMergeVolumeWalker:

Public Member Functions

virtual ~IMergeVolumeWalker ()
 
virtual IAsyncInterfaceQueryIAsync ()=0
 Get pointer to async. More...
 
virtual bool IsEof () const =0
 Return TRUE when volume traverse reaches the end. More...
 
virtual bool IsGood () const =0
 Return TRUE if volume is in good condition (not failed) More...
 
virtual void FetchFirst ()=0
 Request to start fetching data This request can be asyncronous caller needs to check status using IAsyncInterface to make sure Fetch finished. More...
 
virtual void Fetch ()=0
 Request to get next record This request can be asyncronous caller needs to check status using IAsyncInterface to make sure Fetch finished. More...
 
virtual const unsigned char * GetKeyPtr () const =0
 Get low level access to the current key buffer. More...
 
virtual Uint4 GetUint4Key () const =0
 Get access to the key as unsigned integer (if this type is supported) More...
 
virtual const unsigned char * GetBufferPtr (size_t *buf_size) const =0
 Get low level access to the merge BLOB buffer and buffer size (next Fetch call invalidates this pointer) More...
 
virtual void Close ()=0
 Close volume (when it ends) Method is responsible for finalization of merge procedure (it could be deletion of records, compaction of data files, etc), stopping background threads, closing server connections. More...
 
virtual void SetRecordMoved ()=0
 Signals that current record moved to merged storage (volume manager may decide to delete it later) Volume manager should NOT fetch next record on this call. More...
 

Detailed Description

Interface to traverse volume for merge.

Volume provides access to key->BLOB pairs, and guarantees that keys are coming in an ascending sorted order. Volume can support async. execution using threads or remote system to facilitate parallel execution

Definition at line 181 of file volume_merge.hpp.

Constructor & Destructor Documentation

◆ ~IMergeVolumeWalker()

virtual IMergeVolumeWalker::~IMergeVolumeWalker ( )
inlinevirtual

Definition at line 183 of file volume_merge.hpp.

Member Function Documentation

◆ Close()

virtual void IMergeVolumeWalker::Close ( )
pure virtual

Close volume (when it ends) Method is responsible for finalization of merge procedure (it could be deletion of records, compaction of data files, etc), stopping background threads, closing server connections.

Implemented in CBDB_MergeBlobWalkerAsync< BF >, and CBDB_MergeBlobWalker< BF >.

◆ Fetch()

virtual void IMergeVolumeWalker::Fetch ( )
pure virtual

Request to get next record This request can be asyncronous caller needs to check status using IAsyncInterface to make sure Fetch finished.

Implemented in CBDB_MergeBlobWalkerAsync< BF >, and CBDB_MergeBlobWalker< BF >.

Referenced by CMergeVolumes::x_MergeVolume().

◆ FetchFirst()

virtual void IMergeVolumeWalker::FetchFirst ( )
pure virtual

Request to start fetching data This request can be asyncronous caller needs to check status using IAsyncInterface to make sure Fetch finished.

Implemented in CBDB_MergeBlobWalkerAsync< BF >, and CBDB_MergeBlobWalker< BF >.

◆ GetBufferPtr()

virtual const unsigned char* IMergeVolumeWalker::GetBufferPtr ( size_t *  buf_size) const
pure virtual

Get low level access to the merge BLOB buffer and buffer size (next Fetch call invalidates this pointer)

Implemented in CBDB_MergeBlobWalkerAsync< BF >, and CBDB_MergeBlobWalker< BF >.

Referenced by CMergeVolumes::x_MergeVolume().

◆ GetKeyPtr()

virtual const unsigned char* IMergeVolumeWalker::GetKeyPtr ( ) const
pure virtual

Get low level access to the current key buffer.

Implemented in CBDB_MergeBlobWalkerAsync< BF >, and CBDB_MergeBlobWalker< BF >.

◆ GetUint4Key()

virtual Uint4 IMergeVolumeWalker::GetUint4Key ( ) const
pure virtual

Get access to the key as unsigned integer (if this type is supported)

Implemented in CBDB_MergeBlobWalkerAsync< BF >, and CBDB_MergeBlobWalker< BF >.

Referenced by CMergeVolumes::Run().

◆ IsEof()

virtual bool IMergeVolumeWalker::IsEof ( ) const
pure virtual

Return TRUE when volume traverse reaches the end.

Implemented in CBDB_MergeBlobWalkerAsync< BF >, and CBDB_MergeBlobWalker< BF >.

Referenced by CMergeVolumes::Run().

◆ IsGood()

virtual bool IMergeVolumeWalker::IsGood ( ) const
pure virtual

Return TRUE if volume is in good condition (not failed)

Implemented in CBDB_MergeBlobWalkerAsync< BF >, and CBDB_MergeBlobWalker< BF >.

Referenced by CMergeVolumes::Run().

◆ QueryIAsync()

virtual IAsyncInterface* IMergeVolumeWalker::QueryIAsync ( )
pure virtual

Get pointer to async.

suport. Returns NULL if this interface is fully syncronous.

Implemented in CBDB_MergeBlobWalkerAsync< BF >, and CBDB_MergeBlobWalker< BF >.

Referenced by CMergeVolumes::Run().

◆ SetRecordMoved()

virtual void IMergeVolumeWalker::SetRecordMoved ( )
pure virtual

Signals that current record moved to merged storage (volume manager may decide to delete it later) Volume manager should NOT fetch next record on this call.

Implemented in CBDB_MergeBlobWalkerAsync< BF >, and CBDB_MergeBlobWalker< BF >.

Referenced by CMergeVolumes::x_MergeVolume().


The documentation for this struct was generated from the following file:
Modified on Sun May 19 04:42:01 2024 by modify_doxy.py rev. 669887