0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Namespaces | Macros | Typedefs | Enumerations
Event.h File Reference
#include <Common/Compat.h>
#include "HandleCallback.h"
#include "BerkeleyDbFilesystem.h"
#include <AsyncComm/CommBuf.h>
#include <Common/Random.h>
#include <Common/Serialization.h>
#include <Common/System.h>
#include <condition_variable>
#include <chrono>
#include <iostream>
#include <memory>
#include <mutex>
#include <string>
#include <thread>
Include dependency graph for Event.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Hyperspace::Event
 
class  Hyperspace::EventNamed
 
class  Hyperspace::EventLockAcquired
 
class  Hyperspace::EventLockReleased
 
class  Hyperspace::EventLockGranted
 

Namespaces

 Hyperspace
 Hyperspace definitions
 

Macros

#define HT_BDBTXN_EVT_BEGIN(parent_txn)
 
#define HT_BDBTXN_EVT_END_CB(_cb_)
 
#define HT_BDBTXN_EVT_END(...)
 

Typedefs

typedef std::shared_ptr< EventHyperspace::HyperspaceEventPtr
 

Enumerations

enum  { Hyperspace::EVENT_TYPE_NAMED = 1, Hyperspace::EVENT_TYPE_LOCK_ACQUIRED, Hyperspace::EVENT_TYPE_LOCK_RELEASED, Hyperspace::EVENT_TYPE_LOCK_GRANTED }
 

Macro Definition Documentation

#define HT_BDBTXN_EVT_BEGIN (   parent_txn)
Value:
do { \
BDbTxn txn; \
ms_bdb_fs->start_transaction(txn); \
try

Definition at line 44 of file Event.h.

#define HT_BDBTXN_EVT_END (   ...)
Value:
catch (Exception &e) { \
HT_WARNF("%s - %s", Error::get_text(e.code()), e.what()); \
txn.abort(); \
return __VA_ARGS__; \
} \
HT_WARN_OUT << "Berkeley DB deadlock encountered in txn "<< txn << HT_END; \
txn.abort(); \
std::this_thread::sleep_for(Random::duration_millis(3000)); \
continue; \
} \
break; \
} while (true)
#define HT_WARNF(msg,...)
Definition: Logger.h:290
const char * get_text(int error)
Returns a descriptive error message.
Definition: Error.cc:330
#define HT_END
Definition: Logger.h:220
#define HT_ERROR_OUT
Definition: Logger.h:301
#define HT_WARN_OUT
Definition: Logger.h:291
This is a generic exception class for Hypertable.
Definition: Error.h:314
int code() const
Returns the error code.
Definition: Error.h:391

Definition at line 69 of file Event.h.

#define HT_BDBTXN_EVT_END_CB (   _cb_)
Value:
catch (Exception &e) { \
HT_WARNF("%s - %s", Error::get_text(e.code()), e.what()); \
txn.abort(); \
_cb_->error(e.code(), e.what()); \
return; \
} \
HT_WARN_OUT << "Berkeley DB deadlock encountered in txn "<< txn << HT_END; \
txn.abort(); \
std::this_thread::sleep_for(Random::duration_millis(3000)); \
continue; \
} \
break; \
} while (true)
#define HT_WARNF(msg,...)
Definition: Logger.h:290
const char * get_text(int error)
Returns a descriptive error message.
Definition: Error.cc:330
#define HT_END
Definition: Logger.h:220
#define HT_ERROR_OUT
Definition: Logger.h:301
#define HT_WARN_OUT
Definition: Logger.h:291
This is a generic exception class for Hypertable.
Definition: Error.h:314
int code() const
Returns the error code.
Definition: Error.h:391

Definition at line 50 of file Event.h.