0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Modules | Classes | Typedefs | Enumerations | Functions
Hyperspace

Hyperspace. More...

Collaboration diagram for Hyperspace:

Modules

 request
 Server request handlers.
 
 response
 Server response callbacks.
 

Classes

class  Hyperspace::LockRequest
 Encapsulates a lock request for a file node. More...
 
class  Hyperspace::ReplicationInfo
 Encapsulates replication state. More...
 
class  Hyperspace::BDbHandles
 Manages namespace and transient state database handles. More...
 
class  Hyperspace::BDbTxn
 Manages transaction state. More...
 
class  Hyperspace::BerkeleyDbFilesystem
 Hyperspace filesystem implementation on top of BerkeleyDB. More...
 
class  Hyperspace::MetricsHandler
 Collects and publishes Hyperspace metrics. More...
 
struct  Hyperspace::Attribute
 Holds extended attribute and value. More...
 
class  Hyperspace::Protocol
 Protocol driver for encoding request messages. More...
 
class  Hyperspace::SessionCallback
 A callback object derived from this class gets passed into the constructor of Hyperspace. More...
 
class  Hyperspace::Session
 Hyperspace session. More...
 

Typedefs

typedef std::unordered_map
< uint64_t, uint64_t > 
Hyperspace::NotificationMap
 Hash map from Node handle ID to Session ID. More...
 
typedef std::shared_ptr
< BDbHandles
Hyperspace::BDbHandlesPtr
 Smart pointer to BDbHandles. More...
 
typedef std::shared_ptr
< MetricsHandler
Hyperspace::MetricsHandlerPtr
 Smart pointer to MetricsHandler. More...
 
typedef std::shared_ptr< SessionHyperspace::SessionPtr
 

Enumerations

enum  Hyperspace::IdentifierType { Hyperspace::SESSION = 0, Hyperspace::HANDLE, Hyperspace::EVENT }
 Enumeration for object identifier types. More...
 
enum  {
  Hyperspace::OPEN_FLAG_READ = 0x00001, Hyperspace::OPEN_FLAG_WRITE = 0x00002, Hyperspace::OPEN_FLAG_LOCK = 0x00004, Hyperspace::OPEN_FLAG_CREATE = 0x00008,
  Hyperspace::OPEN_FLAG_EXCL = 0x00010, Hyperspace::OPEN_FLAG_TEMP = 0x00020, Hyperspace::OPEN_FLAG_LOCK_SHARED = 0x00044, Hyperspace::OPEN_FLAG_LOCK_EXCLUSIVE = 0x00084
}
 The following flags (bit masks) are ORed together and passed in as the flags argument to Open(). More...
 
enum  Hyperspace::Session::State { Hyperspace::Session::STATE_EXPIRED, Hyperspace::Session::STATE_JEOPARDY, Hyperspace::Session::STATE_SAFE, Hyperspace::Session::STATE_DISCONNECTED }
 Session state values More...
 
enum  Hyperspace::Session::Locate { Hyperspace::Session::LOCATE_MASTER =1, Hyperspace::Session::LOCATE_REPLICAS }
 

Functions

std::ostream & Hyperspace::operator<< (std::ostream &out, const BDbTxn &txn)
 Writes human-readable version of txn to an ostream. More...
 
void Hyperspace::close_handle (SessionPtr hyperspace, uint64_t handle)
 
void Hyperspace::close_handle_ptr (SessionPtr hyperspace, uint64_t *handlep)
 

Detailed Description

Hyperspace.

The Hyperspace module contains an implementation of a highly available lock service modelled after the Chubby system.

Typedef Documentation

typedef std::shared_ptr<BDbHandles> Hyperspace::BDbHandlesPtr

Smart pointer to BDbHandles.

Definition at line 179 of file BerkeleyDbFilesystem.h.

Smart pointer to MetricsHandler.

Definition at line 111 of file MetricsHandler.h.

typedef std::unordered_map<uint64_t, uint64_t> Hyperspace::NotificationMap

Hash map from Node handle ID to Session ID.

Definition at line 64 of file BerkeleyDbFilesystem.h.

typedef std::shared_ptr<Session> Hyperspace::SessionPtr

Definition at line 734 of file Session.h.

Enumeration Type Documentation

anonymous enum

The following flags (bit masks) are ORed together and passed in as the flags argument to Open().

Enumerator
OPEN_FLAG_READ 

Open file for reading.

OPEN_FLAG_WRITE 

Open file for writing.

OPEN_FLAG_LOCK 

Open file for locking.

OPEN_FLAG_CREATE 

Create file if it does not exist.

OPEN_FLAG_EXCL 

Error if create and file exists.

OPEN_FLAG_TEMP 

Used in conjunction with CREATE to create an ephemeral file.

OPEN_FLAG_LOCK_SHARED 

Atomically open and lock file shared, fail if can't.

OPEN_FLAG_LOCK_EXCLUSIVE 

atomically open and lock file exclusive, fail if can't

Definition at line 69 of file Session.h.

Enumeration for object identifier types.

Enumerator
SESSION 

Session identifier.

HANDLE 

Handle identifier.

EVENT 

Event identifier.

Definition at line 81 of file BerkeleyDbFilesystem.h.

Enumerator
LOCATE_MASTER 
LOCATE_REPLICAS 

Definition at line 166 of file Session.h.

Session state values

Enumerator
STATE_EXPIRED 

session has expired

STATE_JEOPARDY 

session is in jeopardy

STATE_SAFE 

session is OK

STATE_DISCONNECTED 

attempting to reconnect session

Definition at line 155 of file Session.h.

Function Documentation

void Hyperspace::close_handle ( SessionPtr  hyperspace,
uint64_t  handle 
)

Definition at line 1395 of file Session.cc.

void Hyperspace::close_handle_ptr ( SessionPtr  hyperspace,
uint64_t *  handlep 
)

Definition at line 1400 of file Session.cc.

std::ostream & Hyperspace::operator<< ( std::ostream &  out,
const BDbTxn txn 
)

Writes human-readable version of txn to an ostream.

Parameters
outOutput stream on which to write
txnTransaction object to display
Returns
out

Definition at line 4009 of file BerkeleyDbFilesystem.cc.