#include <Future.h>
Definition at line 34 of file Future.h.
Hypertable::Future::Future |
( |
size_t |
capacity = 0 | ) |
|
|
inline |
Future objects are used to access results from asynchronous scanners/mutators.
- Parameters
-
capacity | byte capacity of future queue. Results will be blocked from being enqueued if the amount of memory used by the existing enqueued results exceeds this amount. Defaults to zero, making the queue capacity unbounded. |
Definition at line 43 of file Future.h.
virtual Hypertable::Future::~Future |
( |
| ) |
|
|
inlinevirtual |
bool Hypertable::Future::_is_cancelled |
( |
| ) |
const |
|
inlineprivate |
bool Hypertable::Future::_is_done |
( |
| ) |
|
|
inlineprivate |
bool Hypertable::Future::_is_empty |
( |
| ) |
|
|
inlineprivate |
Cancels outstanding scanners/mutators.
Callers responsibility to make sure that this method gets called before async scanner/mutator destruction when the application abruptly stops processing async results before all operations are complete
Definition at line 166 of file Future.cc.
This call blocks till there is a result available unless async ops have completed.
- Parameters
-
result | will contain a reference to the result object |
- Returns
- true if asynchronous operations have completed
Definition at line 35 of file Future.cc.
bool Future::get |
( |
ResultPtr & |
result, |
|
|
uint32_t |
timeout_ms, |
|
|
bool & |
timed_out |
|
) |
| |
This call blocks for the lesser of timeout / time till there is a result available.
- Parameters
-
result | will contain a reference to the result object |
timeout_ms | max milliseconds to block for |
timed_out | set to true if the call times out |
- Returns
- false if asynchronous operations have completed
Definition at line 76 of file Future.cc.
bool Hypertable::Future::has_outstanding |
( |
| ) |
|
|
inline |
Checks whether there are any outstanding operations.
Definition at line 105 of file Future.h.
bool Hypertable::Future::has_remaining_capacity |
( |
| ) |
|
|
inlineprivate |
bool Hypertable::Future::is_cancelled |
( |
| ) |
|
|
inline |
Checks whether the Future object has been cancelled.
Definition at line 97 of file Future.h.
bool Hypertable::Future::is_empty |
( |
| ) |
|
|
inline |
Checks whether the Future result queue is empty.
Definition at line 89 of file Future.h.
bool Hypertable::Future::is_full |
( |
| ) |
|
|
inline |
Checks whether the Future result queue is full.
Definition at line 81 of file Future.h.
size_t Hypertable::Future::memory_used |
( |
| ) |
|
|
inlineprivate |
void Future::scan_error |
( |
TableScannerAsync * |
scanner, |
|
|
int |
error, |
|
|
const std::string & |
error_msg, |
|
|
bool |
eos |
|
) |
| |
|
privatevirtual |
Callback method for update errors.
- Parameters
-
mutator | Mutator pointer |
error | error code |
failures | vector of failed mutations |
Implements Hypertable::ResultCallback.
Definition at line 161 of file Future.cc.
bool Hypertable::Future::m_cancelled {} |
|
private |
size_t Hypertable::Future::m_capacity {} |
|
private |
size_t Hypertable::Future::m_memory_used {} |
|
private |
The documentation for this class was generated from the following files:
- /home/doug/src/hypertable/src/cc/Hypertable/Lib/Future.h
- /home/doug/src/hypertable/src/cc/Hypertable/Lib/Future.cc