Derecho  0.9
Distributed systems toolkit for RDMA
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes | List of all members
derecho::Conf Struct Reference

The single configuration file for derecho. More...

#include <conf.hpp>

Inheritance diagram for derecho::Conf:
Inheritance graph
[legend]
Collaboration diagram for derecho::Conf:
Collaboration graph
[legend]

Public Member Functions

 Conf (int argc, char *argv[], GetPot *getpotcfg=nullptr) noexcept
 Constructor: Conf can read configure from multiple sources. More...
 
const std::string & getString (const std::string &key) const
 get configuration More...
 
const int16_t getInt16 (const std::string &key) const
 
const uint16_t getUInt16 (const std::string &key) const
 
const int32_t getInt32 (const std::string &key) const
 
const uint32_t getUInt32 (const std::string &key) const
 
const int64_t getInt64 (const std::string &key) const
 
const uint64_t getUInt64 (const std::string &key) const
 
const float getFloat (const std::string &key) const
 
const double getDouble (const std::string &key) const
 
const bool getBoolean (const std::string &key) const
 
const bool hasCustomizedKey (const std::string &key) const
 
 MAKE_LONG_OPT_ENTRY (CONF_DERECHO_LEADER_IP)
 
 MAKE_LONG_OPT_ENTRY (CONF_DERECHO_LEADER_GMS_PORT)
 
 MAKE_LONG_OPT_ENTRY (CONF_DERECHO_LOCAL_ID)
 
 MAKE_LONG_OPT_ENTRY (CONF_DERECHO_LOCAL_IP)
 
 MAKE_LONG_OPT_ENTRY (CONF_DERECHO_GMS_PORT)
 
 MAKE_LONG_OPT_ENTRY (CONF_DERECHO_RPC_PORT)
 
 MAKE_LONG_OPT_ENTRY (CONF_DERECHO_SST_PORT)
 
 MAKE_LONG_OPT_ENTRY (CONF_DERECHO_RDMC_PORT)
 
 MAKE_LONG_OPT_ENTRY (CONF_DERECHO_HEARTBEAT_MS)
 
 MAKE_LONG_OPT_ENTRY (CONF_DERECHO_SST_POLL_CQ_TIMEOUT_MS)
 
 MAKE_LONG_OPT_ENTRY (CONF_DERECHO_DISABLE_PARTITIONING_SAFETY)
 
 MAKE_LONG_OPT_ENTRY (CONF_DERECHO_MAX_P2P_REQUEST_PAYLOAD_SIZE)
 
 MAKE_LONG_OPT_ENTRY (CONF_DERECHO_MAX_P2P_REPLY_PAYLOAD_SIZE)
 
 MAKE_LONG_OPT_ENTRY (CONF_DERECHO_P2P_WINDOW_SIZE)
 
 MAKE_LONG_OPT_ENTRY (CONF_SUBGROUP_DEFAULT_RDMC_SEND_ALGORITHM)
 
 MAKE_LONG_OPT_ENTRY (CONF_SUBGROUP_DEFAULT_MAX_PAYLOAD_SIZE)
 
 MAKE_LONG_OPT_ENTRY (CONF_SUBGROUP_DEFAULT_MAX_REPLY_PAYLOAD_SIZE)
 
 MAKE_LONG_OPT_ENTRY (CONF_SUBGROUP_DEFAULT_MAX_SMC_PAYLOAD_SIZE)
 
 MAKE_LONG_OPT_ENTRY (CONF_SUBGROUP_DEFAULT_BLOCK_SIZE)
 
 MAKE_LONG_OPT_ENTRY (CONF_SUBGROUP_DEFAULT_WINDOW_SIZE)
 
 MAKE_LONG_OPT_ENTRY (CONF_RDMA_PROVIDER)
 
 MAKE_LONG_OPT_ENTRY (CONF_RDMA_DOMAIN)
 
 MAKE_LONG_OPT_ENTRY (CONF_RDMA_TX_DEPTH)
 
 MAKE_LONG_OPT_ENTRY (CONF_RDMA_RX_DEPTH)
 
 MAKE_LONG_OPT_ENTRY (CONF_PERS_FILE_PATH)
 
 MAKE_LONG_OPT_ENTRY (CONF_PERS_RAMDISK_PATH)
 
 MAKE_LONG_OPT_ENTRY (CONF_PERS_RESET)
 
 MAKE_LONG_OPT_ENTRY (CONF_PERS_MAX_LOG_ENTRY)
 
 MAKE_LONG_OPT_ENTRY (CONF_PERS_MAX_DATA_SIZE)
 

Static Public Member Functions

static void initialize (int argc, char *argv[], const char *conf_file=nullptr)
 
static const Confget () noexcept
 

Static Public Attributes

static struct option long_options []
 
static const std::vector< std::string > subgroupProfileFields
 

Private Attributes

std::map< const std::string, std::string > config
 

Static Private Attributes

static std::unique_ptr< Confsingleton = nullptr
 
static std::atomic< uint32_t > singleton_initialized_flag = 0
 

Detailed Description

The single configuration file for derecho.

Definition at line 18 of file conf.hpp.

Constructor & Destructor Documentation

◆ Conf()

derecho::Conf::Conf ( int  argc,
char *  argv[],
GetPot getpotcfg = nullptr 
)
inlinenoexcept

Constructor: Conf can read configure from multiple sources.

  • the command line argument has the highest priority, then,
  • the configuration files
  • the default values.

Definition at line 106 of file conf.hpp.

Member Function Documentation

◆ get()

const Conf * derecho::Conf::get ( )
staticnoexcept

Definition at line 102 of file conf.cpp.

◆ getBoolean()

const bool derecho::Conf::getBoolean ( const std::string &  key) const
inline

Definition at line 164 of file conf.hpp.

◆ getDouble()

const double derecho::Conf::getDouble ( const std::string &  key) const
inline

Definition at line 161 of file conf.hpp.

◆ getFloat()

const float derecho::Conf::getFloat ( const std::string &  key) const
inline

Definition at line 158 of file conf.hpp.

◆ getInt16()

const int16_t derecho::Conf::getInt16 ( const std::string &  key) const
inline

Definition at line 140 of file conf.hpp.

◆ getInt32()

const int32_t derecho::Conf::getInt32 ( const std::string &  key) const
inline

Definition at line 146 of file conf.hpp.

◆ getInt64()

const int64_t derecho::Conf::getInt64 ( const std::string &  key) const
inline

Definition at line 152 of file conf.hpp.

◆ getString()

const std::string& derecho::Conf::getString ( const std::string &  key) const
inline

get configuration

Definition at line 137 of file conf.hpp.

◆ getUInt16()

const uint16_t derecho::Conf::getUInt16 ( const std::string &  key) const
inline

Definition at line 143 of file conf.hpp.

◆ getUInt32()

const uint32_t derecho::Conf::getUInt32 ( const std::string &  key) const
inline

Definition at line 149 of file conf.hpp.

◆ getUInt64()

const uint64_t derecho::Conf::getUInt64 ( const std::string &  key) const
inline

Definition at line 155 of file conf.hpp.

◆ hasCustomizedKey()

const bool derecho::Conf::hasCustomizedKey ( const std::string &  key) const
inline

Definition at line 169 of file conf.hpp.

◆ initialize()

void derecho::Conf::initialize ( int  argc,
char *  argv[],
const char *  conf_file = nullptr 
)
static

Definition at line 67 of file conf.cpp.

◆ MAKE_LONG_OPT_ENTRY() [1/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_DERECHO_LEADER_IP  )

◆ MAKE_LONG_OPT_ENTRY() [2/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_DERECHO_LEADER_GMS_PORT  )

◆ MAKE_LONG_OPT_ENTRY() [3/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_DERECHO_LOCAL_ID  )

◆ MAKE_LONG_OPT_ENTRY() [4/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_DERECHO_LOCAL_IP  )

◆ MAKE_LONG_OPT_ENTRY() [5/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_DERECHO_GMS_PORT  )

◆ MAKE_LONG_OPT_ENTRY() [6/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_DERECHO_RPC_PORT  )

◆ MAKE_LONG_OPT_ENTRY() [7/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_DERECHO_SST_PORT  )

◆ MAKE_LONG_OPT_ENTRY() [8/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_DERECHO_RDMC_PORT  )

◆ MAKE_LONG_OPT_ENTRY() [9/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_DERECHO_HEARTBEAT_MS  )

◆ MAKE_LONG_OPT_ENTRY() [10/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_DERECHO_SST_POLL_CQ_TIMEOUT_MS  )

◆ MAKE_LONG_OPT_ENTRY() [11/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_DERECHO_DISABLE_PARTITIONING_SAFETY  )

◆ MAKE_LONG_OPT_ENTRY() [12/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_DERECHO_MAX_P2P_REQUEST_PAYLOAD_SIZE  )

◆ MAKE_LONG_OPT_ENTRY() [13/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_DERECHO_MAX_P2P_REPLY_PAYLOAD_SIZE  )

◆ MAKE_LONG_OPT_ENTRY() [14/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_DERECHO_P2P_WINDOW_SIZE  )

◆ MAKE_LONG_OPT_ENTRY() [15/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_SUBGROUP_DEFAULT_RDMC_SEND_ALGORITHM  )

◆ MAKE_LONG_OPT_ENTRY() [16/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_SUBGROUP_DEFAULT_MAX_PAYLOAD_SIZE  )

◆ MAKE_LONG_OPT_ENTRY() [17/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_SUBGROUP_DEFAULT_MAX_REPLY_PAYLOAD_SIZE  )

◆ MAKE_LONG_OPT_ENTRY() [18/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_SUBGROUP_DEFAULT_MAX_SMC_PAYLOAD_SIZE  )

◆ MAKE_LONG_OPT_ENTRY() [19/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_SUBGROUP_DEFAULT_BLOCK_SIZE  )

◆ MAKE_LONG_OPT_ENTRY() [20/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_SUBGROUP_DEFAULT_WINDOW_SIZE  )

◆ MAKE_LONG_OPT_ENTRY() [21/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_RDMA_PROVIDER  )

◆ MAKE_LONG_OPT_ENTRY() [22/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_RDMA_DOMAIN  )

◆ MAKE_LONG_OPT_ENTRY() [23/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_RDMA_TX_DEPTH  )

◆ MAKE_LONG_OPT_ENTRY() [24/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_RDMA_RX_DEPTH  )

◆ MAKE_LONG_OPT_ENTRY() [25/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_PERS_FILE_PATH  )

◆ MAKE_LONG_OPT_ENTRY() [26/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_PERS_RAMDISK_PATH  )

◆ MAKE_LONG_OPT_ENTRY() [27/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_PERS_RESET  )

◆ MAKE_LONG_OPT_ENTRY() [28/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_PERS_MAX_LOG_ENTRY  )

◆ MAKE_LONG_OPT_ENTRY() [29/29]

derecho::Conf::MAKE_LONG_OPT_ENTRY ( CONF_PERS_MAX_DATA_SIZE  )

Member Data Documentation

◆ config

std::map<const std::string, std::string> derecho::Conf::config
private

Definition at line 57 of file conf.hpp.

◆ long_options

struct option derecho::Conf::long_options[]
static

Definition at line 97 of file conf.hpp.

◆ singleton

std::unique_ptr< Conf > derecho::Conf::singleton = nullptr
staticprivate

Definition at line 190 of file conf.hpp.

◆ singleton_initialized_flag

std::atomic< uint32_t > derecho::Conf::singleton_initialized_flag = 0
staticprivate

Definition at line 191 of file conf.hpp.

◆ subgroupProfileFields

const std::vector< std::string > derecho::Conf::subgroupProfileFields
static
Initial value:
= {
"max_payload_size",
"max_reply_payload_size",
"max_smc_payload_size",
"block_size",
"window_size",
"rdmc_send_algorithm"
}

Definition at line 186 of file conf.hpp.


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