Merge lp:~kent/libmemcached/KBDocs4 into lp:~tangent-org/libmemcached/trunk
- KBDocs4
- Merge into trunk
Proposed by
KentBozlinski
Status: | Merged |
---|---|
Merge reported by: | Brian Aker |
Merged at revision: | not available |
Proposed branch: | lp:~kent/libmemcached/KBDocs4 |
Merge into: | lp:~tangent-org/libmemcached/trunk |
Diff against target: |
491 lines (+120/-95) 11 files modified
docs/bin/memaslap.rst (+9/-7) docs/hashkit_create.rst (+14/-4) docs/hashkit_functions.rst (+1/-2) docs/hashkit_value.rst (+2/-2) docs/libhashkit.rst (+2/-1) docs/libmemcached.rst (+13/-13) docs/libmemcached_configuration.rst (+1/-1) docs/libmemcached_examples.rst (+16/-8) docs/libmemcachedutil.rst (+6/-7) docs/memcached_analyze.rst (+14/-14) docs/memcached_append.rst (+42/-36) |
To merge this branch: | bzr merge lp:~kent/libmemcached/KBDocs4 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Libmemcached-developers | Pending | ||
Review via email: mp+65843@code.launchpad.net |
Commit message
Description of the change
Updates to formatting of first ~dozen .rst files.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'docs/bin/memaslap.rst' | |||
2 | --- docs/bin/memaslap.rst 2011-06-24 19:25:01 +0000 | |||
3 | +++ docs/bin/memaslap.rst 2011-06-24 22:27:28 +0000 | |||
4 | @@ -18,12 +18,14 @@ | |||
5 | 18 | ----------- | 18 | ----------- |
6 | 19 | 19 | ||
7 | 20 | 20 | ||
10 | 21 | memaslap is a load generation and benchmark tool for :program:`memcached()` | 21 | :program:`memaslap` is a load generation and benchmark tool for memcached |
11 | 22 | servers. It generates configurable workload such as threads, concurrencies, connections, run time, overwrite, miss rate, key size, value size, get/set proportion, expected throughput, and so on. Furthermore, it also testss data | 22 | servers. It generates configurable workload such as threads, concurrencies, |
12 | 23 | connections, run time, overwrite, miss rate, key size, value size, get/set | ||
13 | 24 | proportion, expected throughput, and so on. Furthermore, it also testss data | ||
14 | 23 | verification, expire-time verification, UDP, binary protocol, facebook test, | 25 | verification, expire-time verification, UDP, binary protocol, facebook test, |
15 | 24 | replication test, multi-get and reconnection, etc. | 26 | replication test, multi-get and reconnection, etc. |
16 | 25 | 27 | ||
18 | 26 | Memslap manages network connections like memcached with | 28 | Memaslap manages network connections like memcached with |
19 | 27 | libevent. Each thread of memaslap is bound with a CPU core, all | 29 | libevent. Each thread of memaslap is bound with a CPU core, all |
20 | 28 | the threads don't communicate with each other, and there are several socket | 30 | the threads don't communicate with each other, and there are several socket |
21 | 29 | connections in each thread. Each connection keeps key size distribution, | 31 | connections in each thread. Each connection keeps key size distribution, |
22 | @@ -194,9 +196,9 @@ | |||
23 | 194 | 196 | ||
24 | 195 | Because each thread is self-governed, memaslap can assign | 197 | Because each thread is self-governed, memaslap can assign |
25 | 196 | different threads to handle different memcached servers. This is just one of | 198 | different threads to handle different memcached servers. This is just one of |
27 | 197 | the ways in which memaslap testss multiple servers. The only | 199 | the ways in which memaslap tests multiple servers. The only |
28 | 198 | limitation is that the number of servers cannot be greater than the number | 200 | limitation is that the number of servers cannot be greater than the number |
30 | 199 | of threads. The other way to tests multiple servers is for replication | 201 | of threads. The other way to test multiple servers is for replication |
31 | 200 | test. Each concurrency has one socket connection to each memcached server. | 202 | test. Each concurrency has one socket connection to each memcached server. |
32 | 201 | For the implementation, memaslap can set some objects to one | 203 | For the implementation, memaslap can set some objects to one |
33 | 202 | memcached server, and get these objects from the other servers. | 204 | memcached server, and get these objects from the other servers. |
34 | @@ -208,7 +210,7 @@ | |||
35 | 208 | Memslap testss both the ASCII protocol and binary protocol, | 210 | Memslap testss both the ASCII protocol and binary protocol, |
36 | 209 | but it runs on the ASCII protocol by default. | 211 | but it runs on the ASCII protocol by default. |
37 | 210 | Memslap by default runs on the TCP protocol, but it also | 212 | Memslap by default runs on the TCP protocol, but it also |
39 | 211 | testss UDP. Because UDP is unreliable, dropped packages and out-of-order | 213 | tests UDP. Because UDP is unreliable, dropped packages and out-of-order |
40 | 212 | packages may occur. Memslap creates a memory buffer to handle | 214 | packages may occur. Memslap creates a memory buffer to handle |
41 | 213 | these problems. Memslap tries to read all the response data of | 215 | these problems. Memslap tries to read all the response data of |
42 | 214 | one command from the server and reorders the response data. If some packages | 216 | one command from the server and reorders the response data. If some packages |
43 | @@ -314,7 +316,7 @@ | |||
44 | 314 | concurrency is 16. The user can use “—threads” and “--concurrency” to | 316 | concurrency is 16. The user can use “—threads” and “--concurrency” to |
45 | 315 | specify these variables. | 317 | specify these variables. |
46 | 316 | 318 | ||
48 | 317 | If the system testss setting CPU affinity and the number of threads | 319 | If the system tests setting CPU affinity and the number of threads |
49 | 318 | specified by the user is greater than 1, memaslap will try to | 320 | specified by the user is greater than 1, memaslap will try to |
50 | 319 | bind each thread to a different CPU core. So if you want to get the best | 321 | bind each thread to a different CPU core. So if you want to get the best |
51 | 320 | performance memaslap, it is better to specify the number of | 322 | performance memaslap, it is better to specify the number of |
52 | 321 | 323 | ||
53 | === modified file 'docs/hashkit_create.rst' | |||
54 | --- docs/hashkit_create.rst 2011-06-19 08:25:48 +0000 | |||
55 | +++ docs/hashkit_create.rst 2011-06-24 22:27:28 +0000 | |||
56 | @@ -48,12 +48,12 @@ | |||
57 | 48 | ------------ | 48 | ------------ |
58 | 49 | 49 | ||
59 | 50 | 50 | ||
62 | 51 | :c:func:`hashkit_create()` and :c:func:`hashkit_clone()` will return NULL on failure or | 51 | :c:func:`hashkit_create()` and :c:func:`hashkit_clone()` will return NULL on |
63 | 52 | non-NULL on success. | 52 | failure or non-NULL on success. |
64 | 53 | 53 | ||
65 | 54 | :c:func:`hashkit_is_allocated()` returns true if the memory for the hashkit | 54 | :c:func:`hashkit_is_allocated()` returns true if the memory for the hashkit |
68 | 55 | object was allocated inside of :c:func:`hashkit_create()` or :c:func:`hashkit_clone()`, | 55 | object was allocated inside of :c:fucn:`hashkit_create()` or |
69 | 56 | otherwise it is false and was user-supplied memory. | 56 | :c:func:`hashkit_clone()`, otherwise it is false and was user-supplied memory. |
70 | 57 | 57 | ||
71 | 58 | 58 | ||
72 | 59 | ---- | 59 | ---- |
73 | @@ -63,3 +63,13 @@ | |||
74 | 63 | 63 | ||
75 | 64 | To find out more information please check: | 64 | To find out more information please check: |
76 | 65 | `http://libmemcached.org/ <http://libmemcached.org/>`_ | 65 | `http://libmemcached.org/ <http://libmemcached.org/>`_ |
77 | 66 | |||
78 | 67 | |||
79 | 68 | |||
80 | 69 | -------- | ||
81 | 70 | SEE ALSO | ||
82 | 71 | -------- | ||
83 | 72 | |||
84 | 73 | |||
85 | 74 | :manpage:`hashkit_create(3)` :manpage:`hashkit_value(3)` :manpage:`hashkit_set_hash_fn(3)` | ||
86 | 75 | |||
87 | 66 | 76 | ||
88 | === modified file 'docs/hashkit_functions.rst' | |||
89 | --- docs/hashkit_functions.rst 2011-05-24 01:36:22 +0000 | |||
90 | +++ docs/hashkit_functions.rst 2011-06-24 22:27:28 +0000 | |||
91 | @@ -71,6 +71,5 @@ | |||
92 | 71 | -------- | 71 | -------- |
93 | 72 | 72 | ||
94 | 73 | 73 | ||
97 | 74 | hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3) | 74 | :manpage:`hashkit_create(3)` :manpage:`hashkit_value(3)` :manpage:`hashkit_set_hash_fn(3)` :manpage:`hashkit_set_continuum_hash_fn(3)` |
96 | 75 | hashkit_set_continuum_hash_fn(3) | ||
98 | 76 | 75 | ||
99 | 77 | 76 | ||
100 | === modified file 'docs/hashkit_value.rst' | |||
101 | --- docs/hashkit_value.rst 2011-05-24 01:36:22 +0000 | |||
102 | +++ docs/hashkit_value.rst 2011-06-24 22:27:28 +0000 | |||
103 | @@ -26,7 +26,7 @@ | |||
104 | 26 | ----------- | 26 | ----------- |
105 | 27 | 27 | ||
106 | 28 | 28 | ||
108 | 29 | The hashkit_value() function generates a 32-bit hash value from the | 29 | The :c:func:`hashkit_value()` function generates a 32-bit hash value from the |
109 | 30 | given key and key_length. The hash argument is an initialized hashkit | 30 | given key and key_length. The hash argument is an initialized hashkit |
110 | 31 | object, and distribution type and hash function is used from this | 31 | object, and distribution type and hash function is used from this |
111 | 32 | object while generating the value. | 32 | object while generating the value. |
112 | @@ -54,5 +54,5 @@ | |||
113 | 54 | -------- | 54 | -------- |
114 | 55 | 55 | ||
115 | 56 | 56 | ||
117 | 57 | hashkit_create(3) hashkit_set_distribution(3) hashkit_set_hash_fn(3) | 57 | :manpage:`hashkit_create(3)` :manpage:`hashkit_set_distribution(3)` :manpage:`hashkit_set_hash_fn(3)` |
118 | 58 | 58 | ||
119 | 59 | 59 | ||
120 | === modified file 'docs/libhashkit.rst' | |||
121 | --- docs/libhashkit.rst 2011-06-19 02:44:48 +0000 | |||
122 | +++ docs/libhashkit.rst 2011-06-24 22:27:28 +0000 | |||
123 | @@ -15,7 +15,8 @@ | |||
124 | 15 | DESCRIPTION | 15 | DESCRIPTION |
125 | 16 | ----------- | 16 | ----------- |
126 | 17 | 17 | ||
128 | 18 | :program:'libhashkit' is a small and thread-safe client library that provides a collection of useful hashing algorithm. libhashkit is distributed with libmemcached. | 18 | |
129 | 19 | libhashkit is a small and thread-safe client library that provides a collection of useful hashing algorithm. libhashkit is distributed with libmemcached. | ||
130 | 19 | 20 | ||
131 | 20 | 21 | ||
132 | 21 | ---- | 22 | ---- |
133 | 22 | 23 | ||
134 | === modified file 'docs/libmemcached.rst' | |||
135 | --- docs/libmemcached.rst 2011-06-19 02:44:48 +0000 | |||
136 | +++ docs/libmemcached.rst 2011-06-24 22:27:28 +0000 | |||
137 | @@ -33,7 +33,7 @@ | |||
138 | 33 | system, generic in nature, but intended for use in speeding up dynamic web | 33 | system, generic in nature, but intended for use in speeding up dynamic web |
139 | 34 | applications by alleviating database load." `http://danga.com/memcached/ <http://danga.com/memcached/>`_ | 34 | applications by alleviating database load." `http://danga.com/memcached/ <http://danga.com/memcached/>`_ |
140 | 35 | 35 | ||
142 | 36 | \ **libmemcached**\ is a small, thread-safe client library for the | 36 | :program:`libmemcached` is a small, thread-safe client library for the |
143 | 37 | memcached protocol. The code has all been written to allow | 37 | memcached protocol. The code has all been written to allow |
144 | 38 | for both web and embedded usage. It handles the work behind routing | 38 | for both web and embedded usage. It handles the work behind routing |
145 | 39 | individual keys to specific servers specified by the developer (and values are | 39 | individual keys to specific servers specified by the developer (and values are |
146 | @@ -41,16 +41,17 @@ | |||
147 | 41 | a modular and consistent method of object distribution. | 41 | a modular and consistent method of object distribution. |
148 | 42 | 42 | ||
149 | 43 | There are multiple implemented routing and hashing methods. See the | 43 | There are multiple implemented routing and hashing methods. See the |
151 | 44 | memcached_behavior_set() manpage for more information. | 44 | :c:func:`memcached_behavior_set()` manpage for more information. |
152 | 45 | 45 | ||
154 | 46 | All operations are performed against a :c:type:`memcached_st` structure. | 46 | All operations are performed against a :c:type:`memcached_st` structure. |
155 | 47 | These structures can either be dynamically allocated or statically | 47 | These structures can either be dynamically allocated or statically |
158 | 48 | allocated and then initialized by memcached_create(). Functions have been | 48 | allocated and then initialized by :c:func:`memcached_create()`. Functions have |
159 | 49 | written in order to encapsulate the :c:type:`memcached_st` . It is not | 49 | been written in order to encapsulate the :c:type:`memcached_st`. It is not |
160 | 50 | recommended that you operate directly against the structure. | 50 | recommended that you operate directly against the structure. |
161 | 51 | 51 | ||
164 | 52 | Nearly all functions return a :c:type:`memcached_return_t`\ value. | 52 | Nearly all functions return a :c:type:`memcached_return_t` value. |
165 | 53 | This value can be translated to a printable string with memcached_strerror(3). | 53 | This value can be translated to a printable string with |
166 | 54 | :c:type:`memcached_strerror()`. | ||
167 | 54 | 55 | ||
168 | 55 | Objects are stored on servers by hashing keys. The hash value maps the key to a particular server. All clients understand how this hashing works, so it is possibly to reliably both push data to a server and retrieve data from a server. | 56 | Objects are stored on servers by hashing keys. The hash value maps the key to a particular server. All clients understand how this hashing works, so it is possibly to reliably both push data to a server and retrieve data from a server. |
169 | 56 | 57 | ||
170 | @@ -58,7 +59,7 @@ | |||
171 | 58 | 59 | ||
172 | 59 | Namespaces are supported, and can be used to partition caches so that multiple applications can use the same memcached servers. | 60 | Namespaces are supported, and can be used to partition caches so that multiple applications can use the same memcached servers. |
173 | 60 | 61 | ||
175 | 61 | :c:type:`memcached_st` structures are thread-safe, but each thread must | 62 | :c:type:`memcached_st` structures are thread-safe, but each thread must |
176 | 62 | contain its own structure (that is, if you want to share these among | 63 | contain its own structure (that is, if you want to share these among |
177 | 63 | threads you must provide your own locking). No global variables are | 64 | threads you must provide your own locking). No global variables are |
178 | 64 | used in this library. | 65 | used in this library. |
179 | @@ -70,7 +71,7 @@ | |||
180 | 70 | AC_SUBST(DEPS_CFLAGS) | 71 | AC_SUBST(DEPS_CFLAGS) |
181 | 71 | AC_SUBST(DEPS_LIBS) | 72 | AC_SUBST(DEPS_LIBS) |
182 | 72 | 73 | ||
184 | 73 | Some features of the library must be enabled through memcached_behavior_set(). | 74 | Some features of the library must be enabled through :c:func:`memcached_behavior_set()`. |
185 | 74 | 75 | ||
186 | 75 | Hope you enjoy it! | 76 | Hope you enjoy it! |
187 | 76 | 77 | ||
188 | @@ -131,10 +132,9 @@ | |||
189 | 131 | 132 | ||
190 | 132 | 133 | ||
191 | 133 | When using threads or forked processes it is important to keep one instance | 134 | When using threads or forked processes it is important to keep one instance |
196 | 134 | of :c:type:`memcached_st` per process or thread. Without creating your own locking | 135 | of :c:type:`memcached_st` per process or thread. Without creating your own |
197 | 135 | structures you can not share a single :c:type:`memcached_st`. However, you can call | 136 | locking structures you can not share a single :c:type:`memcached_st`. However, |
198 | 136 | memcached_quit(3) on a :c:type:`memcached_st` and then use the resulting cloned | 137 | you can call :c:func:`memcached_quit()` on a :c:type:`memcached_st` and then use the resulting cloned structure. |
195 | 137 | structure. | ||
199 | 138 | 138 | ||
200 | 139 | 139 | ||
201 | 140 | ---- | 140 | ---- |
202 | 141 | 141 | ||
203 | === modified file 'docs/libmemcached_configuration.rst' | |||
204 | --- docs/libmemcached_configuration.rst 2011-06-24 19:25:01 +0000 | |||
205 | +++ docs/libmemcached_configuration.rst 2011-06-24 22:27:28 +0000 | |||
206 | @@ -185,7 +185,7 @@ | |||
207 | 185 | ------ | 185 | ------ |
208 | 186 | 186 | ||
209 | 187 | 187 | ||
211 | 188 | memcached() returns a pointer to the memcached_st that was | 188 | :c:func:`memcached()` returns a pointer to the memcached_st that was |
212 | 189 | created (or initialized). On an allocation failure, it returns NULL. | 189 | created (or initialized). On an allocation failure, it returns NULL. |
213 | 190 | 190 | ||
214 | 191 | 191 | ||
215 | 192 | 192 | ||
216 | === modified file 'docs/libmemcached_examples.rst' | |||
217 | --- docs/libmemcached_examples.rst 2011-05-24 01:36:22 +0000 | |||
218 | +++ docs/libmemcached_examples.rst 2011-06-24 22:27:28 +0000 | |||
219 | @@ -21,6 +21,7 @@ | |||
220 | 21 | 21 | ||
221 | 22 | .. code-block:: c | 22 | .. code-block:: c |
222 | 23 | 23 | ||
223 | 24 | Configuring with servers:: | ||
224 | 24 | const char *config_string= "--SERVER=host10.example.com --SERVER=host11.example.com --SERVER=host10.example.com" | 25 | const char *config_string= "--SERVER=host10.example.com --SERVER=host11.example.com --SERVER=host10.example.com" |
225 | 25 | memcached_st *memc= memcached(config_string, strlen(config_string); | 26 | memcached_st *memc= memcached(config_string, strlen(config_string); |
226 | 26 | { | 27 | { |
227 | @@ -29,7 +30,8 @@ | |||
228 | 29 | memcached_free(memc); | 30 | memcached_free(memc); |
229 | 30 | 31 | ||
230 | 31 | 32 | ||
232 | 32 | In the above code you create a \ ``memcached_st``\ object with three server by making use of :manpage:`memcached_create_with_options(3)`. | 33 | In the above code you create a :c:type:`memcached_st` object with three server |
233 | 34 | by making use of :c:func:`memcached_create_with_options()`. | ||
234 | 33 | 35 | ||
235 | 34 | 36 | ||
236 | 35 | -------------------------- | 37 | -------------------------- |
237 | @@ -40,6 +42,8 @@ | |||
238 | 40 | 42 | ||
239 | 41 | .. code-block:: c | 43 | .. code-block:: c |
240 | 42 | 44 | ||
241 | 45 | Creating a pool of Servers:: | ||
242 | 46 | |||
243 | 43 | const char *config_string= "--SERVER=host10.example.com --SERVER=host11.example.com --SERVER=host10.example.com"; | 47 | const char *config_string= "--SERVER=host10.example.com --SERVER=host11.example.com --SERVER=host10.example.com"; |
244 | 44 | 48 | ||
245 | 45 | memcached_pool_st* pool= memcached_pool(config_string, strlen(config_string)); | 49 | memcached_pool_st* pool= memcached_pool(config_string, strlen(config_string)); |
246 | @@ -62,10 +66,10 @@ | |||
247 | 62 | 66 | ||
248 | 63 | 67 | ||
249 | 64 | 68 | ||
252 | 65 | In the above code you create a \ ``memcached_pool_st``\ object with three | 69 | In the above code you create a :c:type:`memcached_pool_st` object with three |
253 | 66 | server by making use of :manpage:`memcached_pool(3)`. | 70 | server by making use of :c:func:`memcached_pool()`. |
254 | 67 | 71 | ||
256 | 68 | When memcached_pool_destroy() all memory will be released that is associated | 72 | When :c:func:`memcached_pool_destroy()` all memory will be released that is associated |
257 | 69 | with the pool. | 73 | with the pool. |
258 | 70 | 74 | ||
259 | 71 | 75 | ||
260 | @@ -77,6 +81,8 @@ | |||
261 | 77 | 81 | ||
262 | 78 | .. code-block:: c | 82 | .. code-block:: c |
263 | 79 | 83 | ||
264 | 84 | Adding a value to the Server:: | ||
265 | 85 | |||
266 | 80 | char *key= "foo"; | 86 | char *key= "foo"; |
267 | 81 | char *value= "value"; | 87 | char *value= "value"; |
268 | 82 | 88 | ||
269 | @@ -99,19 +105,21 @@ | |||
270 | 99 | 105 | ||
271 | 100 | .. code-block:: c | 106 | .. code-block:: c |
272 | 101 | 107 | ||
273 | 108 | Fetching multiple Values:: | ||
274 | 109 | |||
275 | 102 | memcached_return_t rc; | 110 | memcached_return_t rc; |
276 | 103 | char *keys[]= {"fudge", "son", "food"}; | 111 | char *keys[]= {"fudge", "son", "food"}; |
277 | 104 | size_t key_length[]= {5, 3, 4}; | 112 | size_t key_length[]= {5, 3, 4}; |
278 | 105 | unsigned int x; | 113 | unsigned int x; |
279 | 106 | uint32_t flags; | 114 | uint32_t flags; |
281 | 107 | 115 | ||
282 | 108 | char return_key[MEMCACHED_MAX_KEY]; | 116 | char return_key[MEMCACHED_MAX_KEY]; |
283 | 109 | size_t return_key_length; | 117 | size_t return_key_length; |
284 | 110 | char *return_value; | 118 | char *return_value; |
285 | 111 | size_t return_value_length; | 119 | size_t return_value_length; |
287 | 112 | 120 | ||
288 | 113 | rc= memcached_mget(memc, keys, key_length, 3); | 121 | rc= memcached_mget(memc, keys, key_length, 3); |
290 | 114 | 122 | ||
291 | 115 | x= 0; | 123 | x= 0; |
292 | 116 | while ((return_value= memcached_fetch(memc, return_key, &return_key_length, | 124 | while ((return_value= memcached_fetch(memc, return_key, &return_key_length, |
293 | 117 | &return_value_length, &flags, &rc))) | 125 | &return_value_length, &flags, &rc))) |
294 | @@ -122,7 +130,7 @@ | |||
295 | 122 | 130 | ||
296 | 123 | 131 | ||
297 | 124 | Notice that you freed values returned from memcached_fetch(). The define | 132 | Notice that you freed values returned from memcached_fetch(). The define |
299 | 125 | \ ``MEMCACHED_MAX_KEY``\ is provided for usage. | 133 | :c:type:`MEMCACHED_MAX_KEY` is provided for usage. |
300 | 126 | 134 | ||
301 | 127 | 135 | ||
302 | 128 | 136 | ||
303 | 129 | 137 | ||
304 | === modified file 'docs/libmemcachedutil.rst' | |||
305 | --- docs/libmemcachedutil.rst 2011-05-24 01:36:22 +0000 | |||
306 | +++ docs/libmemcachedutil.rst 2011-06-24 22:27:28 +0000 | |||
307 | @@ -23,8 +23,8 @@ | |||
308 | 23 | ----------- | 23 | ----------- |
309 | 24 | 24 | ||
310 | 25 | 25 | ||
313 | 26 | \ **libmemcachedutil**\ is a small and thread-safe client library that provides | 26 | :program:`libmemcachedutil` is a small and thread-safe client library that |
314 | 27 | extra functionality built on top of \ **libmemcached**\ . | 27 | provides extra functionality built on top of :program:`libmemcached`. |
315 | 28 | 28 | ||
316 | 29 | 29 | ||
317 | 30 | ------- | 30 | ------- |
318 | @@ -32,10 +32,10 @@ | |||
319 | 32 | ------- | 32 | ------- |
320 | 33 | 33 | ||
321 | 34 | 34 | ||
323 | 35 | Do not try to access an instance of \ ``memcached_st``\ from multiple threads | 35 | Do not try to access an instance of :c:type:`memcached_st` from multiple threads |
324 | 36 | at the same time. If you want to access memcached from multiple threads | 36 | at the same time. If you want to access memcached from multiple threads |
327 | 37 | you should either clone the \ ``memcached_st``\ , or use the memcached pool | 37 | you should either clone the :c:type:`memcached_st`, or use the memcached pool |
328 | 38 | implementation. see memcached_pool_create(3). | 38 | implementation. see :c:func:`memcached_pool_create()`. |
329 | 39 | 39 | ||
330 | 40 | 40 | ||
331 | 41 | ---- | 41 | ---- |
332 | @@ -52,6 +52,5 @@ | |||
333 | 52 | -------- | 52 | -------- |
334 | 53 | 53 | ||
335 | 54 | 54 | ||
338 | 55 | :manpage:`libmemcached(3)` | 55 | :manpage:`libmemcached(3)` :manpage:`memcached_pool_create(3)` :manpage:`memcached_pool_destroy(3)` :manpage:`memcached_pool_pop(3)` :manpage:`memcached_pool_push(3)` |
337 | 56 | :manpage:`memcached_pool_create(3)` :manpage:`memcached_pool_destroy(3)` :manpage:`memcached_pool_pop(3)` :manpage:`memcached_pool_push(3)` | ||
339 | 57 | 56 | ||
340 | 58 | 57 | ||
341 | === modified file 'docs/memcached_analyze.rst' | |||
342 | --- docs/memcached_analyze.rst 2011-05-24 01:36:22 +0000 | |||
343 | +++ docs/memcached_analyze.rst 2011-06-24 22:27:28 +0000 | |||
344 | @@ -24,16 +24,16 @@ | |||
345 | 24 | ----------- | 24 | ----------- |
346 | 25 | 25 | ||
347 | 26 | 26 | ||
358 | 27 | libmemcached(3) has the ability to query a memcached server (or collection | 27 | :program:`libmemcached` has the ability to query a memcached server (or |
359 | 28 | of servers) for their current state. Queries to find state return a | 28 | collection of servers) for their current state. Queries to find state return a |
360 | 29 | \ ``memcached_analysis_st``\ structure. You are responsible for freeing this structure. | 29 | :c:type:`memcached_analysis_st` structure. You are responsible for freeing this structure. |
361 | 30 | 30 | ||
362 | 31 | memcached_analyze() analyzes useful information based on the provided servers | 31 | :c:func:`memcached_analyze()` analyzes useful information based on the |
363 | 32 | and sets the result to the \ ``memcached_analysis_st``\ structure. The return value | 32 | provided servers and sets the result to the :c:type:`memcached_analysis_st` |
364 | 33 | must be freed by the calling application. | 33 | structure. The return value must be freed by the calling application. |
365 | 34 | 34 | ||
366 | 35 | A command line tool, memstat(1) with the option --analyze, is provided so that | 35 | A command line tool, :c:func:`memstat()` with the option :option:`--analyze`, |
367 | 36 | you do not have to write an application to use this method. | 36 | is provided so that you do not have to write an application to use this method. |
368 | 37 | 37 | ||
369 | 38 | 38 | ||
370 | 39 | ------ | 39 | ------ |
371 | @@ -41,11 +41,11 @@ | |||
372 | 41 | ------ | 41 | ------ |
373 | 42 | 42 | ||
374 | 43 | 43 | ||
378 | 44 | A pointer to the allocated \ ``memcached_analysis_st``\ structure on success and | 44 | A pointer to the allocated :c:type:`memcached_analysis_st` structure on |
379 | 45 | a NULL pointer on failure. You may inspect the error detail by checking the | 45 | success and a NULL pointer on failure. You may inspect the error detail by |
380 | 46 | \ ``memcached_return_t``\ value. | 46 | checking the :c:type:`memcached_return_t` value. |
381 | 47 | 47 | ||
383 | 48 | Any method returning a \ ``memcached_analysis_st``\ expects you to free the | 48 | Any method returning a :c:type:`memcached_analysis_st` expects you to free the |
384 | 49 | memory allocated for it. | 49 | memory allocated for it. |
385 | 50 | 50 | ||
386 | 51 | 51 | ||
387 | 52 | 52 | ||
388 | === modified file 'docs/memcached_append.rst' | |||
389 | --- docs/memcached_append.rst 2011-05-24 01:36:22 +0000 | |||
390 | +++ docs/memcached_append.rst 2011-06-24 22:27:28 +0000 | |||
391 | @@ -30,43 +30,48 @@ | |||
392 | 30 | ----------- | 30 | ----------- |
393 | 31 | 31 | ||
394 | 32 | 32 | ||
396 | 33 | memcached_prepend() and memcached_append are used to | 33 | :c:func:`memcached_prepend()` and memcached_append are used to |
397 | 34 | modify information on a server. All methods take a key, and its length to | 34 | modify information on a server. All methods take a key, and its length to |
400 | 35 | store the object. Keys are currently limited to 250 characters when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol. | 35 | store the object. Keys are currently limited to 250 characters when using |
401 | 36 | You must supply both a value and a length. Optionally you | 36 | either a version of memcached which is 1.4 or below, or when using the text |
402 | 37 | protocol. You must supply both a value and a length. Optionally you | ||
403 | 37 | may test an expiration time for the object and a 16 byte value (it is | 38 | may test an expiration time for the object and a 16 byte value (it is |
424 | 38 | meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it. | 39 | meant to be used as a bitmap). "flags" is a 4byte space that is stored |
425 | 39 | 40 | alongside of the main value. Many sub libraries make use of this field, | |
426 | 40 | memcached_prepend() places a segment of data before the last piece of data | 41 | so in most cases users should avoid making use of it. |
427 | 41 | stored. Currently expiration and key are not used in the server. | 42 | |
428 | 42 | 43 | :c:func:`memcached_prepend()` places a segment of data before the last piece | |
429 | 43 | memcached_append() places a segment of data at the end of the last piece of | 44 | of data stored. Currently expiration and key are not used in the server. |
430 | 44 | data stored. Currently expiration and key are not used in the server. | 45 | |
431 | 45 | 46 | :c:func:`memcached_append()` places a segment of data at the end of the last | |
432 | 46 | memcached_prepend_by_key() and memcached_append_by_key_by_key(, | 47 | piece of data stored. Currently expiration and key are not used in the server. |
433 | 47 | methods both behave in a similar method as the non key | 48 | |
434 | 48 | methods. The difference is that they use their group_key parameter to map | 49 | :c:func:`memcached_prepend_by_key()` and |
435 | 49 | objects to particular servers. | 50 | :c:func:`memcached_append_by_key_by_key()` methods both behave in a similar |
436 | 50 | 51 | method as the non key methods. The difference is that they use their | |
437 | 51 | If you are looking for performance, memcached_set() with non-blocking IO is | 52 | group_key parameter to map objects to particular servers. |
438 | 52 | the fastest way to store data on the server. | 53 | |
439 | 53 | 54 | If you are looking for performance, :c:func:`memcached_set()` with non-blocking | |
440 | 54 | All of the above functions are testsed with the \ ``MEMCACHED_BEHAVIOR_USE_UDP``\ | 55 | IO is the fastest way to store data on the server. |
441 | 55 | behavior enabled. However, when using these operations with this behavior on, there | 56 | |
442 | 56 | are limits to the size of the payload being sent to the server. The reason for | 57 | All of the above functions are testsed with the |
443 | 57 | these limits is that the Memcached Server does not allow multi-datagram requests | 58 | :c:type:`MEMCACHED_BEHAVIOR_USE_UDP` behavior enabled. However, when using |
444 | 59 | these operations with this behavior on, there are limits to the size of the | ||
445 | 60 | payload being sent to the server. The reason for these limits is that the | ||
446 | 61 | Memcached Server does not allow multi-datagram requests | ||
447 | 58 | and the current server implementation sets a datagram size to 1400 bytes. Due | 62 | and the current server implementation sets a datagram size to 1400 bytes. Due |
448 | 59 | to protocol overhead, the actual limit of the user supplied data is less than | 63 | to protocol overhead, the actual limit of the user supplied data is less than |
449 | 60 | 1400 bytes and depends on the protocol in use as, well as the operation being | 64 | 1400 bytes and depends on the protocol in use as, well as the operation being |
459 | 61 | executed. When running with the binary protocol, \ `` MEMCACHED_BEHAVIOR_BINARY_PROTOCOL``\ , | 65 | executed. When running with the binary protocol, |
460 | 62 | the size of the key,value, flags and expiry combined may not exceed 1368 bytes. | 66 | :c:type:`MEMCACHED_BEHAVIOR_BINARY_PROTOCOL`, the size of the key,value, |
461 | 63 | When running with the ASCII protocol, the exact limit fluctuates depending on | 67 | flags and expiry combined may not exceed 1368 bytes. When running with the |
462 | 64 | which function is being executed and whether the function is a cas operation | 68 | ASCII protocol, the exact limit fluctuates depending on which function is |
463 | 65 | or not. For non-cas ASCII set operations, there are at least 1335 bytes available | 69 | being executed and whether the function is a cas operation or not. For |
464 | 66 | to split among the key, key_prefix, and value; for cas ASCII operations there are | 70 | non-cas ASCII set operations, there are at least 1335 bytes available |
465 | 67 | at least 1318 bytes available to split among the key, key_prefix and value. If the | 71 | to split among the key, key_prefix, and value; for cas ASCII operations |
466 | 68 | total size of the command, including overhead, exceeds 1400 bytes, a \ ``MEMCACHED_WRITE_FAILURE``\ | 72 | there are at least 1318 bytes available to split among the key, key_prefix |
467 | 69 | will be returned. | 73 | and value. If the total size of the command, including overhead, exceeds |
468 | 74 | 1400 bytes, a :c:type:`MEMCACHED_WRITE_FAILURE` will be returned. | ||
469 | 70 | 75 | ||
470 | 71 | 76 | ||
471 | 72 | ------ | 77 | ------ |
472 | @@ -74,9 +79,10 @@ | |||
473 | 74 | ------ | 79 | ------ |
474 | 75 | 80 | ||
475 | 76 | 81 | ||
479 | 77 | All methods return a value of type \ ``memcached_return_t``\ . | 82 | All methods return a value of type :c:type:`memcached_return_t`. |
480 | 78 | On success the value will be \ ``MEMCACHED_SUCCESS``\ . | 83 | On success the value will be :c:type:`MEMCACHED_SUCCESS`. |
481 | 79 | Use memcached_strerror() to translate this value to a printable string. | 84 | Use :c:func:`memcached_strerror()` to translate this value to a printable |
482 | 85 | string. | ||
483 | 80 | 86 | ||
484 | 81 | 87 | ||
485 | 82 | ---- | 88 | ---- |
486 | @@ -93,5 +99,5 @@ | |||
487 | 93 | -------- | 99 | -------- |
488 | 94 | 100 | ||
489 | 95 | 101 | ||
491 | 96 | memcached(1) libmemached(3) memcached_strerror(3) memcached_set(3) memcached_add(3) memcached_cas(3) memcached_replace(3) | 102 | :manpage:`memcached(1)` :manpage:`libmemached(3)` :manpage:`memcached_strerror(3)` :manpage:`memcached_set(3)` :manpage:`memcached_add(3)` :manpage:`memcached_cas(3)` :manpage:`memcached_replace(3)` |
492 | 97 | 103 |