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

Tracks outstanding RangeServer update requests. More...

#include <TableMutatorCompletionCounter.h>

Public Member Functions

 TableMutatorCompletionCounter ()
 
void set (size_t count)
 
void decrement ()
 
bool wait_for_completion (Timer &timer)
 
bool wait_for_completion ()
 
void set_retries ()
 
void set_errors ()
 
bool has_retries ()
 
bool has_errors ()
 
void clear_errors ()
 
bool is_complete ()
 

Private Attributes

std::mutex m_mutex
 
std::condition_variable m_cond
 
size_t m_outstanding {}
 
bool m_retries {}
 
bool m_errors {}
 
bool m_done {}
 

Detailed Description

Tracks outstanding RangeServer update requests.

This class is used to track the state of outstanding RangeServer update requests for a scatter send. It is initialized with the number of updates issued. When each update returns or times out the counter is decremented and when all updates have completed or timed out, an object of this class will signal completion.

Definition at line 40 of file TableMutatorCompletionCounter.h.

Constructor & Destructor Documentation

Hypertable::TableMutatorCompletionCounter::TableMutatorCompletionCounter ( )
inline

Definition at line 42 of file TableMutatorCompletionCounter.h.

Member Function Documentation

void Hypertable::TableMutatorCompletionCounter::clear_errors ( )
inline

Definition at line 91 of file TableMutatorCompletionCounter.h.

void Hypertable::TableMutatorCompletionCounter::decrement ( )
inline

Definition at line 51 of file TableMutatorCompletionCounter.h.

bool Hypertable::TableMutatorCompletionCounter::has_errors ( )
inline

Definition at line 89 of file TableMutatorCompletionCounter.h.

bool Hypertable::TableMutatorCompletionCounter::has_retries ( )
inline

Definition at line 87 of file TableMutatorCompletionCounter.h.

bool Hypertable::TableMutatorCompletionCounter::is_complete ( )
inline

Definition at line 93 of file TableMutatorCompletionCounter.h.

void Hypertable::TableMutatorCompletionCounter::set ( size_t  count)
inline

Definition at line 44 of file TableMutatorCompletionCounter.h.

void Hypertable::TableMutatorCompletionCounter::set_errors ( )
inline

Definition at line 85 of file TableMutatorCompletionCounter.h.

void Hypertable::TableMutatorCompletionCounter::set_retries ( )
inline

Definition at line 83 of file TableMutatorCompletionCounter.h.

bool Hypertable::TableMutatorCompletionCounter::wait_for_completion ( Timer timer)
inline

Definition at line 62 of file TableMutatorCompletionCounter.h.

bool Hypertable::TableMutatorCompletionCounter::wait_for_completion ( )
inline

Definition at line 77 of file TableMutatorCompletionCounter.h.

Member Data Documentation

std::condition_variable Hypertable::TableMutatorCompletionCounter::m_cond
private

Definition at line 97 of file TableMutatorCompletionCounter.h.

bool Hypertable::TableMutatorCompletionCounter::m_done {}
private

Definition at line 101 of file TableMutatorCompletionCounter.h.

bool Hypertable::TableMutatorCompletionCounter::m_errors {}
private

Definition at line 100 of file TableMutatorCompletionCounter.h.

std::mutex Hypertable::TableMutatorCompletionCounter::m_mutex
private

Definition at line 96 of file TableMutatorCompletionCounter.h.

size_t Hypertable::TableMutatorCompletionCounter::m_outstanding {}
private

Definition at line 98 of file TableMutatorCompletionCounter.h.

bool Hypertable::TableMutatorCompletionCounter::m_retries {}
private

Definition at line 99 of file TableMutatorCompletionCounter.h.


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