0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Hyperspace::BerkeleyDbFilesystem Class Reference

Hyperspace filesystem implementation on top of BerkeleyDB. More...

#include <BerkeleyDbFilesystem.h>

Collaboration diagram for Hyperspace::BerkeleyDbFilesystem:
Collaboration graph
[legend]

Public Member Functions

 BerkeleyDbFilesystem (PropertiesPtr &props, const String &basedir, const std::vector< Thread::id > &thread_ids, bool force_recover=false)
 Constructor. More...
 
 ~BerkeleyDbFilesystem ()
 Destructor. More...
 
void do_checkpoint ()
 Checkpoints the BerkeleyDB database. More...
 
bool is_master ()
 Check if we're the current master. More...
 
String get_current_master ()
 Returns hostname of currently elected master. More...
 
void start_transaction (BDbTxn &txn)
 Creates a new BerkeleyDB transaction. More...
 
bool get_xattr_i32 (BDbTxn &txn, const String &fname, const String &aname, uint32_t *valuep)
 
void set_xattr_i32 (BDbTxn &txn, const String &fname, const String &aname, uint32_t value)
 
bool get_xattr_i64 (BDbTxn &txn, const String &fname, const String &aname, uint64_t *valuep)
 
void set_xattr_i64 (BDbTxn &txn, const String &fname, const String &aname, uint64_t value)
 
void set_xattr (BDbTxn &txn, const String &fname, const String &aname, const void *value, size_t value_len)
 
bool get_xattr (BDbTxn &txn, const String &fname, const String &aname, Hypertable::DynamicBuffer &vbuf)
 
bool incr_attr (BDbTxn &txn, const String &fname, const String &aname, uint64_t *valuep)
 
bool exists_xattr (BDbTxn &txn, const String &fname, const String &aname)
 
void del_xattr (BDbTxn &txn, const String &fname, const String &aname)
 
void mkdir (BDbTxn &txn, const String &name)
 
void unlink (BDbTxn &txn, const String &name)
 
bool exists (BDbTxn &txn, String fname, bool *is_dir_p=0)
 
void create (BDbTxn &txn, const String &fname, bool temp)
 
void get_directory_listing (BDbTxn &txn, String fname, std::vector< DirEntry > &listing)
 
void get_directory_attr_listing (BDbTxn &txn, String fname, const String &aname, bool include_sub_entries, std::vector< DirEntryAttr > &listing)
 
void get_directory_attr_listing (BDbTxn &txn, String fname, const String &aname, std::vector< DirEntryAttr > &listing)
 
void get_all_names (BDbTxn &txn, std::vector< String > &names)
 
bool list_xattr (BDbTxn &txn, const String &fname, std::vector< String > &anames)
 
void create_event (BDbTxn &txn, uint32_t type, uint64_t id, uint32_t mask)
 
void create_event (BDbTxn &txn, uint32_t type, uint64_t id, uint32_t mask, const String &name)
 
void create_event (BDbTxn &txn, uint32_t type, uint64_t id, uint32_t mask, uint32_t mode)
 
void create_event (BDbTxn &txn, uint32_t type, uint64_t id, uint32_t mask, uint32_t mode, uint64_t generation)
 
void delete_event (BDbTxn &txn, uint64_t id)
 
void set_event_notification_handles (BDbTxn &txn, uint64_t id, const std::vector< uint64_t > &handles)
 
bool event_exists (BDbTxn &txn, uint64_t id)
 
void create_session (BDbTxn &txn, uint64_t id, const String &addr)
 
void delete_session (BDbTxn &txn, uint64_t id)
 
void expire_session (BDbTxn &txn, uint64_t id)
 
void add_session_handle (BDbTxn &txn, uint64_t id, uint64_t handle_id)
 
void get_session_handles (BDbTxn &txn, uint64_t id, std::vector< uint64_t > &handles)
 
bool delete_session_handle (BDbTxn &txn, uint64_t id, uint64_t handle_id)
 
bool session_exists (BDbTxn &txn, uint64_t id)
 
String get_session_name (BDbTxn &txn, uint64_t id)
 
void set_session_name (BDbTxn &txn, uint64_t id, const String &name)
 
void create_handle (BDbTxn &txn, uint64_t id, String node_name, uint32_t open_flags, uint32_t event_mask, uint64_t session_id, bool locked, uint32_t del_state)
 
void delete_handle (BDbTxn &txn, uint64_t id)
 
uint32_t get_handle_open_flags (BDbTxn &txn, uint64_t id)
 
void set_handle_del_state (BDbTxn &txn, uint64_t id, uint32_t del_state)
 
uint32_t get_handle_del_state (BDbTxn &txn, uint64_t id)
 
void set_handle_open_flags (BDbTxn &txn, uint64_t id, uint32_t open_flags)
 
void set_handle_event_mask (BDbTxn &txn, uint64_t id, uint32_t event_mask)
 
uint32_t get_handle_event_mask (BDbTxn &txn, uint64_t id)
 
void set_handle_node (BDbTxn &txn, uint64_t id, const String &node_name)
 
void get_handle_node (BDbTxn &txn, uint64_t id, String &node_name)
 
uint64_t get_handle_session (BDbTxn &txn, uint64_t id)
 
void set_handle_locked (BDbTxn &txn, uint64_t id, bool locked)
 
bool handle_is_locked (BDbTxn &txn, uint64_t id)
 
bool handle_exists (BDbTxn &txn, uint64_t id)
 
void create_node (BDbTxn &txn, const String &name, bool ephemeral=false, uint64_t lock_generation=0, uint32_t cur_lock_mode=0, uint64_t exclusive_handle=0)
 
void set_node_lock_generation (BDbTxn &txn, const String &name, uint64_t lock_generation)
 
uint64_t incr_node_lock_generation (BDbTxn &txn, const String &name)
 
void set_node_ephemeral (BDbTxn &txn, const String &name, bool ephemeral)
 
bool node_is_ephemeral (BDbTxn &txn, const String &name)
 
void set_node_cur_lock_mode (BDbTxn &txn, const String &name, uint32_t lock_mode)
 
uint32_t get_node_cur_lock_mode (BDbTxn &txn, const String &name)
 
void set_node_exclusive_lock_handle (BDbTxn &txn, const String &name, uint64_t exclusive_lock_handle)
 
uint64_t get_node_exclusive_lock_handle (BDbTxn &txn, const String &name)
 
void add_node_handle (BDbTxn &txn, const String &name, uint64_t handle)
 
void delete_node_handle (BDbTxn &txn, const String &name, uint64_t handle)
 
bool node_has_open_handles (BDbTxn &txn, const String &name)
 
bool node_has_pending_lock_request (BDbTxn &txn, const String &name)
 
bool get_node_pending_lock_request (BDbTxn &txn, const String &name, LockRequest &front_req)
 Check if a node has any pending lock requests from non-expired handles. More...
 
void add_node_pending_lock_request (BDbTxn &txn, const String &name, LockRequest &request)
 Adds a lock request. More...
 
void delete_node_pending_lock_request (BDbTxn &txn, const String &name, uint64_t handle)
 
void add_node_shared_lock_handle (BDbTxn &txn, const String &name, uint64_t handle)
 
bool get_node_event_notification_map (BDbTxn &txn, const String &name, uint32_t event_mask, NotificationMap &handles_to_sessions)
 
void get_node_handles (BDbTxn &txn, const String &name, std::vector< uint64_t > &handles)
 
void delete_node_shared_lock_handle (BDbTxn &txn, const String &name, uint64_t handle_id)
 
bool delete_node (BDbTxn &txn, const String &name)
 
bool node_exists (BDbTxn &txn, const String &name)
 
bool node_has_shared_lock_handles (BDbTxn &txn, const String &name)
 
uint64_t get_next_id_i64 (BDbTxn &txn, IdentifierType id_type, bool increment=false)
 

Static Public Attributes

static const char NODE_ATTR_DELIM = 0x01
 

Private Types

typedef std::map< Thread::id,
BDbHandlesPtr
ThreadHandleMap
 

Private Member Functions

void init_db_handles (const std::vector< Thread::id > &thread_ids)
 
BDbHandlesPtr get_db_handles ()
 
void build_attr_key (BDbTxn &, String &keystr, const String &aname, Dbt &key)
 

Static Private Member Functions

static void db_event_callback (DbEnv *dbenv, uint32_t which, void *info)
 
static void db_err_callback (const DbEnv *dbenv, const char *errpfx, const char *msg)
 
static void db_msg_callback (const DbEnv *dbenv, const char *msg)
 

Private Attributes

ReplicationInfo m_replication_info
 
String m_base_dir
 
DbEnv m_env
 
uint32_t m_db_flags {}
 
ThreadHandleMap m_thread_handle_map
 
uint32_t m_checkpoint_size_kb
 Checkpoint size threshold in kilobytes. More...
 
uint32_t m_max_unused_logs
 
std::chrono::steady_clock::duration m_log_gc_interval
 
std::chrono::steady_clock::time_point m_last_log_gc_time
 

Static Private Attributes

static const char * ms_name_namespace_db = "namespace.db"
 
static const char * ms_name_state_db = "state.db"
 

Detailed Description

Hyperspace filesystem implementation on top of BerkeleyDB.

Definition at line 220 of file BerkeleyDbFilesystem.h.

Member Typedef Documentation

Definition at line 808 of file BerkeleyDbFilesystem.h.

Constructor & Destructor Documentation

BerkeleyDbFilesystem::BerkeleyDbFilesystem ( PropertiesPtr props,
const String basedir,
const std::vector< Thread::id > &  thread_ids,
bool  force_recover = false 
)

Constructor.

Parameters
propsConfigruation properties
basedirDirectory of BerkeleyDB database files
thread_idsVector of application thread IDs
force_recoverForce catastrophic recovery logic

Definition at line 73 of file BerkeleyDbFilesystem.cc.

BerkeleyDbFilesystem::~BerkeleyDbFilesystem ( )

Destructor.

Iterates through m_thread_handle_map closing handles and closes m_env.

Definition at line 369 of file BerkeleyDbFilesystem.cc.

Member Function Documentation

void BerkeleyDbFilesystem::add_node_handle ( BDbTxn txn,
const String name,
uint64_t  handle 
)

Definition at line 3285 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::add_node_pending_lock_request ( BDbTxn txn,
const String name,
LockRequest request 
)

Adds a lock request.

Parameters
txnBerkeleyDB txn for this DB update
nameNode name
requestLock request

Definition at line 3425 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::add_node_shared_lock_handle ( BDbTxn txn,
const String name,
uint64_t  handle 
)

Definition at line 3631 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::add_session_handle ( BDbTxn txn,
uint64_t  id,
uint64_t  handle_id 
)

Definition at line 1920 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::build_attr_key ( BDbTxn txn,
String keystr,
const String aname,
Dbt &  key 
)
private

Definition at line 1357 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::create ( BDbTxn txn,
const String fname,
bool  temp 
)

Definition at line 1094 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::create_event ( BDbTxn txn,
uint32_t  type,
uint64_t  id,
uint32_t  mask 
)

Definition at line 1423 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::create_event ( BDbTxn txn,
uint32_t  type,
uint64_t  id,
uint32_t  mask,
const String name 
)

Definition at line 1480 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::create_event ( BDbTxn txn,
uint32_t  type,
uint64_t  id,
uint32_t  mask,
uint32_t  mode 
)

Definition at line 1511 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::create_event ( BDbTxn txn,
uint32_t  type,
uint64_t  id,
uint32_t  mask,
uint32_t  mode,
uint64_t  generation 
)

Definition at line 1543 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::create_handle ( BDbTxn txn,
uint64_t  id,
String  node_name,
uint32_t  open_flags,
uint32_t  event_mask,
uint64_t  session_id,
bool  locked,
uint32_t  del_state 
)

Definition at line 2174 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::create_node ( BDbTxn txn,
const String name,
bool  ephemeral = false,
uint64_t  lock_generation = 0,
uint32_t  cur_lock_mode = 0,
uint64_t  exclusive_handle = 0 
)

Definition at line 2833 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::create_session ( BDbTxn txn,
uint64_t  id,
const String addr 
)

Definition at line 1748 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::db_err_callback ( const DbEnv *  dbenv,
const char *  errpfx,
const char *  msg 
)
staticprivate

Definition at line 392 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::db_event_callback ( DbEnv *  dbenv,
uint32_t  which,
void *  info 
)
staticprivate

Definition at line 399 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::db_msg_callback ( const DbEnv *  dbenv,
const char *  msg 
)
staticprivate

Definition at line 387 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::del_xattr ( BDbTxn txn,
const String fname,
const String aname 
)

Definition at line 903 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::delete_event ( BDbTxn txn,
uint64_t  id 
)

Definition at line 1622 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::delete_handle ( BDbTxn txn,
uint64_t  id 
)

Definition at line 2278 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::delete_node ( BDbTxn txn,
const String name 
)

Definition at line 3756 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::delete_node_handle ( BDbTxn txn,
const String name,
uint64_t  handle 
)

Definition at line 3380 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::delete_node_pending_lock_request ( BDbTxn txn,
const String name,
uint64_t  handle 
)

Definition at line 3581 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::delete_node_shared_lock_handle ( BDbTxn txn,
const String name,
uint64_t  handle_id 
)

Definition at line 3713 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::delete_session ( BDbTxn txn,
uint64_t  id 
)

Definition at line 1808 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::delete_session_handle ( BDbTxn txn,
uint64_t  id,
uint64_t  handle_id 
)

Definition at line 1998 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::do_checkpoint ( )

Checkpoints the BerkeleyDB database.

This method calls m_env.txn_checkpoint to checkpoint the database. It passes in the value m_checkpoint_size_kb. Then if the time of the last checkpoint has exceeded m_log_gc_interval, it will call m_env.log_archive to obtain a list of unused log files and it will remove them.

Definition at line 525 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::event_exists ( BDbTxn txn,
uint64_t  id 
)

Definition at line 1706 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::exists ( BDbTxn txn,
String  fname,
bool *  is_dir_p = 0 
)

Definition at line 1051 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::exists_xattr ( BDbTxn txn,
const String fname,
const String aname 
)

Definition at line 872 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::expire_session ( BDbTxn txn,
uint64_t  id 
)

Definition at line 1880 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::get_all_names ( BDbTxn txn,
std::vector< String > &  names 
)

Definition at line 1328 of file BerkeleyDbFilesystem.cc.

String Hyperspace::BerkeleyDbFilesystem::get_current_master ( )
inline

Returns hostname of currently elected master.

Returns
Hostname of the currently elected master.

Definition at line 261 of file BerkeleyDbFilesystem.h.

BDbHandlesPtr BerkeleyDbFilesystem::get_db_handles ( )
private

Definition at line 505 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::get_directory_attr_listing ( BDbTxn txn,
String  fname,
const String aname,
bool  include_sub_entries,
std::vector< DirEntryAttr > &  listing 
)

Definition at line 1225 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::get_directory_attr_listing ( BDbTxn txn,
String  fname,
const String aname,
std::vector< DirEntryAttr > &  listing 
)

Definition at line 1240 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::get_directory_listing ( BDbTxn txn,
String  fname,
std::vector< DirEntry > &  listing 
)

Definition at line 1142 of file BerkeleyDbFilesystem.cc.

uint32_t BerkeleyDbFilesystem::get_handle_del_state ( BDbTxn txn,
uint64_t  id 
)

Definition at line 2713 of file BerkeleyDbFilesystem.cc.

uint32_t BerkeleyDbFilesystem::get_handle_event_mask ( BDbTxn txn,
uint64_t  id 
)

Definition at line 2500 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::get_handle_node ( BDbTxn txn,
uint64_t  id,
String node_name 
)

Definition at line 2676 of file BerkeleyDbFilesystem.cc.

uint32_t BerkeleyDbFilesystem::get_handle_open_flags ( BDbTxn txn,
uint64_t  id 
)

Definition at line 2751 of file BerkeleyDbFilesystem.cc.

uint64_t BerkeleyDbFilesystem::get_handle_session ( BDbTxn txn,
uint64_t  id 
)

Definition at line 2791 of file BerkeleyDbFilesystem.cc.

uint64_t BerkeleyDbFilesystem::get_next_id_i64 ( BDbTxn txn,
IdentifierType  id_type,
bool  increment = false 
)

Definition at line 3954 of file BerkeleyDbFilesystem.cc.

uint32_t BerkeleyDbFilesystem::get_node_cur_lock_mode ( BDbTxn txn,
const String name 
)

Definition at line 3157 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::get_node_event_notification_map ( BDbTxn txn,
const String name,
uint32_t  event_mask,
NotificationMap handles_to_sessions 
)

Definition at line 3326 of file BerkeleyDbFilesystem.cc.

uint64_t BerkeleyDbFilesystem::get_node_exclusive_lock_handle ( BDbTxn txn,
const String name 
)

Definition at line 3243 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::get_node_handles ( BDbTxn txn,
const String name,
std::vector< uint64_t > &  handles 
)

Definition at line 3865 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::get_node_pending_lock_request ( BDbTxn txn,
const String name,
LockRequest front_req 
)

Check if a node has any pending lock requests from non-expired handles.

Parameters
txnBerkeleyDB txn for this DB update
nameNode name
front_reqwill contain the first pending request if this method returns true
Returns
true if node has at least one pending lock request

Definition at line 3527 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::get_session_handles ( BDbTxn txn,
uint64_t  id,
std::vector< uint64_t > &  handles 
)

Definition at line 1959 of file BerkeleyDbFilesystem.cc.

String BerkeleyDbFilesystem::get_session_name ( BDbTxn txn,
uint64_t  id 
)

Definition at line 2130 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::get_xattr ( BDbTxn txn,
const String fname,
const String aname,
Hypertable::DynamicBuffer vbuf 
)

Definition at line 837 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::get_xattr_i32 ( BDbTxn txn,
const String fname,
const String aname,
uint32_t *  valuep 
)

Definition at line 612 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::get_xattr_i64 ( BDbTxn txn,
const String fname,
const String aname,
uint64_t *  valuep 
)

Definition at line 679 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::handle_exists ( BDbTxn txn,
uint64_t  id 
)

Definition at line 2586 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::handle_is_locked ( BDbTxn txn,
uint64_t  id 
)

Definition at line 2628 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::incr_attr ( BDbTxn txn,
const String fname,
const String aname,
uint64_t *  valuep 
)

Definition at line 745 of file BerkeleyDbFilesystem.cc.

uint64_t BerkeleyDbFilesystem::incr_node_lock_generation ( BDbTxn txn,
const String name 
)

Definition at line 2968 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::init_db_handles ( const std::vector< Thread::id > &  thread_ids)
private

Definition at line 488 of file BerkeleyDbFilesystem.cc.

bool Hyperspace::BerkeleyDbFilesystem::is_master ( )
inline

Check if we're the current master.

This method returns true if replication is disabled or if we're the current elected master.

Returns
true if we're the master, false otherwise.

Definition at line 253 of file BerkeleyDbFilesystem.h.

bool BerkeleyDbFilesystem::list_xattr ( BDbTxn txn,
const String fname,
std::vector< String > &  anames 
)

Definition at line 1375 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::mkdir ( BDbTxn txn,
const String name 
)

Definition at line 929 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::node_exists ( BDbTxn txn,
const String name 
)

Definition at line 3825 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::node_has_open_handles ( BDbTxn txn,
const String name 
)

Definition at line 3907 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::node_has_pending_lock_request ( BDbTxn txn,
const String name 
)

Definition at line 3474 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::node_has_shared_lock_handles ( BDbTxn txn,
const String name 
)

Definition at line 3672 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::node_is_ephemeral ( BDbTxn txn,
const String name 
)

Definition at line 3066 of file BerkeleyDbFilesystem.cc.

bool BerkeleyDbFilesystem::session_exists ( BDbTxn txn,
uint64_t  id 
)

Definition at line 2047 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::set_event_notification_handles ( BDbTxn txn,
uint64_t  id,
const std::vector< uint64_t > &  handles 
)

Definition at line 1577 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::set_handle_del_state ( BDbTxn txn,
uint64_t  id,
uint32_t  del_state 
)

Definition at line 2363 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::set_handle_event_mask ( BDbTxn txn,
uint64_t  id,
uint32_t  event_mask 
)

Definition at line 2454 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::set_handle_locked ( BDbTxn txn,
uint64_t  id,
bool  locked 
)

Definition at line 2541 of file BerkeleyDbFilesystem.cc.

void Hyperspace::BerkeleyDbFilesystem::set_handle_node ( BDbTxn txn,
uint64_t  id,
const String node_name 
)
void BerkeleyDbFilesystem::set_handle_open_flags ( BDbTxn txn,
uint64_t  id,
uint32_t  open_flags 
)

Definition at line 2408 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::set_node_cur_lock_mode ( BDbTxn txn,
const String name,
uint32_t  lock_mode 
)

Definition at line 3111 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::set_node_ephemeral ( BDbTxn txn,
const String name,
bool  ephemeral 
)

Definition at line 3019 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::set_node_exclusive_lock_handle ( BDbTxn txn,
const String name,
uint64_t  exclusive_lock_handle 
)

Definition at line 3198 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::set_node_lock_generation ( BDbTxn txn,
const String name,
uint64_t  lock_generation 
)

Definition at line 2921 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::set_session_name ( BDbTxn txn,
uint64_t  id,
const String name 
)

Definition at line 2090 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::set_xattr ( BDbTxn txn,
const String fname,
const String aname,
const void *  value,
size_t  value_len 
)

Definition at line 807 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::set_xattr_i32 ( BDbTxn txn,
const String fname,
const String aname,
uint32_t  value 
)

Definition at line 645 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::set_xattr_i64 ( BDbTxn txn,
const String fname,
const String aname,
uint64_t  value 
)

Definition at line 712 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::start_transaction ( BDbTxn txn)

Creates a new BerkeleyDB transaction.

Parameters
txnReturn parameter to hold newly created transaction

Definition at line 582 of file BerkeleyDbFilesystem.cc.

void BerkeleyDbFilesystem::unlink ( BDbTxn txn,
const String name 
)

Definition at line 984 of file BerkeleyDbFilesystem.cc.

Member Data Documentation

String Hyperspace::BerkeleyDbFilesystem::m_base_dir
private

Definition at line 803 of file BerkeleyDbFilesystem.h.

uint32_t Hyperspace::BerkeleyDbFilesystem::m_checkpoint_size_kb
private

Checkpoint size threshold in kilobytes.

Definition at line 812 of file BerkeleyDbFilesystem.h.

uint32_t Hyperspace::BerkeleyDbFilesystem::m_db_flags {}
private

Definition at line 805 of file BerkeleyDbFilesystem.h.

DbEnv Hyperspace::BerkeleyDbFilesystem::m_env
private

Definition at line 804 of file BerkeleyDbFilesystem.h.

std::chrono::steady_clock::time_point Hyperspace::BerkeleyDbFilesystem::m_last_log_gc_time
private

Definition at line 815 of file BerkeleyDbFilesystem.h.

std::chrono::steady_clock::duration Hyperspace::BerkeleyDbFilesystem::m_log_gc_interval
private

Definition at line 814 of file BerkeleyDbFilesystem.h.

uint32_t Hyperspace::BerkeleyDbFilesystem::m_max_unused_logs
private

Definition at line 813 of file BerkeleyDbFilesystem.h.

ReplicationInfo Hyperspace::BerkeleyDbFilesystem::m_replication_info
private

Definition at line 802 of file BerkeleyDbFilesystem.h.

ThreadHandleMap Hyperspace::BerkeleyDbFilesystem::m_thread_handle_map
private

Definition at line 809 of file BerkeleyDbFilesystem.h.

const char * BerkeleyDbFilesystem::ms_name_namespace_db = "namespace.db"
staticprivate

Definition at line 806 of file BerkeleyDbFilesystem.h.

const char * BerkeleyDbFilesystem::ms_name_state_db = "state.db"
staticprivate

Definition at line 807 of file BerkeleyDbFilesystem.h.

const char Hyperspace::BerkeleyDbFilesystem::NODE_ATTR_DELIM = 0x01
static

Definition at line 787 of file BerkeleyDbFilesystem.h.


The documentation for this class was generated from the following files: