c0d53dff6fda6bb9ee433217e4095231f29a0105
[awesomized/libmemcached] / docs / source / libmemcached / constants.rst
1 libmemcached Constants and Defaults
2 ===================================
3
4 SYNOPSIS
5 --------
6
7 #include <libmemcached-1.0/memcached.h>
8 Compile and link with -lmemcached
9
10 .. c:macro:: LIBMEMCACHED_VERSION_STRING
11
12 String value of libmemcached version such as "1.23.4"
13
14 .. c:macro:: LIBMEMCACHED_VERSION_HEX
15
16 Hex value of the version number. "0x00048000" This can be used for comparing
17 versions based on number.
18
19
20 .. c:macro:: MEMCACHED_DEFAULT_PORT
21
22 The default port used by `memcached`.
23
24 .. c:macro:: MEMCACHED_DEFAULT_TIMEOUT
25
26 Default timeout of 5000 milliseconds.
27
28 .. c:macro:: MEMCACHED_DEFAULT_CONNECT_TIMEOUT
29
30 Default connect timeout of 4000 milliseconds.
31
32
33 .. c:macro:: MEMCACHED_MAX_BUFFER
34
35 Default size of read/write buffers (which includes the null pointer).
36
37 .. c:macro:: MEMCACHED_MAX_KEY
38
39 Default maximum size of a key (which includes the null pointer). Master keys
40 have no limit, this only applies to keys used for storage.
41
42 .. c:macro:: MEMCACHED_MAX_NAMESPACE
43
44 Maximum length allowed for namespacing of a key. Defaults to 128.
45
46
47 .. c:macro:: MEMCACHED_MAX_HOST_LENGTH
48
49 Maximum allowed length of the hostname.
50
51 .. c:macro:: MEMCACHED_MAX_HOST_SORT_LENGTH
52
53 Length of the host string used for sorting. Used for Ketama.
54
55 .. c:macro:: MEMCACHED_MAX_INTEGER_DISPLAY_LENGTH
56
57 Maximum display width of an integer represented as string.
58
59
60 .. c:macro:: MEMCACHED_CONTINUUM_ADDITION
61
62 How many extra slots we should build for in the continuum, defaults to 10.
63
64 .. c:macro:: MEMCACHED_STRIDE
65
66 This is the "stride" used in the consistent hash used between replicas.
67
68
69 .. c:macro:: MEMCACHED_SERVER_FAILURE_LIMIT
70
71 Value 5
72
73 .. c:macro:: MEMCACHED_SERVER_FAILURE_RETRY_TIMEOUT
74
75 Value 2
76
77 .. c:macro:: MEMCACHED_SERVER_FAILURE_DEAD_TIMEOUT
78
79 Value 0
80
81
82 .. c:macro:: MEMCACHED_VERSION_STRING_LENGTH
83
84 Value 24
85
86 DESCRIPTION
87 -----------
88
89 These compile time defaults are provided by `libmemcached` for convenience.