Merge pull request #140 from hussainnaqvee/patch-1
[awesomized/libmemcached] / libmemcached / constants.rst
1 libmemcached Constants and Defaults
2 ===================================
3
4 SYNOPSIS
5 --------
6
7 #include <libmemcached-|libmemcached_version|/memcached.h>
8 Compile and link with -lmemcached
9
10 .. c:macro:: LIBMEMCACHED_VERSION_STRING
11
12 String value of libmemcached version such as "|release|"
13
14 .. c:macro:: LIBMEMCACHED_VERSION_HEX
15
16 Hex value of the version number, e.g. "0x00048000".
17 This can be used for comparing 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_EXPIRATION_NOT_ADD
65
66 Value ``0xffffffffU``
67
68 .. c:macro:: MEMCACHED_STRIDE
69
70 This is the "stride" used in the consistent hash used between replicas.
71
72
73 .. c:macro:: MEMCACHED_SERVER_FAILURE_LIMIT
74
75 Value 5
76
77 .. c:macro:: MEMCACHED_SERVER_FAILURE_RETRY_TIMEOUT
78
79 Value 2
80
81 .. c:macro:: MEMCACHED_SERVER_FAILURE_DEAD_TIMEOUT
82
83 Value 0
84
85
86 .. c:macro:: MEMCACHED_VERSION_STRING_LENGTH
87
88 Value 24
89
90 DESCRIPTION
91 -----------
92
93 These compile time defaults are provided by `libmemcached` for convenience.