37 "hyperspace master server to connect to in <host:port> format")
38 (
"hyperspace-timeout",
i32()->default_value(30000),
39 "Timeout in milliseconds for hyperspace connection")
40 (
"keepalive",
i32()->default_value(10000),
41 "Interval in milliseconds of keepalive message from Hyperspace client")
42 (
"lease-interval",
i32()->default_value(60000),
43 "Hyperspace master lease interval in milliseconds")
44 (
"grace-period",
i32()->default_value(60000),
45 "Grace period in milliseconds before 'jeopardy' for hyperspace client")
47 alias(
"hyperspace-timeout",
"Hyperspace.Timeout");
48 alias(
"keepalive",
"Hyperspace.KeepAlive.Interval");
49 alias(
"lease-interval",
"Hyperspace.Lease.Interval");
50 alias(
"grace-period",
"Hyperspace.GracePeriod");
52 alias(
"hs-host",
"Hyperspace.Replica.Host");
53 alias(
"hs-port",
"Hyperspace.Replica.Port");
62 if (
properties->has(
"Hyperspace.Replica.Host"))
63 hosts =
properties->get_strs(
"Hyperspace.Replica.Host");
66 for (i=0; i<hosts.size(); i++) {
67 #if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__)
68 if (stricmp(hosts[i].c_str(), e.
host.c_str()) == 0)
71 if (strcasecmp(hosts[i].c_str(), e.
host.c_str()) == 0)
76 if (i == hosts.size()) {
77 hosts.insert(hosts.begin(), e.
host);
91 "Hyperspace master listening port")
92 (
"dir",
str()->default_value(
"hyperspace"),
93 "Hyperspace root directory name")
94 (
"keepalive",
i32()->default_value(10000),
95 "Interval in milliseconds of keepalive message from Hyperspace client")
96 (
"lease-interval",
i32()->default_value(20000),
97 "Hyperspace master lease interval in milliseconds")
99 alias(
"reactors",
"Hyperspace.Replica.Reactors");
100 alias(
"workers",
"Hyperspace.Replica.Workers");
101 alias(
"port",
"Hyperspace.Replica.Port");
102 alias(
"dir",
"Hyperspace.Replica.Dir");
103 alias(
"keepalive",
"Hyperspace.KeepAlive.Interval");
104 alias(
"lease-interval",
"Hyperspace.Lease.Interval");
PropertiesPtr properties
This singleton map stores all options.
static Endpoint parse_endpoint(const char *endpoint, int defport=0)
Parse an endpoint string in (host:port) format.
void init_hyperspace_client_options()
Po::typed_value< uint16_t > * i16(uint16_t *v=0)
Po::typed_value< String > * str(String *v=0)
std::vector< String > Strings
void init_hyperspace_command_shell_options()
Desc & cmdline_desc(const char *usage)
A macro which definds global functions like get_bool(), get_str(), get_i16() etc. ...
void init_hyperspace_client()
Po::typed_value< int32_t > * i32(int32_t *v=0)
Compatibility Macros for C/C++.
static void add_options(PropertiesDesc &)
bool defaulted(const String &name)
Check if a configuration value is defaulted.
Internet address wrapper classes and utility functions.
void alias(const String &cmdline_opt, const String &file_opt, bool overwrite)
Setup command line option alias for config file option.
void init_hyperspace_master_options()
High-level entry point to a service; wraps a host:port pair.