28 #ifndef Hypertable_Master_RangeServerHyperspaceCallback_h
29 #define Hypertable_Master_RangeServerHyperspaceCallback_h
41 #include <condition_variable>
86 HT_INFOF(
"%s hyperspace lock file released",
m_rsc->location().c_str());
88 std::lock_guard<std::mutex> lock(
m_mutex);
93 if (
m_rsc->connected()) {
94 uint32_t millis =
m_context->props->get_i32(
"Hypertable.Failover.GracePeriod");
95 m_context->recovery_barrier_op->advance_into_future(millis);
98 m_context->op->add_operation(operation);
114 std::lock_guard<std::mutex> lock(
m_mutex);
115 HT_INFOF(
"%s hyperspace lock file acquired",
m_rsc->location().c_str());
128 std::unique_lock<std::mutex> lock(
m_mutex);
153 #endif // Hypertable_Master_RangeServerHyperspaceCallback_h
RangeServerConnectionPtr m_rsc
Range server connection
std::shared_ptr< RangeServerConnection > RangeServerConnectionPtr
std::string String
A String is simply a typedef to std::string.
Declarations for OperationProcessor.
bool m_lock_held
Flag indicating if lock is currently held.
virtual void lock_released()
Responds to lock release event.
virtual void lock_acquired(uint32_t mode)
Responds to lock acquired event.
bool wait_for_lock_acquisition(std::chrono::milliseconds max_wait)
Waits for m_lock_held to become true.
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
Callback class for range server lock files.
ContextPtr m_context
Master context
const char * get_text(int error)
Returns a descriptive error message.
std::mutex m_mutex
Mutex for serializing concurrent access
Declarations for OperationRegisterServerBlocker.
#define HT_INFOF(msg,...)
This is a generic exception class for Hypertable.
RangeServerHyperspaceCallback(ContextPtr &context, RangeServerConnectionPtr &rsc)
Constructor.
std::condition_variable m_cond
Condition variable used to wait for completion.
std::shared_ptr< Operation > OperationPtr
Smart pointer to Operation.
Declarations for Context.
int code() const
Returns the error code.