0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Attributes | List of all members
Hypertable::ResultCallback Class Referenceabstract

Represents an open table. More...

#include <ResultCallback.h>

Inheritance diagram for Hypertable::ResultCallback:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::ResultCallback:
Collaboration graph
[legend]

Public Member Functions

 ResultCallback ()
 
virtual ~ResultCallback ()
 
virtual void register_scanner (TableScannerAsync *scanner)
 Hook for derived classes which want to keep track of scanners/mutators. More...
 
virtual void deregister_scanner (TableScannerAsync *scanner)
 Hook for derived classes which want to keep track of scanners/mutators. More...
 
virtual void register_mutator (TableMutatorAsync *mutator)
 Hook for derived classes which want to keep track of scanners/mutators. More...
 
virtual void deregister_mutator (TableMutatorAsync *mutator)
 Hook for derived classes which want to keep track of scanners/mutators. More...
 
virtual void completed ()
 Callback method for completion, default one does nothing. More...
 
virtual void scan_ok (TableScannerAsync *scanner, ScanCellsPtr &cells)=0
 Callback method for successful scan. More...
 
virtual void scan_error (TableScannerAsync *scanner, int error, const std::string &error_msg, bool eos)=0
 Callback method for scan errors. More...
 
virtual void update_ok (TableMutatorAsync *mutator)=0
 Callback method for successful update. More...
 
virtual void update_error (TableMutatorAsync *mutator, int error, FailedMutations &failures)=0
 Callback method for update errors. More...
 
void wait_for_completion ()
 Blocks till outstanding == 0. More...
 
void increment_outstanding ()
 
void decrement_outstanding ()
 
bool is_done ()
 
- Public Member Functions inherited from Hypertable::ClientObject
virtual ~ClientObject ()
 Destructor. More...
 

Protected Attributes

int m_outstanding {}
 
std::mutex m_outstanding_mutex
 
std::condition_variable m_outstanding_cond
 

Detailed Description

Represents an open table.

Definition at line 43 of file ResultCallback.h.

Constructor & Destructor Documentation

Hypertable::ResultCallback::ResultCallback ( )
inline

Definition at line 47 of file ResultCallback.h.

virtual Hypertable::ResultCallback::~ResultCallback ( )
inlinevirtual

Definition at line 49 of file ResultCallback.h.

Member Function Documentation

virtual void Hypertable::ResultCallback::completed ( )
inlinevirtual

Callback method for completion, default one does nothing.

Definition at line 77 of file ResultCallback.h.

void Hypertable::ResultCallback::decrement_outstanding ( )
inline

Definition at line 133 of file ResultCallback.h.

virtual void Hypertable::ResultCallback::deregister_mutator ( TableMutatorAsync mutator)
inlinevirtual

Hook for derived classes which want to keep track of scanners/mutators.

Reimplemented in Hypertable::Future.

Definition at line 71 of file ResultCallback.h.

virtual void Hypertable::ResultCallback::deregister_scanner ( TableScannerAsync scanner)
inlinevirtual

Hook for derived classes which want to keep track of scanners/mutators.

Reimplemented in Hypertable::Future.

Definition at line 61 of file ResultCallback.h.

void Hypertable::ResultCallback::increment_outstanding ( )
inline

Definition at line 125 of file ResultCallback.h.

bool Hypertable::ResultCallback::is_done ( )
inline

Definition at line 146 of file ResultCallback.h.

virtual void Hypertable::ResultCallback::register_mutator ( TableMutatorAsync mutator)
inlinevirtual

Hook for derived classes which want to keep track of scanners/mutators.

Reimplemented in Hypertable::Future.

Definition at line 66 of file ResultCallback.h.

virtual void Hypertable::ResultCallback::register_scanner ( TableScannerAsync scanner)
inlinevirtual

Hook for derived classes which want to keep track of scanners/mutators.

Reimplemented in Hypertable::IndexScannerCallback, and Hypertable::Future.

Definition at line 56 of file ResultCallback.h.

virtual void Hypertable::ResultCallback::scan_error ( TableScannerAsync scanner,
int  error,
const std::string &  error_msg,
bool  eos 
)
pure virtual

Callback method for scan errors.

Parameters
scanner
error
error_msg
eosend of scan

Implemented in Hypertable::IndexScannerCallback, Hypertable::Future, Hypertable::IndexMutatorCallback, Hypertable::TableCallback, and Hypertable::IndexUpdaterCallback.

virtual void Hypertable::ResultCallback::scan_ok ( TableScannerAsync scanner,
ScanCellsPtr cells 
)
pure virtual

Callback method for successful scan.

Parameters
scanner
cellsreturned cells

Implemented in Hypertable::IndexScannerCallback, Hypertable::Future, Hypertable::IndexMutatorCallback, Hypertable::IndexUpdaterCallback, and Hypertable::TableCallback.

virtual void Hypertable::ResultCallback::update_error ( TableMutatorAsync mutator,
int  error,
FailedMutations failures 
)
pure virtual

Callback method for update errors.

Parameters
mutatorMutator pointer
errorerror code
failuresvector of failed mutations

Implemented in Hypertable::IndexScannerCallback, Hypertable::Future, Hypertable::IndexMutatorCallback, Hypertable::TableCallback, and Hypertable::IndexUpdaterCallback.

virtual void Hypertable::ResultCallback::update_ok ( TableMutatorAsync mutator)
pure virtual
void Hypertable::ResultCallback::wait_for_completion ( )
inline

Blocks till outstanding == 0.

Definition at line 117 of file ResultCallback.h.

Member Data Documentation

int Hypertable::ResultCallback::m_outstanding {}
protected

Definition at line 152 of file ResultCallback.h.

std::condition_variable Hypertable::ResultCallback::m_outstanding_cond
protected

Definition at line 154 of file ResultCallback.h.

std::mutex Hypertable::ResultCallback::m_outstanding_mutex
protected

Definition at line 153 of file ResultCallback.h.


The documentation for this class was generated from the following file: