~piotr-sikora/libmemcached/fix-tests-on-openbsd

« back to all changes in this revision

Viewing changes to docs/man/memcached_create_with_options.3

  • Committer: Brian Aker
  • Date: 2011-04-13 23:29:06 UTC
  • mfrom: (929.1.76 libmemcached-build)
  • Revision ID: brian@tangent.org-20110413232906-il9duitw7q33gick
Merge in cleanup on the parser API.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "MEMCACHED_CREATE_WITH_OPTIONS" "3" "April 12, 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 Mecached Pool Options:
156
 
.INDENT 0.0
157
 
.TP
158
 
.B \-\-POOL\-MIN
159
 
.UNINDENT
160
 
.sp
161
 
Initial size of pool.
162
 
.INDENT 0.0
163
 
.TP
164
 
.B \-\-POOL\-MAX
165
 
.UNINDENT
166
 
.sp
167
 
Maximize size of the pool.
168
 
.SS I/O Options:
169
 
.INDENT 0.0
170
 
.TP
171
 
.B \-\-TCP\-NODELAY
172
 
.UNINDENT
173
 
.sp
174
 
See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_NODELAY
175
 
.INDENT 0.0
176
 
.TP
177
 
.B \-\-TCP\-KEEPALIVE
178
 
.UNINDENT
179
 
.sp
180
 
See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_KEEPALIVE
181
 
.INDENT 0.0
182
 
.TP
183
 
.B \-\-RETRY\-TIMEOUT=
184
 
.UNINDENT
185
 
.sp
186
 
See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
187
 
.INDENT 0.0
188
 
.TP
189
 
.B \-\-SERVER\-FAILURE\-LIMIT=
190
 
.UNINDENT
191
 
.sp
192
 
See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
193
 
.INDENT 0.0
194
 
.TP
195
 
.B \-\-SND\-TIMEOUT=
196
 
.UNINDENT
197
 
.sp
198
 
See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SND_TIMEOUT
199
 
.INDENT 0.0
200
 
.TP
201
 
.B \-\-SOCKET\-RECV\-SIZE=
202
 
.UNINDENT
203
 
.sp
204
 
See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
205
 
.INDENT 0.0
206
 
.TP
207
 
.B \-\-SOCKET\-SEND\-SIZE=
208
 
.UNINDENT
209
 
.sp
210
 
See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
211
 
.INDENT 0.0
212
 
.TP
213
 
.B \-\-POLL\-TIMEOUT=
214
 
.UNINDENT
215
 
.sp
216
 
That sets the value of the timeout used by :manpage: \fIpoll()\fP.
217
 
.INDENT 0.0
218
 
.TP
219
 
.B \-\-IO\-BYTES\-WATERMARK=
220
 
.UNINDENT
221
 
.INDENT 0.0
222
 
.TP
223
 
.B \-\-IO\-KEY\-PREFETCH=
224
 
.UNINDENT
225
 
.INDENT 0.0
226
 
.TP
227
 
.B \-\-IO\-MSG\-WATERMARK=
228
 
.UNINDENT
229
 
.INDENT 0.0
230
 
.TP
231
 
.B \-\-TCP\-KEEPIDLE
232
 
.UNINDENT
233
 
.INDENT 0.0
234
 
.TP
235
 
.B \-\-RCV\-TIMEOUT=
236
 
.UNINDENT
237
 
.SS Other:
238
 
.INDENT 0.0
239
 
.TP
240
 
.B INCLUDE
241
 
.UNINDENT
242
 
.sp
243
 
Include a file in configuration. Unlike \-\-CONFIGURE\-FILE= this will not reset memcached_st
244
 
.INDENT 0.0
245
 
.TP
246
 
.B RESET
247
 
.UNINDENT
248
 
.sp
249
 
Reset memcached_st and continue to process.
250
 
.INDENT 0.0
251
 
.TP
252
 
.B END
253
 
.UNINDENT
254
 
.sp
255
 
End configutation processing.
256
 
.INDENT 0.0
257
 
.TP
258
 
.B ERROR
259
 
.UNINDENT
260
 
.sp
261
 
End configutation processing and throw an error.
262
 
.SH RETURN
263
 
.sp
264
 
memcached_create_with_options() returns a pointer to the memcached_st that was
265
 
created (or initialized).  On an allocation failure, it returns NULL.
266
 
.SH EXAMPLE
267
 
.sp
268
 
.nf
269
 
.ft C
270
 
const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com"
271
 
memcached_st *memc= memcached_create_with_options(config_string, strlen(config_string);
272
 
{
273
 
 ...
274
 
}
275
 
memcached_free(memc);
276
 
.ft P
277
 
.fi
278
 
.SH HOME
279
 
.sp
280
 
To find out more information please check:
281
 
\fI\%https://launchpad.net/libmemcached\fP
282
 
.SH SEE ALSO
283
 
.sp
284
 
\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
285
 
.SH AUTHOR
286
 
Brian Aker
287
 
.SH COPYRIGHT
288
 
2011, Brian Aker DataDifferential, http://datadifferential.com/
289
 
.\" Generated by docutils manpage writer.
290
 
.\" 
291
 
.