Merge in laptops efforts for extending pool/documenting more of it.
[awesomized/libmemcached] / docs / man / libmemcached_configuration.3
1 .TH "LIBMEMCACHED_CONFIGURATION" "3" "April 10, 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 .INDENT 0.0
35 .TP
36 .B memcached_st *memcached_create_with_options(const char\fI\ *string\fP, size_t\fI\ string_length\fP)
37 .UNINDENT
38 .INDENT 0.0
39 .TP
40 .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)
41 .UNINDENT
42 .sp
43 Compile and link with \-lmemcached
44 .SH DESCRIPTION
45 .sp
46 Libmemcached implements a custom language for configuring and modifying
47 servers. By passing in an option string you can generate a memcached_st object
48 that you can use in your application directly.
49 .INDENT 0.0
50 .TP
51 .B \-\-SERVER=<servername>:<optional_port>/?<optional_weight>
52 .UNINDENT
53 .sp
54 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.
55 .INDENT 0.0
56 .TP
57 .B \-\-VERIFY\-KEY
58 .UNINDENT
59 .sp
60 Verify that keys that are being used fit within the design of the protocol being used.
61 .INDENT 0.0
62 .TP
63 .B \-\-REMOVE_FAILED_SERVERS
64 .UNINDENT
65 .sp
66 Enable the behavior MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS.
67 .INDENT 0.0
68 .TP
69 .B \-\-BINARY\-PROTOCOL
70 .UNINDENT
71 .sp
72 Force all connections to use the binary protocol.
73 .INDENT 0.0
74 .TP
75 .B \-\-BUFFER\-REQUESTS
76 .UNINDENT
77 .sp
78 Enable MEMCACHED_BEHAVIOR_BUFFER_REQUESTS.
79 .INDENT 0.0
80 .TP
81 .B \-\-CONFIGURE\-FILE=
82 .UNINDENT
83 .sp
84 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.
85 .INDENT 0.0
86 .TP
87 .B \-\-CONNECT\-TIMEOUT=
88 .UNINDENT
89 .sp
90 Enable MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT.
91 .INDENT 0.0
92 .TP
93 .B \-\-DISTRIBUTION=
94 .UNINDENT
95 .sp
96 Set the distribution model used by the client. See :manpage:\(ga\(ga for more details.
97 .INDENT 0.0
98 .TP
99 .B \-\-HASH=
100 .UNINDENT
101 .sp
102 Set the hashing alogrthm used for placing keys on servers.
103 .INDENT 0.0
104 .TP
105 .B \-\-HASH\-WITH\-PREFIX_KEY
106 .UNINDENT
107 .INDENT 0.0
108 .TP
109 .B \-\-IO\-BYTES\-WATERMARK=
110 .UNINDENT
111 .INDENT 0.0
112 .TP
113 .B \-\-IO\-KEY\-PREFETCH=
114 .UNINDENT
115 .INDENT 0.0
116 .TP
117 .B \-\-IO\-MSG\-WATERMARK=
118 .UNINDENT
119 .INDENT 0.0
120 .TP
121 .B \-\-NOREPLY
122 .UNINDENT
123 .INDENT 0.0
124 .TP
125 .B \-\-NUMBER\-OF\-REPLICAS=
126 .UNINDENT
127 .sp
128 Set the nummber of servers that keys will be replicated to.
129 .INDENT 0.0
130 .TP
131 .B \-\-POLL\-TIMEOUT=
132 .UNINDENT
133 .INDENT 0.0
134 .TP
135 .B \-\-RANDOMIZE\-REPLICA\-READ
136 .UNINDENT
137 .sp
138 Select randomly the server within the replication pool to read from.
139 .INDENT 0.0
140 .TP
141 .B \-\-RCV\-TIMEOUT=
142 .UNINDENT
143 .INDENT 0.0
144 .TP
145 .B \-\-RETRY\-TIMEOUT=
146 .UNINDENT
147 .sp
148 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
149 .INDENT 0.0
150 .TP
151 .B \-\-SERVER\-FAILURE\-LIMIT=
152 .UNINDENT
153 .sp
154 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
155 .INDENT 0.0
156 .TP
157 .B \-\-SND\-TIMEOUT=
158 .UNINDENT
159 .sp
160 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SND_TIMEOUT
161 .INDENT 0.0
162 .TP
163 .B \-\-SOCKET\-RECV\-SIZE=
164 .UNINDENT
165 .sp
166 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
167 .INDENT 0.0
168 .TP
169 .B \-\-SOCKET\-SEND\-SIZE=
170 .UNINDENT
171 .sp
172 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
173 .INDENT 0.0
174 .TP
175 .B \-\-SORT\-HOSTS
176 .UNINDENT
177 .sp
178 When adding new servers always calculate their distribution based on sorted naming order.
179 .INDENT 0.0
180 .TP
181 .B \-\-SUPPORT\-CAS
182 .UNINDENT
183 .sp
184 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SUPPORT_CAS
185 .INDENT 0.0
186 .TP
187 .B \-\-TCP\-NODELAY
188 .UNINDENT
189 .sp
190 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_NODELAY
191 .INDENT 0.0
192 .TP
193 .B \-\-TCP\-KEEPALIVE
194 .UNINDENT
195 .sp
196 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_KEEPALIVE
197 .INDENT 0.0
198 .TP
199 .B \-\-TCP\-KEEPIDLE
200 .UNINDENT
201 .INDENT 0.0
202 .TP
203 .B \-\-USE\-UDP
204 .UNINDENT
205 .sp
206 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_USE_UDP
207 .INDENT 0.0
208 .TP
209 .B \-\-PREFIX\-KEY=
210 .UNINDENT
211 .INDENT 0.0
212 .TP
213 .B INCLUDE
214 .UNINDENT
215 .sp
216 Include a file in configuration. Unlike \-\-CONFIGURE\-FILE= this will not reset memcached_st
217 .INDENT 0.0
218 .TP
219 .B RESET
220 .UNINDENT
221 .sp
222 Reset memcached_st and continue to process.
223 .INDENT 0.0
224 .TP
225 .B END
226 .UNINDENT
227 .sp
228 End configutation processing.
229 .INDENT 0.0
230 .TP
231 .B ERROR
232 .UNINDENT
233 .sp
234 End configutation processing and throw an error.
235 .SH RETURN
236 .sp
237 memcached_create_with_options() returns a pointer to the memcached_st that was
238 created (or initialized). On an allocation failure, it returns NULL.
239 .SH EXAMPLE
240 .sp
241 .nf
242 .ft C
243 const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com"
244 memcached_st *memc= memcached_create_with_options(config_string, strlen(config_string);
245 {
246 ...
247 }
248 memcached_free(memc);
249 .ft P
250 .fi
251 .SH HOME
252 .sp
253 To find out more information please check:
254 \fI\%https://launchpad.net/libmemcached\fP
255 .SH SEE ALSO
256 .sp
257 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
258 .SH AUTHOR
259 Brian Aker
260 .SH COPYRIGHT
261 2011, Brian Aker DataDifferential, http://datadifferential.com/
262 .\" Generated by docutils manpage writer.
263 .\"
264 .