0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Typedefs | Functions | Variables
Hypertable::Config Namespace Reference

Classes

struct  ClientPolicy
 
struct  CommPolicy
 Config policy for Comm layer. More...
 
struct  Cons
 Helpers to compose init policies; allow to combine two policies into one. More...
 
struct  Cons< NullPolicy, PolicyT >
 
struct  DefaultPolicy
 Default init policy. More...
 
struct  FsBrokerPolicy
 Mutually exclusive with GenericServerPolicy. More...
 
struct  FsClientPolicy
 
struct  GenericServerPolicy
 Config policy for generic Comm layer server. More...
 
struct  HyperspaceClientPolicy
 
struct  HyperspaceCommandShellPolicy
 
struct  HyperspaceMasterPolicy
 
struct  Join
 
struct  MasterClientPolicy
 
struct  NullPolicy
 
struct  Policy
 Interface and base of config policy. More...
 
struct  RangeServerClientPolicy
 
struct  RangeServerPolicy
 
struct  TestPolicy
 A Policy class for extending command line options. More...
 
struct  ThriftBrokerPolicy
 Mutually exclusive with GenericServerPolicy. More...
 
struct  ThriftClientPolicy
 

Typedefs

typedef Cons< DefaultPolicy,
CommPolicy
DefaultCommPolicy
 Default comm layer config policy. More...
 
typedef Cons
< GenericServerPolicy,
DefaultCommPolicy
DefaultServerPolicy
 Default comm layer server policy. More...
 
typedef PropertiesDesc Desc
 
typedef Cons< TestPolicy,
DefaultPolicy
DefaultTestPolicy
 
typedef Meta::list
< ClientPolicy,
HyperspaceClientPolicy,
MasterClientPolicy,
DefaultCommPolicy
ClientPolicies
 
typedef Join< ClientPolicies >
::type 
DefaultClientPolicy
 

Functions

void init_comm_options ()
 Initializes Comm-layer options. More...
 
void init_comm ()
 This method initializes the Comm-layer. More...
 
void init_generic_server_options ()
 Initializes generic server options. More...
 
void init_generic_server ()
 Initializes generic server by writing the pidfile. More...
 
static int terminal_line_length ()
 
static String usage_str (const char *usage)
 
Desccmdline_desc (const char *usage=nullptr)
 A macro which definds global functions like get_bool(), get_str(), get_i16() etc. More...
 
Desccmdline_hidden_desc ()
 Get the command line hidden options description (for positional options) More...
 
PositionalDesccmdline_positional_desc ()
 Get the command line positional options description. More...
 
void cmdline_desc (const Desc &desc)
 Set the command line options description. More...
 
Descfile_desc (const char *usage=NULL)
 Get the config file options description. More...
 
void file_desc (const Desc &desc)
 Set the config file options description. More...
 
void parse_args (int argc, char *argv[])
 Initialization helper; parses the argc/argv parameters into properties, reads the configuration file, handles "help" and "help-config" parameters. More...
 
void parse_file (const String &fname, const Desc &desc)
 Parses a configuration file and stores all configuration options into the option descriptor. More...
 
void alias (const String &cmdline_opt, const String &file_opt, bool overwrite=false)
 Setup command line option alias for config file option. More...
 
void sync_aliases ()
 Sync alias values. More...
 
bool allow_unregistered_options (bool choice)
 Toggle allow unregistered options. More...
 
bool allow_unregistered_options ()
 Returns true if unregistered options are allowed. More...
 
void cleanup ()
 Free all resources used. More...
 
bool has (const String &name)
 Check existence of a configuration value. More...
 
bool defaulted (const String &name)
 Check if a configuration value is defaulted. More...
 
template<typename T >
get (const String &name)
 Retrieves a configuration value. More...
 
template<typename T >
get (const String &name, const T &default_value)
 Retrieves a configuration value (or a default value, if the value was not set) More...
 
template<class PolicyT >
void init_with_policy (int argc, char *argv[], const Desc *desc=0)
 Init with policy (with init_options (called before parse_args) and init (called after parse_args) methods. More...
 
template<class PolicyListT >
void init_with_policies (int argc, char *argv[], const Desc *desc=0)
 Convenience function (more of a demo) to init with a list of polices. More...
 
void init (int argc, char *argv[], const Desc *desc=NULL)
 Initialize with default policy. More...
 
void init_fs_client_options ()
 
void init_fs_client ()
 
void init_fs_broker_options ()
 
void init_hyperspace_client_options ()
 
void init_hyperspace_client ()
 
void init_hyperspace_command_shell_options ()
 
void init_hyperspace_master_options ()
 
void init_master_client_options ()
 
void init_master_client ()
 
void init_range_server_client_options ()
 
void init_range_server_client ()
 
void init_range_server_options ()
 
void init_range_server ()
 
void init_thrift_client_options ()
 
void init_thrift_client ()
 
void init_thrift_broker_options ()
 
void init_thrift_broker ()
 
static void thrift_output_handler (const char *message)
 
void redirect_thrift_output ()
 

Variables

std::recursive_mutex rec_mutex
 A global (recursive) configuration mutex. More...
 
PropertiesPtr properties
 This singleton map stores all options. More...
 
static String filename
 
static bool file_loaded = false
 
static bool allow_unregistered = false
 
static Desccmdline_descp = NULL
 
static Desccmdline_hidden_descp = NULL
 
static PositionalDesccmdline_positional_descp = NULL
 
static Descfile_descp = NULL
 

Typedef Documentation

Definition at line 55 of file Config.h.

Definition at line 57 of file Config.h.

Function Documentation

void Hypertable::Config::init_fs_broker_options ( )

Definition at line 51 of file Config.cc.

void Hypertable::Config::init_fs_client ( )

Definition at line 41 of file Config.cc.

void Hypertable::Config::init_fs_client_options ( )

Definition at line 28 of file Config.cc.

void Hypertable::Config::init_hyperspace_client ( )

Definition at line 56 of file Config.cc.

void Hypertable::Config::init_hyperspace_client_options ( )

Definition at line 34 of file Config.cc.

void Hypertable::Config::init_hyperspace_command_shell_options ( )

Definition at line 84 of file Config.cc.

void Hypertable::Config::init_hyperspace_master_options ( )

Definition at line 88 of file Config.cc.

void Hypertable::Config::init_master_client ( )

Definition at line 38 of file Config.cc.

void Hypertable::Config::init_master_client_options ( )

Definition at line 28 of file Config.cc.

void Hypertable::Config::init_range_server ( )

Definition at line 40 of file Config.cc.

void Hypertable::Config::init_range_server_client ( )

Definition at line 58 of file Config.cc.

void Hypertable::Config::init_range_server_client_options ( )

Definition at line 49 of file Config.cc.

void Hypertable::Config::init_range_server_options ( )

Definition at line 27 of file Config.cc.

void Hypertable::Config::init_thrift_broker ( )

Definition at line 66 of file Config.cc.

void Hypertable::Config::init_thrift_broker_options ( )

Definition at line 52 of file Config.cc.

void Hypertable::Config::init_thrift_client ( )

Definition at line 42 of file Config.cc.

void Hypertable::Config::init_thrift_client_options ( )

Definition at line 29 of file Config.cc.

void Hypertable::Config::redirect_thrift_output ( )

Definition at line 79 of file Config.cc.

static int Hypertable::Config::terminal_line_length ( )
static

Definition at line 57 of file Config.cc.

static void Hypertable::Config::thrift_output_handler ( const char *  message)
static

Definition at line 72 of file Config.cc.

static String Hypertable::Config::usage_str ( const char *  usage)
static

Definition at line 62 of file Config.cc.

Variable Documentation

bool Hypertable::Config::allow_unregistered = false
static

Definition at line 50 of file Config.cc.

Desc* Hypertable::Config::cmdline_descp = NULL
static

Definition at line 52 of file Config.cc.

Desc* Hypertable::Config::cmdline_hidden_descp = NULL
static

Definition at line 53 of file Config.cc.

PositionalDesc* Hypertable::Config::cmdline_positional_descp = NULL
static

Definition at line 54 of file Config.cc.

Desc* Hypertable::Config::file_descp = NULL
static

Definition at line 55 of file Config.cc.

bool Hypertable::Config::file_loaded = false
static

Definition at line 49 of file Config.cc.

String Hypertable::Config::filename
static

Definition at line 48 of file Config.cc.