Kyoto Tycoon
|
All symbols of Kyoto Tycoon. More...
Classes | |
class | MapReduce |
MapReduce framework. More... | |
class | URL |
URL accessor. More... | |
class | HTTPClient |
HTTP client. More... | |
class | HTTPServer |
HTTP server. More... | |
class | PluggableDB |
Interface of pluggable database abstraction. More... | |
class | PluggableServer |
Interface of pluggable server abstraction. More... | |
class | RemoteDB |
Remote database. More... | |
class | ReplicationClient |
Replication client. More... | |
class | RPCClient |
RPC client. More... | |
class | RPCServer |
RPC server. More... | |
class | SharedLibrary |
Shared library. More... | |
class | Pollable |
Interface of poolable I/O event. More... | |
class | Socket |
Network stream abstraction based on TCP/IP. More... | |
class | ServerSocket |
Network server abstraction based on TCP/IP. More... | |
class | Poller |
I/O event notification. More... | |
class | ThreadedServer |
Threaded TCP Server. More... | |
class | TimedDB |
Timed database. More... | |
class | UpdateLogger |
Update logger. More... | |
Typedefs | |
typedef PluggableDB *(* | KTDBINIT )() |
Initializer of a database implementation. | |
typedef PluggableServer *(* | KTSERVINIT )() |
Initializer of a server implementation. | |
Functions | |
bool | setkillsignalhandler (void(*handler)(int)) |
Set the signal handler for termination signals. | |
bool | maskthreadsignal () |
Set the signal mask of the current to ignore all. | |
bool | daemonize () |
Switch the process into the background. | |
int32_t | executecommand (const std::vector< std::string > &args) |
Execute a shell command. | |
const char * | strmapget (const std::map< std::string, std::string > &map, const char *key, size_t *sp=NULL) |
Get the C-style string value of a record in a string map. | |
void | printstrvec (const std::vector< std::string > &vec, std::ostream &strm=std::cout) |
Print all records in a string vector. | |
void | printstrmap (const std::map< std::string, std::string > &map, std::ostream &strm=std::cout) |
Print all records in a string map. | |
void | urlbreak (const char *url, std::map< std::string, std::string > *elems) |
Break up a URL into elements. | |
char * | xmlescape (const char *str) |
Escape meta characters in a string with the entity references of XML. | |
char * | xmlunescape (const char *str) |
Unescape meta characters in a string with the entity references of XML. | |
void | wwwformtomap (const std::string &str, std::map< std::string, std::string > *map) |
Parse a www-form-urlencoded string and store each records into a map. | |
void | maptowwwform (const std::map< std::string, std::string > &map, std::string *str) |
Serialize a string map into a www-form-urlencoded string. | |
void | tsvtomap (const std::string &str, std::map< std::string, std::string > *map) |
Parse a TSV string and store each records into a map. | |
void | maptotsv (const std::map< std::string, std::string > &map, std::string *str) |
Serialize a string map into a TSV string. | |
void | tsvmapencode (std::map< std::string, std::string > *map, int32_t mode) |
Encode each record of a string map. | |
void | tsvmapdecode (std::map< std::string, std::string > *map, int32_t mode) |
Decode each record of a string map. | |
int32_t | checkmapenc (const std::map< std::string, std::string > &map) |
Check the best suited encoding of a string map. | |
char * | strcapitalize (char *str) |
Capitalize letters of a string. | |
bool | strisalnum (const char *str) |
Check a string is composed of alphabets or numbers only. | |
void | strtokenize (const char *str, std::vector< std::string > *tokens) |
Tokenize a string separating by space characters. | |
void | getcalendar (int64_t t, int32_t jl, int32_t *yearp=NULL, int32_t *monp=NULL, int32_t *dayp=NULL, int32_t *hourp=NULL, int32_t *minp=NULL, int32_t *secp=NULL) |
Get the Gregorian calendar of a time. | |
void | datestrwww (int64_t t, int32_t jl, char *buf) |
Format a date as a string in W3CDTF. | |
void | datestrwww (double t, int32_t jl, int32_t acr, char *buf) |
Format a date as a string in W3CDTF with the fraction part. | |
void | datestrhttp (int64_t t, int32_t jl, char *buf) |
Format a date as a string in RFC 1123 format. | |
int64_t | strmktime (const char *str) |
Get the time value of a date string. | |
int32_t | jetlag () |
Get the jet lag of the local time. | |
int32_t | dayofweek (int32_t year, int32_t mon, int32_t day) |
Get the day of week of a date. | |
bool | getlocaltime (time_t time, struct std::tm *result) |
Get the local time of a time. | |
bool | getgmtime (time_t time, struct std::tm *result) |
Get the GMT local time of a time. | |
time_t | mkgmtime (struct std::tm *tm) |
Make the GMT from a time structure. | |
Variables | |
const char *const | KTDBINITNAME = "ktdbinit" |
The name of the initializer function. | |
const char *const | KTSERVINITNAME = "ktservinit" |
The name of the initializer function. | |
const char *const | VERSION |
The package version. | |
const int32_t | LIBVER |
The library version. | |
const int32_t | LIBREV |
The library revision. | |
const char *const | FEATURES |
The extra feature list. | |
const int32_t | DEFPORT = 1978 |
The default port number. |
All symbols of Kyoto Tycoon.
Common namespace of Kyoto Tycoon.
typedef PluggableDB*(* kyototycoon::KTDBINIT)() |
Initializer of a database implementation.
typedef PluggableServer*(* kyototycoon::KTSERVINIT)() |
Initializer of a server implementation.
bool kyototycoon::setkillsignalhandler | ( | void(*)(int) | handler | ) |
Set the signal handler for termination signals.
handler | the function pointer of the signal handler. |
bool kyototycoon::maskthreadsignal | ( | ) |
Set the signal mask of the current to ignore all.
bool kyototycoon::daemonize | ( | ) |
Switch the process into the background.
int32_t kyototycoon::executecommand | ( | const std::vector< std::string > & | args | ) |
Execute a shell command.
args | an array of the command name and its arguments. |
const char * kyototycoon::strmapget | ( | const std::map< std::string, std::string > & | map, |
const char * | key, | ||
size_t * | sp = NULL |
||
) |
Get the C-style string value of a record in a string map.
map | the target string map. |
key | the key. |
sp | the pointer to the variable into which the size of the region of the return value is assigned. If it is NULL, it is ignored. |
void kyototycoon::printstrvec | ( | const std::vector< std::string > & | vec, |
std::ostream & | strm = std::cout |
||
) |
Print all records in a string vector.
vec | the target string vector. |
strm | the output stream. |
void kyototycoon::printstrmap | ( | const std::map< std::string, std::string > & | map, |
std::ostream & | strm = std::cout |
||
) |
Print all records in a string map.
map | the target string map. |
strm | the output stream. |
void kyototycoon::urlbreak | ( | const char * | url, |
std::map< std::string, std::string > * | elems | ||
) |
Break up a URL into elements.
url | the URL string. |
elems | the map object to contain the result elements. The key "self" indicates the URL itself. "scheme" indicates the scheme. "host" indicates the host of the server. "port" indicates the port number of the server. "authority" indicates the authority information. "path" indicates the path of the resource. "file" indicates the file name without the directory section. "query" indicates the query string. "fragment" indicates the fragment string. |
char * kyototycoon::xmlescape | ( | const char * | str | ) |
Escape meta characters in a string with the entity references of XML.
str | the string. |
char * kyototycoon::xmlunescape | ( | const char * | str | ) |
Unescape meta characters in a string with the entity references of XML.
str | the string. |
void kyototycoon::wwwformtomap | ( | const std::string & | str, |
std::map< std::string, std::string > * | map | ||
) |
Parse a www-form-urlencoded string and store each records into a map.
str | the source string. |
map | the destination string map. |
void kyototycoon::maptowwwform | ( | const std::map< std::string, std::string > & | map, |
std::string * | str | ||
) |
Serialize a string map into a www-form-urlencoded string.
map | the source string map. |
str | the destination string. |
void kyototycoon::tsvtomap | ( | const std::string & | str, |
std::map< std::string, std::string > * | map | ||
) |
Parse a TSV string and store each records into a map.
str | the source string. |
map | the destination string map. |
void kyototycoon::maptotsv | ( | const std::map< std::string, std::string > & | map, |
std::string * | str | ||
) |
Serialize a string map into a TSV string.
map | the source string map. |
str | the destination string. |
void kyototycoon::tsvmapencode | ( | std::map< std::string, std::string > * | map, |
int32_t | mode | ||
) |
Encode each record of a string map.
map | the string map. |
mode | the encoding mode. 'B' for Base64 encoding, 'Q' for Quoted-printable encoding, 'U' for URL encoding. |
void kyototycoon::tsvmapdecode | ( | std::map< std::string, std::string > * | map, |
int32_t | mode | ||
) |
Decode each record of a string map.
map | the string map. |
mode | the encoding mode. 'B' for Base64 encoding, 'Q' for Quoted-printable encoding, 'U' for URL encoding. |
int32_t kyototycoon::checkmapenc | ( | const std::map< std::string, std::string > & | map | ) |
Check the best suited encoding of a string map.
map | the string map. |
char * kyototycoon::strcapitalize | ( | char * | str | ) |
Capitalize letters of a string.
str | the string to convert. |
bool kyototycoon::strisalnum | ( | const char * | str | ) |
Check a string is composed of alphabets or numbers only.
void kyototycoon::strtokenize | ( | const char * | str, |
std::vector< std::string > * | tokens | ||
) |
Tokenize a string separating by space characters.
str | the source string. |
tokens | a string vector to contain the result tokens. |
void kyototycoon::getcalendar | ( | int64_t | t, |
int32_t | jl, | ||
int32_t * | yearp = NULL , |
||
int32_t * | monp = NULL , |
||
int32_t * | dayp = NULL , |
||
int32_t * | hourp = NULL , |
||
int32_t * | minp = NULL , |
||
int32_t * | secp = NULL |
||
) |
Get the Gregorian calendar of a time.
t | the source time in seconds from the epoch. If it is kyotocabinet::INT64MAX, the current time is specified. |
jl | the jet lag of a location in seconds. If it is kyotocabinet::INT32MAX, the local jet lag is specified. |
yearp | the pointer to a variable to which the year is assigned. If it is NULL, it is not used. |
monp | the pointer to a variable to which the month is assigned. If it is NULL, it is not used. 1 means January and 12 means December. |
dayp | the pointer to a variable to which the day of the month is assigned. If it is NULL, it is not used. |
hourp | the pointer to a variable to which the hours is assigned. If it is NULL, it is not used. |
minp | the pointer to a variable to which the minutes is assigned. If it is NULL, it is not used. |
secp | the pointer to a variable to which the seconds is assigned. If it is NULL, it is not used. |
void kyototycoon::datestrwww | ( | int64_t | t, |
int32_t | jl, | ||
char * | buf | ||
) |
Format a date as a string in W3CDTF.
t | the source time in seconds from the epoch. If it is kyotocabinet::INT64MAX, the current time is specified. |
jl | the jet lag of a location in seconds. If it is kyotocabinet::INT32MAX, the local jet lag is specified. |
buf | the pointer to the region into which the result string is written. The size of the buffer should be equal to or more than 48 bytes. |
void kyototycoon::datestrwww | ( | double | t, |
int32_t | jl, | ||
int32_t | acr, | ||
char * | buf | ||
) |
Format a date as a string in W3CDTF with the fraction part.
t | the source time in seconds from the epoch. If it is Not-a-Number, the current time is specified. |
jl | the jet lag of a location in seconds. If it is kyotocabinet::INT32MAX, the local jet lag is specified. |
acr | the accuracy of time by the number of columns of the fraction part. |
buf | the pointer to the region into which the result string is written. The size of the buffer should be equal to or more than 48 bytes. |
void kyototycoon::datestrhttp | ( | int64_t | t, |
int32_t | jl, | ||
char * | buf | ||
) |
Format a date as a string in RFC 1123 format.
t | the source time in seconds from the epoch. If it is kyotocabinet::INT64MAX, the current time is specified. |
jl | the jet lag of a location in seconds. If it is kyotocabinet::INT32MAX, the local jet lag is specified. |
buf | the pointer to the region into which the result string is written. The size of the buffer should be equal to or more than 48 bytes. |
int64_t kyototycoon::strmktime | ( | const char * | str | ) |
Get the time value of a date string.
str | the date string in decimal, hexadecimal, W3CDTF, or RFC 822 (1123). Decimal can be trailed by "s" for in seconds, "m" for in minutes, "h" for in hours, and "d" for in days. |
int32_t kyototycoon::jetlag | ( | ) |
Get the jet lag of the local time.
int32_t kyototycoon::dayofweek | ( | int32_t | year, |
int32_t | mon, | ||
int32_t | day | ||
) |
Get the day of week of a date.
year | the year of a date. |
mon | the month of the date. |
day | the day of the date. |
bool kyototycoon::getlocaltime | ( | time_t | time, |
struct std::tm * | result | ||
) |
Get the local time of a time.
time | the time. |
result | the resulb buffer. |
bool kyototycoon::getgmtime | ( | time_t | time, |
struct std::tm * | result | ||
) |
Get the GMT local time of a time.
time | the time. |
result | the resulb buffer. |
time_t kyototycoon::mkgmtime | ( | struct std::tm * | tm | ) |
Make the GMT from a time structure.
tm | the pointer to the time structure. |
const char* const kyototycoon::KTDBINITNAME = "ktdbinit" |
The name of the initializer function.
const char* const kyototycoon::KTSERVINITNAME = "ktservinit" |
The name of the initializer function.
const char* const kyototycoon::VERSION |
The package version.
const int32_t kyototycoon::LIBVER |
The library version.
const int32_t kyototycoon::LIBREV |
The library revision.
const char* const kyototycoon::FEATURES |
The extra feature list.
const int32_t kyototycoon::DEFPORT = 1978 |
The default port number.