Add docs for tap, and update all other documentation.
[m6w6/libmemcached] / docs / man / memcached_create_with_options.3
1 .TH "MEMCACHED_CREATE_WITH_OPTIONS" "3" "April 11, 2011" "0.47" "libmemcached"
2 .SH NAME
3 memcached_create_with_options \- 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\-NAMESPACE
106 .UNINDENT
107 .sp
108 When enabled the prefix key will be added to the key when determining which
109 server to store the data in.
110 .INDENT 0.0
111 .TP
112 .B \-\-NOREPLY
113 .UNINDENT
114 .sp
115 Enable "no reply" for all calls that support this. It is highly recommended
116 that you use this option with the binary protocol only.
117 .INDENT 0.0
118 .TP
119 .B \-\-NUMBER\-OF\-REPLICAS=
120 .UNINDENT
121 .sp
122 Set the nummber of servers that keys will be replicated to.
123 .INDENT 0.0
124 .TP
125 .B \-\-RANDOMIZE\-REPLICA\-READ
126 .UNINDENT
127 .sp
128 Select randomly the server within the replication pool to read from.
129 .INDENT 0.0
130 .TP
131 .B \-\-SORT\-HOSTS
132 .UNINDENT
133 .sp
134 When adding new servers always calculate their distribution based on sorted naming order.
135 .INDENT 0.0
136 .TP
137 .B \-\-SUPPORT\-CAS
138 .UNINDENT
139 .sp
140 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SUPPORT_CAS
141 .INDENT 0.0
142 .TP
143 .B \-\-USE\-UDP
144 .UNINDENT
145 .sp
146 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_USE_UDP
147 .INDENT 0.0
148 .TP
149 .B \-\-NAMESPACE=
150 .UNINDENT
151 .sp
152 A namespace is a container that provides context for keys, only other
153 requests that know the namespace can access these values. This is
154 accomplished by prepending the namespace value to all keys.
155 .SS I/O Options:
156 .INDENT 0.0
157 .TP
158 .B \-\-TCP\-NODELAY
159 .UNINDENT
160 .sp
161 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_NODELAY
162 .INDENT 0.0
163 .TP
164 .B \-\-TCP\-KEEPALIVE
165 .UNINDENT
166 .sp
167 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_KEEPALIVE
168 .INDENT 0.0
169 .TP
170 .B \-\-RETRY\-TIMEOUT=
171 .UNINDENT
172 .sp
173 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
174 .INDENT 0.0
175 .TP
176 .B \-\-SERVER\-FAILURE\-LIMIT=
177 .UNINDENT
178 .sp
179 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
180 .INDENT 0.0
181 .TP
182 .B \-\-SND\-TIMEOUT=
183 .UNINDENT
184 .sp
185 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SND_TIMEOUT
186 .INDENT 0.0
187 .TP
188 .B \-\-SOCKET\-RECV\-SIZE=
189 .UNINDENT
190 .sp
191 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
192 .INDENT 0.0
193 .TP
194 .B \-\-SOCKET\-SEND\-SIZE=
195 .UNINDENT
196 .sp
197 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
198 .INDENT 0.0
199 .TP
200 .B \-\-POLL\-TIMEOUT=
201 .UNINDENT
202 .sp
203 That sets the value of the timeout used by :manpage: \fIpoll()\fP.
204 .INDENT 0.0
205 .TP
206 .B \-\-IO\-BYTES\-WATERMARK=
207 .UNINDENT
208 .INDENT 0.0
209 .TP
210 .B \-\-IO\-KEY\-PREFETCH=
211 .UNINDENT
212 .INDENT 0.0
213 .TP
214 .B \-\-IO\-MSG\-WATERMARK=
215 .UNINDENT
216 .INDENT 0.0
217 .TP
218 .B \-\-TCP\-KEEPIDLE
219 .UNINDENT
220 .INDENT 0.0
221 .TP
222 .B \-\-RCV\-TIMEOUT=
223 .UNINDENT
224 .SS Other:
225 .INDENT 0.0
226 .TP
227 .B INCLUDE
228 .UNINDENT
229 .sp
230 Include a file in configuration. Unlike \-\-CONFIGURE\-FILE= this will not reset memcached_st
231 .INDENT 0.0
232 .TP
233 .B RESET
234 .UNINDENT
235 .sp
236 Reset memcached_st and continue to process.
237 .INDENT 0.0
238 .TP
239 .B END
240 .UNINDENT
241 .sp
242 End configutation processing.
243 .INDENT 0.0
244 .TP
245 .B ERROR
246 .UNINDENT
247 .sp
248 End configutation processing and throw an error.
249 .SH RETURN
250 .sp
251 memcached_create_with_options() returns a pointer to the memcached_st that was
252 created (or initialized). On an allocation failure, it returns NULL.
253 .SH EXAMPLE
254 .sp
255 .nf
256 .ft C
257 const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com"
258 memcached_st *memc= memcached_create_with_options(config_string, strlen(config_string);
259 {
260 ...
261 }
262 memcached_free(memc);
263 .ft P
264 .fi
265 .SH HOME
266 .sp
267 To find out more information please check:
268 \fI\%https://launchpad.net/libmemcached\fP
269 .SH SEE ALSO
270 .sp
271 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
272 .SH AUTHOR
273 Brian Aker
274 .SH COPYRIGHT
275 2011, Brian Aker DataDifferential, http://datadifferential.com/
276 .\" Generated by docutils manpage writer.
277 .\"
278 .