Namespaces | Classes | Typedefs | Enumerations | Functions

Hyperspace Namespace Reference

-*- c++ -*- Copyright (C) 2008 Doug Judd (Zvents, Inc.) More...

Namespaces

namespace  HsClientState
namespace  HsParser
namespace  StateDbKeys
namespace  Util

Classes

class  LockRequest
class  ReplicationInfo
class  BDbHandles
class  BDbTxn
class  BerkeleyDbFilesystem
class  ClientConnectionHandler
class  ClientHandleState
class  ClientKeepaliveHandler
class  DbtManaged
struct  DirEntry
 Listing information for each node within a directory. More...
struct  LtDirEntry
class  DirEntryAttr
 Listing information for each node within a directory. More...
struct  LtDirEntryAttr
class  Event
class  EventNamed
 EventNamed class. More...
class  EventLockAcquired
 EventLockAcquired class. More...
class  EventLockReleased
 EventLockReleased class. More...
class  EventLockGranted
 EventLockGranted class. More...
class  FileHandleCallback
class  HandleCallback
 A callback object derived from this class gets passed into each Open() call. More...
class  HsCommandInterpreter
class  HsHelpText
struct  LockSequencer
 Lock sequencer. More...
class  Master
class  Notification
struct  Attribute
 Structure to hold extended attribute and value. More...
class  Protocol
class  RequestHandlerAttrDel
class  RequestHandlerAttrExists
class  RequestHandlerAttrGet
class  RequestHandlerAttrIncr
class  RequestHandlerAttrList
class  RequestHandlerAttrSet
class  RequestHandlerClose
class  RequestHandlerDelete
class  RequestHandlerDestroySession
class  RequestHandlerDoMaintenance
class  RequestHandlerExists
class  RequestHandlerExpireSessions
class  RequestHandlerHandshake
class  RequestHandlerLock
class  RequestHandlerMkdir
class  RequestHandlerOpen
class  RequestHandlerReaddir
class  RequestHandlerReaddirAttr
class  RequestHandlerReadpathAttr
class  RequestHandlerRelease
class  RequestHandlerRenewSession
class  RequestHandlerStatus
class  ResponseCallbackAttrExists
class  ResponseCallbackAttrGet
class  ResponseCallbackAttrIncr
class  ResponseCallbackAttrList
class  ResponseCallbackExists
class  ResponseCallbackLock
class  ResponseCallbackOpen
class  ResponseCallbackReaddir
class  ResponseCallbackReaddirAttr
class  ResponseCallbackReadpathAttr
class  ServerConnectionHandler
class  ServerKeepaliveHandler
class  SessionCallback
 A callback object derived from this class gets passed into the constructor of Hyperspace. More...
class  Session
class  SessionData
struct  LtSessionData

Typedefs

typedef hash_map< uint64_t,
uint64_t > 
NotificationMap
typedef intrusive_ptr< BDbHandlesBDbHandlesPtr
typedef intrusive_ptr
< ClientConnectionHandler
ClientConnectionHandlerPtr
typedef boost::intrusive_ptr
< ClientHandleState
ClientHandleStatePtr
typedef intrusive_ptr
< ClientKeepaliveHandler
ClientKeepaliveHandlerPtr
typedef boost::intrusive_ptr
< Event
HyperspaceEventPtr
typedef intrusive_ptr
< HandleCallback
HandleCallbackPtr
typedef intrusive_ptr
< HsCommandInterpreter
HsCommandInterpreterPtr
typedef boost::intrusive_ptr
< Master
MasterPtr
typedef boost::shared_ptr
< ServerKeepaliveHandler
ServerKeepaliveHandlerPtr
typedef boost::intrusive_ptr
< Session
SessionPtr
typedef boost::intrusive_ptr
< SessionData
SessionDataPtr

Enumerations

enum  { SESSION_ID, HANDLE_ID, EVENT_ID }
enum  { EVENT_TYPE_NAMED = 1, EVENT_TYPE_LOCK_ACQUIRED, EVENT_TYPE_LOCK_RELEASED, EVENT_TYPE_LOCK_GRANTED }
enum  {
  EVENT_MASK_ATTR_SET = 0x0001, EVENT_MASK_ATTR_DEL = 0x0002, EVENT_MASK_CHILD_NODE_ADDED = 0x0004, EVENT_MASK_CHILD_NODE_REMOVED = 0x0008,
  EVENT_MASK_LOCK_ACQUIRED = 0x0010, EVENT_MASK_LOCK_RELEASED = 0x0020, EVENT_MASK_LOCK_GRANTED = 0x0040
}
 

The following event masks are ORed together and passed in as the event_mask argument to Open() to indicate which events should be reported to the application for the opened handle.

More...
enum  { LOCK_MODE_SHARED = 1, LOCK_MODE_EXCLUSIVE = 2 }
 

Lock mode.

More...
enum  { LOCK_STATUS_GRANTED = 1, LOCK_STATUS_BUSY = 2, LOCK_STATUS_PENDING = 3, LOCK_STATUS_CANCELLED = 4 }
 

Lock status.

More...
enum  {
  OPEN_FLAG_READ = 0x00001, OPEN_FLAG_WRITE = 0x00002, OPEN_FLAG_LOCK = 0x00004, OPEN_FLAG_CREATE = 0x00008,
  OPEN_FLAG_EXCL = 0x00010, OPEN_FLAG_TEMP = 0x00020, OPEN_FLAG_LOCK_SHARED = 0x00044, OPEN_FLAG_LOCK_EXCLUSIVE = 0x00084
}
 

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

More...

Functions

ostream & operator<< (ostream &out, const BDbTxn &txn)
size_t encoded_length_dir_entry (const DirEntry &dir_entry)
 Returns the number of bytes required to encode (serialize) the given directory entry.
void encode_dir_entry (uint8_t **buf_ptr, const DirEntry &dir_entry)
 Encodes (serializes) the given directory entry to a buffer.
DirEntrydecode_dir_entry (const uint8_t **buf_ptr, size_t *remaining_ptr, DirEntry &dir_entry)
 Decodes (unserializes) a directory entry from a buffer.
size_t encoded_length_dir_entry_attr (const DirEntryAttr &entry)
 Returns the number of bytes required to encode (serialize) the given directory entry.
void encode_dir_entry_attr (uint8_t **buf_ptr, const DirEntryAttr &entry)
 Encodes (serializes) the given directory entry to a buffer.
DirEntryAttrdecode_dir_entry_attr (const uint8_t **buf_ptr, size_t *remaining_ptr, DirEntryAttr &entry)
 Decodes (unserializes) a directory entry from a buffer.
const char * EventMaskToString (uint32_t mask)
const char * event_mask_to_string (uint32_t mask)
void close_handle (SessionPtr hyperspace, uint64_t handle)
void close_handle_ptr (SessionPtr hyperspace, uint64_t *handlep)

Detailed Description

-*- c++ -*- Copyright (C) 2008 Doug Judd (Zvents, Inc.)

-*- c++ -*- Copyright (C) 2007 Doug Judd (Zvents, Inc.)

-*- c++ -*- Copyright (C) 2009 Sanjit Jhala (Zvents, Inc.)

-*- c++ -*- Copyright (C) 2009 Doug Judd (Zvents, Inc.)

-*- c++ -*- Copyright (C) 2010 Sanjit Jhala (Hypertable, Inc.)

Copyright (C) 2009 Mateusz Berezecki.

Copyright (C) 2009 Sanjit Jhala (Zvents, Inc.)

Copyright (C) 2008 Doug Judd (Zvents, Inc.)

Copyright (C) 2009 Doug Judd (Zvents, Inc.)

-*- c++ -*- Copyright (C) 2008 Sanjit Jhala (Zvents, Inc.)

Copyright (C) 2007 Sanjit Jhala (Zvents, Inc.)

Copyright (C) 2010 Sanjit Jhala (Hypertable, Inc.)

Copyright (C) 2007 Doug Judd (Zvents, Inc.)

This file is part of Hypertable.

Hypertable is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.

Hypertable is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

This file is part of Hypertable.

Hypertable is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

Hypertable is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

This file is part of Hypertable.

Hypertable is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License, or any later version.

Hypertable is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


Typedef Documentation

typedef intrusive_ptr<BDbHandles> Hyperspace::BDbHandlesPtr

Definition at line 121 of file BerkeleyDbFilesystem.h.

Definition at line 99 of file ClientConnectionHandler.h.

typedef boost::intrusive_ptr<ClientHandleState> Hyperspace::ClientHandleStatePtr

Definition at line 51 of file ClientHandleState.h.

Definition at line 107 of file ClientKeepaliveHandler.h.

Definition at line 115 of file HandleCallback.h.

Definition at line 47 of file HsCommandInterpreter.h.

typedef boost::intrusive_ptr<Event> Hyperspace::HyperspaceEventPtr

Definition at line 149 of file Event.h.

typedef boost::intrusive_ptr<Master> Hyperspace::MasterPtr

Definition at line 240 of file Master.h.

typedef hash_map<uint64_t, uint64_t> Hyperspace::NotificationMap

Definition at line 54 of file BerkeleyDbFilesystem.h.

Definition at line 52 of file ServerKeepaliveHandler.h.

typedef boost::intrusive_ptr<SessionData> Hyperspace::SessionDataPtr

Definition at line 157 of file SessionData.h.

typedef boost::intrusive_ptr<Session> Hyperspace::SessionPtr

Definition at line 542 of file Session.h.


Enumeration Type Documentation

anonymous enum

Lock status.

Used to report the result of a lock attempt

Enumerator:
LOCK_STATUS_GRANTED 

Lock successfully granted.

LOCK_STATUS_BUSY 

Exclusive lock attempt failed because another has it locked.

LOCK_STATUS_PENDING 

Lock attempt pending (internal use only)

LOCK_STATUS_CANCELLED 

Lock attempt was cancelled.

Definition at line 58 of file LockSequencer.h.

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 59 of file Session.h.

anonymous enum
Enumerator:
SESSION_ID 
HANDLE_ID 
EVENT_ID 

Definition at line 63 of file BerkeleyDbFilesystem.h.

anonymous enum
Enumerator:
EVENT_TYPE_NAMED 
EVENT_TYPE_LOCK_ACQUIRED 
EVENT_TYPE_LOCK_RELEASED 
EVENT_TYPE_LOCK_GRANTED 

Definition at line 91 of file Event.h.

anonymous enum

The following event masks are ORed together and passed in as the event_mask argument to Open() to indicate which events should be reported to the application for the opened handle.

Enumerator:
EVENT_MASK_ATTR_SET 
EVENT_MASK_ATTR_DEL 
EVENT_MASK_CHILD_NODE_ADDED 
EVENT_MASK_CHILD_NODE_REMOVED 
EVENT_MASK_LOCK_ACQUIRED 
EVENT_MASK_LOCK_RELEASED 
EVENT_MASK_LOCK_GRANTED 

Definition at line 38 of file HandleCallback.h.

anonymous enum

Lock mode.

Used to specify the type of lock to acquire.

Enumerator:
LOCK_MODE_SHARED 

Lock in shared mode.

LOCK_MODE_EXCLUSIVE 

Lock exclusive mode.

Definition at line 48 of file LockSequencer.h.


Function Documentation

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

Definition at line 1057 of file Session.cc.

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

Definition at line 1062 of file Session.cc.

DirEntry & Hyperspace::decode_dir_entry ( const uint8_t **  buf_ptr,
size_t *  remaining_ptr,
DirEntry dir_entry 
)

Decodes (unserializes) a directory entry from a buffer.

Parameters:
buf_ptraddress of pointer to buffer containing encoded directory entry (advanced after decode)
remaining_ptraddress of count variable holding the number of bytes remaining in buffer (decremented after decode)
dir_entrythe directory entry to encode

Definition at line 43 of file DirEntry.cc.

DirEntryAttr & Hyperspace::decode_dir_entry_attr ( const uint8_t **  buf_ptr,
size_t *  remaining_ptr,
DirEntryAttr entry 
)

Decodes (unserializes) a directory entry from a buffer.

Parameters:
buf_ptraddress of pointer to buffer containing encoded directory entry (advanced after decode)
remaining_ptraddress of count variable holding the number of bytes remaining in buffer (decremented after decode)
entrythe directory entry to encode

Definition at line 53 of file DirEntryAttr.cc.

void Hyperspace::encode_dir_entry ( uint8_t **  buf_ptr,
const DirEntry dir_entry 
)

Encodes (serializes) the given directory entry to a buffer.

Parameters:
buf_ptraddress of pointer to buffer to receive encoded directory entry (pointer is advanced passed the encoded entry)
dir_entrythe directory entry to encode

Definition at line 37 of file DirEntry.cc.

void Hyperspace::encode_dir_entry_attr ( uint8_t **  buf_ptr,
const DirEntryAttr entry 
)

Encodes (serializes) the given directory entry to a buffer.

Parameters:
buf_ptraddress of pointer to buffer to receive encoded directory entry (pointer is advanced passed the encoded entry)
entrythe directory entry to encode

Definition at line 42 of file DirEntryAttr.cc.

size_t Hyperspace::encoded_length_dir_entry ( const DirEntry dir_entry )

Returns the number of bytes required to encode (serialize) the given directory entry.

Parameters:
dir_entrythe directory entry
Returns:
the exact number of bytes required to encode dir_entry

Definition at line 33 of file DirEntry.cc.

size_t Hyperspace::encoded_length_dir_entry_attr ( const DirEntryAttr entry )

Returns the number of bytes required to encode (serialize) the given directory entry.

Parameters:
entrythe directory entry
Returns:
the exact number of bytes required to encode entry

Definition at line 35 of file DirEntryAttr.cc.

const char* Hyperspace::event_mask_to_string ( uint32_t  mask )
const char* Hyperspace::EventMaskToString ( uint32_t  mask )

Definition at line 27 of file HandleCallback.cc.

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

Definition at line 3897 of file BerkeleyDbFilesystem.cc.