0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Private Attributes | List of all members
Hypertable::IndexMutatorCallback Class Reference

ResultCallback for secondary indices; used by TableMutatorAsync. More...

#include <IndexMutatorCallback.h>

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

Public Types

typedef std::multimap< const
char *, Cell, ltStringPtr
KeyMap
 
typedef std::pair< String, int > FailedRow
 

Public Member Functions

 IndexMutatorCallback (TableMutatorAsync *primary_mutator, ResultCallback *original_cb, uint64_t max_memory)
 
virtual ~IndexMutatorCallback ()
 
void buffer_key (Key &key, const void *value, uint32_t value_len)
 buffers a cell in the cellbuffer and the keymap More...
 
virtual void scan_ok (TableScannerAsync *scanner, ScanCellsPtr &scancells)
 Callback method for successful scan. More...
 
virtual void scan_error (TableScannerAsync *scanner, int error, const std::string &error_msg, bool eos)
 Callback method for scan errors. More...
 
virtual void update_ok (TableMutatorAsync *mutator)
 Callback method for successful update. More...
 
virtual void update_error (TableMutatorAsync *mutator, int error, FailedMutations &failures)
 Callback method for update errors. More...
 
void propagate_failures ()
 
bool needs_flush ()
 
void consume_keybuffer (TableMutatorAsync *mutator)
 
void clear ()
 
- Public Member Functions inherited from Hypertable::ResultCallback
 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...
 
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...
 

Private Attributes

TableMutatorAsyncm_primary_mutator
 
ResultCallbackm_original_cb
 
CellsBuilder m_cellbuffer
 
KeyMap m_keymap
 
std::vector< FailedRowm_failed_rows
 
std::mutex m_mutex
 
uint64_t m_max_memory
 
uint64_t m_used_memory
 
int m_error
 

Additional Inherited Members

- Protected Attributes inherited from Hypertable::ResultCallback
int m_outstanding {}
 
std::mutex m_outstanding_mutex
 
std::condition_variable m_outstanding_cond
 

Detailed Description

ResultCallback for secondary indices; used by TableMutatorAsync.

Definition at line 46 of file IndexMutatorCallback.h.

Member Typedef Documentation

Definition at line 51 of file IndexMutatorCallback.h.

typedef std::multimap<const char *, Cell, ltStringPtr> Hypertable::IndexMutatorCallback::KeyMap

Definition at line 50 of file IndexMutatorCallback.h.

Constructor & Destructor Documentation

Hypertable::IndexMutatorCallback::IndexMutatorCallback ( TableMutatorAsync primary_mutator,
ResultCallback original_cb,
uint64_t  max_memory 
)
inline

Definition at line 53 of file IndexMutatorCallback.h.

virtual Hypertable::IndexMutatorCallback::~IndexMutatorCallback ( )
inlinevirtual

Definition at line 59 of file IndexMutatorCallback.h.

Member Function Documentation

void Hypertable::IndexMutatorCallback::buffer_key ( Key key,
const void *  value,
uint32_t  value_len 
)
inline

buffers a cell in the cellbuffer and the keymap

Definition at line 63 of file IndexMutatorCallback.h.

void Hypertable::IndexMutatorCallback::clear ( )
inline

Definition at line 185 of file IndexMutatorCallback.h.

void Hypertable::IndexMutatorCallback::consume_keybuffer ( TableMutatorAsync mutator)
inline

Definition at line 173 of file IndexMutatorCallback.h.

bool Hypertable::IndexMutatorCallback::needs_flush ( )
inline

Definition at line 168 of file IndexMutatorCallback.h.

void Hypertable::IndexMutatorCallback::propagate_failures ( )
inline

Definition at line 147 of file IndexMutatorCallback.h.

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

Callback method for scan errors.

Parameters
scannerPointer to scanner
errorError code
error_msgError message
eosend of scan indicator

Implements Hypertable::ResultCallback.

Definition at line 103 of file IndexMutatorCallback.h.

virtual void Hypertable::IndexMutatorCallback::scan_ok ( TableScannerAsync scanner,
ScanCellsPtr scancells 
)
inlinevirtual

Callback method for successful scan.

Parameters
scannerPointer to scanner
scancellsreturned cells

Implements Hypertable::ResultCallback.

Definition at line 90 of file IndexMutatorCallback.h.

virtual void Hypertable::IndexMutatorCallback::update_error ( TableMutatorAsync mutator,
int  error,
FailedMutations failures 
)
inlinevirtual

Callback method for update errors.

Parameters
mutatorMutator pointer
errorerror code
failuresvector of failed mutations

Implements Hypertable::ResultCallback.

Definition at line 115 of file IndexMutatorCallback.h.

virtual void Hypertable::IndexMutatorCallback::update_ok ( TableMutatorAsync mutator)
inlinevirtual

Callback method for successful update.

Parameters
mutator

Implements Hypertable::ResultCallback.

Definition at line 109 of file IndexMutatorCallback.h.

Member Data Documentation

CellsBuilder Hypertable::IndexMutatorCallback::m_cellbuffer
private

Definition at line 199 of file IndexMutatorCallback.h.

int Hypertable::IndexMutatorCallback::m_error
private

Definition at line 217 of file IndexMutatorCallback.h.

std::vector<FailedRow> Hypertable::IndexMutatorCallback::m_failed_rows
private

Definition at line 205 of file IndexMutatorCallback.h.

KeyMap Hypertable::IndexMutatorCallback::m_keymap
private

Definition at line 202 of file IndexMutatorCallback.h.

uint64_t Hypertable::IndexMutatorCallback::m_max_memory
private

Definition at line 211 of file IndexMutatorCallback.h.

std::mutex Hypertable::IndexMutatorCallback::m_mutex
private

Definition at line 208 of file IndexMutatorCallback.h.

ResultCallback* Hypertable::IndexMutatorCallback::m_original_cb
private

Definition at line 196 of file IndexMutatorCallback.h.

TableMutatorAsync* Hypertable::IndexMutatorCallback::m_primary_mutator
private

Definition at line 193 of file IndexMutatorCallback.h.

uint64_t Hypertable::IndexMutatorCallback::m_used_memory
private

Definition at line 214 of file IndexMutatorCallback.h.


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