Merge in m4 to not build memaslap by default.
[awesomized/libmemcached] / docs / man / libmemcached_configuration.3
1 .TH "LIBMEMCACHED_CONFIGURATION" "3" "May 23, 2011" "0.47" "libmemcached"
2 .SH NAME
3 libmemcached_configuration \- libmemcached Documentation
4 .
5 .nr rst2man-indent-level 0
6 .
7 .de1 rstReportMargin
8 \\$1 \\n[an-margin]
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11 -
12 \\n[rst2man-indent0]
13 \\n[rst2man-indent1]
14 \\n[rst2man-indent2]
15 ..
16 .de1 INDENT
17 .\" .rstReportMargin pre:
18 . RS \\$1
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
22 ..
23 .de UNINDENT
24 . RE
25 .\" indent \\n[an-margin]
26 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27 .nr rst2man-indent-level -1
28 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30 ..
31 .\" Man page generated from reStructeredText.
32 .
33 .SH SYNOPSIS
34 .sp
35 #include <libmemcached/memcached.h>
36 .INDENT 0.0
37 .TP
38 .B memcached_st *memcached(const char\fI\ *string\fP, size_t\fI\ string_length\fP)
39 .UNINDENT
40 .INDENT 0.0
41 .TP
42 .B memcached_return_t libmemcached_check_configuration(const char\fI\ *option_string\fP, size_t\fI\ length\fP, char\fI\ *error_buffer\fP, size_t\fI\ error_buffer_size\fP)
43 .UNINDENT
44 .sp
45 Compile and link with \-lmemcached
46 .SH DESCRIPTION
47 .sp
48 Libmemcached implements a custom language for configuring and modifying
49 servers. By passing in an option string you can generate a memcached_st object
50 that you can use in your application directly.
51 .INDENT 0.0
52 .TP
53 .B \-\-SERVER=<servername>:<optional_port>/?<optional_weight>
54 .UNINDENT
55 .sp
56 Provide a servername to be used by the client. Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1.
57 .INDENT 0.0
58 .TP
59 .B \-\-VERIFY\-KEY
60 .UNINDENT
61 .sp
62 Verify that keys that are being used fit within the design of the protocol being used.
63 .INDENT 0.0
64 .TP
65 .B \-\-REMOVE_FAILED_SERVERS
66 .UNINDENT
67 .sp
68 Enable the behavior MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS.
69 .INDENT 0.0
70 .TP
71 .B \-\-BINARY\-PROTOCOL
72 .UNINDENT
73 .sp
74 Force all connections to use the binary protocol.
75 .INDENT 0.0
76 .TP
77 .B \-\-BUFFER\-REQUESTS
78 .UNINDENT
79 .sp
80 Enable MEMCACHED_BEHAVIOR_BUFFER_REQUESTS.
81 .INDENT 0.0
82 .TP
83 .B \-\-CONFIGURE\-FILE=
84 .UNINDENT
85 .sp
86 Provide a configuration file to be used to load requests. Beware that by using a configuration file libmemcached will reset memcached_st based on information only contained in the file.
87 .INDENT 0.0
88 .TP
89 .B \-\-CONNECT\-TIMEOUT=
90 .UNINDENT
91 .sp
92 Enable MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT.
93 .INDENT 0.0
94 .TP
95 .B \-\-DISTRIBUTION=
96 .UNINDENT
97 .sp
98 Set the distribution model used by the client. See :manpage:\(ga\(ga for more details.
99 .INDENT 0.0
100 .TP
101 .B \-\-HASH=
102 .UNINDENT
103 .sp
104 Set the hashing alogrthm used for placing keys on servers.
105 .INDENT 0.0
106 .TP
107 .B \-\-HASH\-WITH\-NAMESPACE
108 .UNINDENT
109 .sp
110 When enabled the prefix key will be added to the key when determining which
111 server to store the data in.
112 .INDENT 0.0
113 .TP
114 .B \-\-NOREPLY
115 .UNINDENT
116 .sp
117 Enable "no reply" for all calls that support this. It is highly recommended
118 that you use this option with the binary protocol only.
119 .INDENT 0.0
120 .TP
121 .B \-\-NUMBER\-OF\-REPLICAS=
122 .UNINDENT
123 .sp
124 Set the nummber of servers that keys will be replicated to.
125 .INDENT 0.0
126 .TP
127 .B \-\-RANDOMIZE\-REPLICA\-READ
128 .UNINDENT
129 .sp
130 Select randomly the server within the replication pool to read from.
131 .INDENT 0.0
132 .TP
133 .B \-\-SORT\-HOSTS
134 .UNINDENT
135 .sp
136 When adding new servers always calculate their distribution based on sorted naming order.
137 .INDENT 0.0
138 .TP
139 .B \-\-SUPPORT\-CAS
140 .UNINDENT
141 .sp
142 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SUPPORT_CAS
143 .INDENT 0.0
144 .TP
145 .B \-\-USE\-UDP
146 .UNINDENT
147 .sp
148 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_USE_UDP
149 .INDENT 0.0
150 .TP
151 .B \-\-NAMESPACE=
152 .UNINDENT
153 .sp
154 A namespace is a container that provides context for keys, only other
155 requests that know the namespace can access these values. This is
156 accomplished by prepending the namespace value to all keys.
157 .SS Mecached Pool Options:
158 .INDENT 0.0
159 .TP
160 .B \-\-POOL\-MIN
161 .UNINDENT
162 .sp
163 Initial size of pool.
164 .INDENT 0.0
165 .TP
166 .B \-\-POOL\-MAX
167 .UNINDENT
168 .sp
169 Maximize size of the pool.
170 .SS I/O Options:
171 .INDENT 0.0
172 .TP
173 .B \-\-TCP\-NODELAY
174 .UNINDENT
175 .sp
176 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_NODELAY
177 .INDENT 0.0
178 .TP
179 .B \-\-TCP\-KEEPALIVE
180 .UNINDENT
181 .sp
182 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_KEEPALIVE
183 .INDENT 0.0
184 .TP
185 .B \-\-RETRY\-TIMEOUT=
186 .UNINDENT
187 .sp
188 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
189 .INDENT 0.0
190 .TP
191 .B \-\-SERVER\-FAILURE\-LIMIT=
192 .UNINDENT
193 .sp
194 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
195 .INDENT 0.0
196 .TP
197 .B \-\-SND\-TIMEOUT=
198 .UNINDENT
199 .sp
200 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SND_TIMEOUT
201 .INDENT 0.0
202 .TP
203 .B \-\-SOCKET\-RECV\-SIZE=
204 .UNINDENT
205 .sp
206 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
207 .INDENT 0.0
208 .TP
209 .B \-\-SOCKET\-SEND\-SIZE=
210 .UNINDENT
211 .sp
212 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
213 .INDENT 0.0
214 .TP
215 .B \-\-POLL\-TIMEOUT=
216 .UNINDENT
217 .sp
218 That sets the value of the timeout used by :manpage: \fIpoll()\fP.
219 .INDENT 0.0
220 .TP
221 .B \-\-IO\-BYTES\-WATERMARK=
222 .UNINDENT
223 .INDENT 0.0
224 .TP
225 .B \-\-IO\-KEY\-PREFETCH=
226 .UNINDENT
227 .INDENT 0.0
228 .TP
229 .B \-\-IO\-MSG\-WATERMARK=
230 .UNINDENT
231 .INDENT 0.0
232 .TP
233 .B \-\-TCP\-KEEPIDLE
234 .UNINDENT
235 .INDENT 0.0
236 .TP
237 .B \-\-RCV\-TIMEOUT=
238 .UNINDENT
239 .SS Other:
240 .INDENT 0.0
241 .TP
242 .B INCLUDE
243 .UNINDENT
244 .sp
245 Include a file in configuration. Unlike \-\-CONFIGURE\-FILE= this will not reset memcached_st
246 .INDENT 0.0
247 .TP
248 .B RESET
249 .UNINDENT
250 .sp
251 Reset memcached_st and continue to process.
252 .INDENT 0.0
253 .TP
254 .B END
255 .UNINDENT
256 .sp
257 End configutation processing.
258 .INDENT 0.0
259 .TP
260 .B ERROR
261 .UNINDENT
262 .sp
263 End configutation processing and throw an error.
264 .SH RETURN
265 .sp
266 memcached() returns a pointer to the memcached_st that was
267 created (or initialized). On an allocation failure, it returns NULL.
268 .SH EXAMPLE
269 .sp
270 .nf
271 .ft C
272 const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com"
273 memcached_st *memc= memcached(config_string, strlen(config_string);
274 {
275 ...
276 }
277 memcached_free(memc);
278 .ft P
279 .fi
280 .SH HOME
281 .sp
282 To find out more information please check:
283 \fI\%http://libmemcached.org/\fP
284 .SH SEE ALSO
285 .sp
286 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
287 .SH AUTHOR
288 Brian Aker
289 .SH COPYRIGHT
290 2011, Brian Aker DataDifferential, http://datadifferential.com/
291 .\" Generated by docutils manpage writer.
292 .\"
293 .