memcached 1.2.6 → 1.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (225) hide show
  1. data/CHANGELOG +2 -0
  2. data/Manifest +206 -12
  3. data/Rakefile +32 -1
  4. data/ext/extconf.rb +10 -35
  5. data/ext/libmemcached-0.32/AUTHORS +7 -0
  6. data/ext/libmemcached-0.32/COPYING +32 -0
  7. data/ext/libmemcached-0.32/ChangeLog +303 -0
  8. data/ext/libmemcached-0.32/INSTALL +302 -0
  9. data/ext/libmemcached-0.32/Makefile.am +36 -0
  10. data/ext/libmemcached-0.32/Makefile.in +828 -0
  11. data/ext/libmemcached-0.32/NEWS +1 -0
  12. data/ext/libmemcached-0.32/README +33 -0
  13. data/ext/libmemcached-0.32/THANKS +14 -0
  14. data/ext/libmemcached-0.32/TODO +11 -0
  15. data/ext/libmemcached-0.32/aclocal.m4 +1852 -0
  16. data/ext/libmemcached-0.32/clients/Makefile.am +73 -0
  17. data/ext/libmemcached-0.32/clients/Makefile.in +770 -0
  18. data/ext/libmemcached-0.32/clients/client_options.h +32 -0
  19. data/ext/libmemcached-0.32/clients/execute.c +64 -0
  20. data/ext/libmemcached-0.32/clients/execute.h +5 -0
  21. data/ext/libmemcached-0.32/clients/generator.c +74 -0
  22. data/ext/libmemcached-0.32/clients/generator.h +20 -0
  23. data/ext/libmemcached-0.32/clients/memcat.c +178 -0
  24. data/ext/libmemcached-0.32/clients/memcp.c +251 -0
  25. data/ext/libmemcached-0.32/clients/memdump.c +170 -0
  26. data/ext/libmemcached-0.32/clients/memerror.c +80 -0
  27. data/ext/libmemcached-0.32/clients/memflush.c +143 -0
  28. data/ext/libmemcached-0.32/clients/memrm.c +160 -0
  29. data/ext/libmemcached-0.32/clients/memslap.c +441 -0
  30. data/ext/libmemcached-0.32/clients/memstat.c +326 -0
  31. data/ext/libmemcached-0.32/clients/utilities.c +207 -0
  32. data/ext/libmemcached-0.32/clients/utilities.h +41 -0
  33. data/ext/libmemcached-0.32/config.h.in +252 -0
  34. data/ext/libmemcached-0.32/config/compile +143 -0
  35. data/ext/libmemcached-0.32/config/config.guess +1561 -0
  36. data/ext/libmemcached-0.32/config/config.rpath +666 -0
  37. data/ext/libmemcached-0.32/config/config.sub +1686 -0
  38. data/ext/libmemcached-0.32/config/depcomp +630 -0
  39. data/ext/libmemcached-0.32/config/install-sh +520 -0
  40. data/ext/libmemcached-0.32/config/ltmain.sh +8406 -0
  41. data/ext/libmemcached-0.32/config/missing +376 -0
  42. data/ext/libmemcached-0.32/configure +23048 -0
  43. data/ext/libmemcached-0.32/configure.ac +122 -0
  44. data/ext/libmemcached-0.32/docs/Makefile.am +415 -0
  45. data/ext/libmemcached-0.32/docs/Makefile.in +918 -0
  46. data/ext/libmemcached-0.32/docs/libmemcached.pod +123 -0
  47. data/ext/libmemcached-0.32/docs/libmemcached_examples.pod +115 -0
  48. data/ext/libmemcached-0.32/docs/libmemcachedutil.pod +40 -0
  49. data/ext/libmemcached-0.32/docs/memcached_analyze.pod +52 -0
  50. data/ext/libmemcached-0.32/docs/memcached_auto.pod +97 -0
  51. data/ext/libmemcached-0.32/docs/memcached_behavior.pod +224 -0
  52. data/ext/libmemcached-0.32/docs/memcached_callback.pod +123 -0
  53. data/ext/libmemcached-0.32/docs/memcached_create.pod +61 -0
  54. data/ext/libmemcached-0.32/docs/memcached_delete.pod +54 -0
  55. data/ext/libmemcached-0.32/docs/memcached_dump.pod +53 -0
  56. data/ext/libmemcached-0.32/docs/memcached_flush.pod +46 -0
  57. data/ext/libmemcached-0.32/docs/memcached_flush_buffers.pod +42 -0
  58. data/ext/libmemcached-0.32/docs/memcached_generate_hash_value.pod +57 -0
  59. data/ext/libmemcached-0.32/docs/memcached_get.pod +161 -0
  60. data/ext/libmemcached-0.32/docs/memcached_memory_allocators.pod +73 -0
  61. data/ext/libmemcached-0.32/docs/memcached_pool.pod +77 -0
  62. data/ext/libmemcached-0.32/docs/memcached_quit.pod +47 -0
  63. data/ext/libmemcached-0.32/docs/memcached_sasl.pod +63 -0
  64. data/ext/libmemcached-0.32/docs/memcached_server_st.pod +75 -0
  65. data/ext/libmemcached-0.32/docs/memcached_servers.pod +102 -0
  66. data/ext/libmemcached-0.32/docs/memcached_set.pod +187 -0
  67. data/ext/libmemcached-0.32/docs/memcached_stats.pod +82 -0
  68. data/ext/libmemcached-0.32/docs/memcached_strerror.pod +46 -0
  69. data/ext/libmemcached-0.32/docs/memcached_user_data.pod +49 -0
  70. data/ext/libmemcached-0.32/docs/memcached_verbosity.pod +41 -0
  71. data/ext/libmemcached-0.32/docs/memcached_version.pod +56 -0
  72. data/ext/libmemcached-0.32/docs/memcat.pod +37 -0
  73. data/ext/libmemcached-0.32/docs/memcp.pod +40 -0
  74. data/ext/libmemcached-0.32/docs/memdump.pod +31 -0
  75. data/ext/libmemcached-0.32/docs/memerror.pod +30 -0
  76. data/ext/libmemcached-0.32/docs/memflush.pod +35 -0
  77. data/ext/libmemcached-0.32/docs/memrm.pod +34 -0
  78. data/ext/libmemcached-0.32/docs/memslap.pod +33 -0
  79. data/ext/libmemcached-0.32/docs/memstat.pod +35 -0
  80. data/ext/libmemcached-0.32/libmemcached/Makefile.am +107 -0
  81. data/ext/libmemcached-0.32/libmemcached/Makefile.in +1050 -0
  82. data/ext/libmemcached-0.32/libmemcached/byteorder.c +31 -0
  83. data/ext/libmemcached-0.32/libmemcached/common.h +183 -0
  84. data/ext/libmemcached-0.32/libmemcached/crc.c +86 -0
  85. data/ext/libmemcached-0.32/libmemcached/hsieh_hash.c +68 -0
  86. data/ext/libmemcached-0.32/libmemcached/jenkins_hash.c +213 -0
  87. data/ext/libmemcached-0.32/libmemcached/libmemcached.ver +1 -0
  88. data/ext/libmemcached-0.32/libmemcached/libmemcached_probes.d +28 -0
  89. data/ext/libmemcached-0.32/libmemcached/libmemcached_probes.h +78 -0
  90. data/ext/libmemcached-0.32/libmemcached/md5.c +354 -0
  91. data/ext/libmemcached-0.32/libmemcached/memcached.c +152 -0
  92. data/ext/libmemcached-0.32/libmemcached/memcached.h +302 -0
  93. data/ext/libmemcached-0.32/libmemcached/memcached.hpp +799 -0
  94. data/ext/libmemcached-0.32/libmemcached/memcached/README.txt +7 -0
  95. data/ext/libmemcached-0.32/libmemcached/memcached/protocol_binary.h +366 -0
  96. data/ext/libmemcached-0.32/libmemcached/memcached_allocators.c +72 -0
  97. data/ext/libmemcached-0.32/libmemcached/memcached_analyze.c +100 -0
  98. data/ext/libmemcached-0.32/libmemcached/memcached_auto.c +207 -0
  99. data/ext/libmemcached-0.32/libmemcached/memcached_behavior.c +285 -0
  100. data/ext/libmemcached-0.32/libmemcached/memcached_callback.c +175 -0
  101. data/ext/libmemcached-0.32/libmemcached/memcached_configure.h.in +23 -0
  102. data/ext/libmemcached-0.32/libmemcached/memcached_connect.c +361 -0
  103. data/ext/libmemcached-0.32/libmemcached/memcached_constants.h +145 -0
  104. data/ext/libmemcached-0.32/libmemcached/memcached_delete.c +0 -0
  105. data/ext/libmemcached-0.32/libmemcached/memcached_do.c +34 -0
  106. data/ext/libmemcached-0.32/libmemcached/memcached_dump.c +79 -0
  107. data/ext/libmemcached-0.32/libmemcached/memcached_fetch.c +102 -0
  108. data/ext/libmemcached-0.32/libmemcached/memcached_flush.c +89 -0
  109. data/ext/libmemcached-0.32/libmemcached/memcached_flush_buffers.c +22 -0
  110. data/ext/libmemcached-0.32/libmemcached/memcached_get.c +495 -0
  111. data/ext/libmemcached-0.32/libmemcached/memcached_get.h +87 -0
  112. data/ext/libmemcached-0.32/libmemcached/memcached_hash.c +252 -0
  113. data/ext/libmemcached-0.32/libmemcached/memcached_hosts.c +510 -0
  114. data/ext/libmemcached-0.32/libmemcached/memcached_internal.h +31 -0
  115. data/ext/libmemcached-0.32/libmemcached/memcached_io.c +547 -0
  116. data/ext/libmemcached-0.32/libmemcached/memcached_io.h +59 -0
  117. data/ext/libmemcached-0.32/libmemcached/memcached_key.c +28 -0
  118. data/ext/libmemcached-0.32/libmemcached/memcached_parse.c +74 -0
  119. data/ext/libmemcached-0.32/libmemcached/memcached_pool.h +38 -0
  120. data/ext/libmemcached-0.32/libmemcached/memcached_purge.c +76 -0
  121. data/ext/libmemcached-0.32/libmemcached/memcached_quit.c +75 -0
  122. data/ext/libmemcached-0.32/libmemcached/memcached_response.c +528 -0
  123. data/ext/libmemcached-0.32/libmemcached/memcached_result.c +57 -0
  124. data/ext/libmemcached-0.32/libmemcached/memcached_result.h +59 -0
  125. data/ext/libmemcached-0.32/libmemcached/memcached_sasl.c +225 -0
  126. data/ext/libmemcached-0.32/libmemcached/memcached_sasl.h +44 -0
  127. data/ext/libmemcached-0.32/libmemcached/memcached_server.c +159 -0
  128. data/ext/libmemcached-0.32/libmemcached/memcached_server.h +93 -0
  129. data/ext/libmemcached-0.32/libmemcached/memcached_stats.c +454 -0
  130. data/ext/libmemcached-0.32/libmemcached/memcached_storage.c +514 -0
  131. data/ext/libmemcached-0.32/libmemcached/memcached_storage.h +107 -0
  132. data/ext/libmemcached-0.32/libmemcached/memcached_strerror.c +92 -0
  133. data/ext/libmemcached-0.32/libmemcached/memcached_string.c +138 -0
  134. data/ext/libmemcached-0.32/libmemcached/memcached_string.h +53 -0
  135. data/ext/libmemcached-0.32/libmemcached/memcached_types.h +44 -0
  136. data/ext/libmemcached-0.32/libmemcached/memcached_util.h +15 -0
  137. data/ext/libmemcached-0.32/libmemcached/memcached_verbosity.c +36 -0
  138. data/ext/libmemcached-0.32/libmemcached/memcached_version.c +112 -0
  139. data/ext/libmemcached-0.32/libmemcached/memcached_watchpoint.h +38 -0
  140. data/ext/libmemcached-0.32/libmemcached/murmur_hash.c +76 -0
  141. data/ext/libmemcached-0.32/libmemcached/visibility.h +51 -0
  142. data/ext/libmemcached-0.32/libmemcachedutil/Makefile.am +11 -0
  143. data/ext/libmemcached-0.32/libmemcachedutil/Makefile.in +602 -0
  144. data/ext/libmemcached-0.32/libmemcachedutil/libmemcachedutil.ver +1 -0
  145. data/ext/libmemcached-0.32/libmemcachedutil/memcached_pool.c +170 -0
  146. data/ext/libmemcached-0.32/m4/ac_cxx_compile_stdcxx_0x.m4 +103 -0
  147. data/ext/libmemcached-0.32/m4/ac_cxx_header_stdcxx_98.m4 +67 -0
  148. data/ext/libmemcached-0.32/m4/acx_pthread.m4 +276 -0
  149. data/ext/libmemcached-0.32/m4/byteorder.m4 +40 -0
  150. data/ext/libmemcached-0.32/m4/deprecated.m4 +17 -0
  151. data/ext/libmemcached-0.32/m4/enable_utillib.m4 +16 -0
  152. data/ext/libmemcached-0.32/m4/extensions.m4 +94 -0
  153. data/ext/libmemcached-0.32/m4/hsieh.m4 +18 -0
  154. data/ext/libmemcached-0.32/m4/lib-prefix.m4 +221 -0
  155. data/ext/libmemcached-0.32/m4/libtool.m4 +7360 -0
  156. data/ext/libmemcached-0.32/m4/ltoptions.m4 +368 -0
  157. data/ext/libmemcached-0.32/m4/ltsugar.m4 +123 -0
  158. data/ext/libmemcached-0.32/m4/ltversion.m4 +23 -0
  159. data/ext/libmemcached-0.32/m4/lt~obsolete.m4 +92 -0
  160. data/ext/libmemcached-0.32/m4/memcached.m4 +30 -0
  161. data/ext/libmemcached-0.32/m4/pandora_64bit.m4 +55 -0
  162. data/ext/libmemcached-0.32/m4/pandora_canonical.m4 +151 -0
  163. data/ext/libmemcached-0.32/m4/pandora_check_compiler_version.m4 +37 -0
  164. data/ext/libmemcached-0.32/m4/pandora_check_cxx_standard.m4 +16 -0
  165. data/ext/libmemcached-0.32/m4/pandora_enable_dtrace.m4 +41 -0
  166. data/ext/libmemcached-0.32/m4/pandora_ensure_gcc_version.m4 +36 -0
  167. data/ext/libmemcached-0.32/m4/pandora_have_better_malloc.m4 +54 -0
  168. data/ext/libmemcached-0.32/m4/pandora_have_sasl.m4 +133 -0
  169. data/ext/libmemcached-0.32/m4/pandora_header_assert.m4 +23 -0
  170. data/ext/libmemcached-0.32/m4/pandora_libtool.m4 +15 -0
  171. data/ext/libmemcached-0.32/m4/pandora_optimize.m4 +79 -0
  172. data/ext/libmemcached-0.32/m4/pandora_shared_ptr.m4 +56 -0
  173. data/ext/libmemcached-0.32/m4/pandora_vc_build.m4 +32 -0
  174. data/ext/libmemcached-0.32/m4/pandora_warnings.m4 +262 -0
  175. data/ext/libmemcached-0.32/m4/pod2man.m4 +7 -0
  176. data/ext/libmemcached-0.32/m4/protocol_binary.m4 +23 -0
  177. data/ext/libmemcached-0.32/m4/setsockopt.m4 +57 -0
  178. data/ext/libmemcached-0.32/m4/visibility.m4 +52 -0
  179. data/ext/libmemcached-0.32/support/Makefile.am +4 -0
  180. data/ext/libmemcached-0.32/support/Makefile.in +485 -0
  181. data/ext/libmemcached-0.32/support/libmemcached-fc.spec.in +105 -0
  182. data/ext/libmemcached-0.32/support/libmemcached.pc.in +10 -0
  183. data/ext/libmemcached-0.32/support/libmemcached.spec +105 -0
  184. data/ext/libmemcached-0.32/support/libmemcached.spec.in +105 -0
  185. data/ext/libmemcached-0.32/support/set_benchmark.sh +5 -0
  186. data/ext/libmemcached-0.32/tests/Makefile.am +105 -0
  187. data/ext/libmemcached-0.32/tests/Makefile.in +748 -0
  188. data/ext/libmemcached-0.32/tests/atomsmasher.c +245 -0
  189. data/ext/libmemcached-0.32/tests/function.c +4781 -0
  190. data/ext/libmemcached-0.32/tests/ketama_test_cases.h +108 -0
  191. data/ext/libmemcached-0.32/tests/output.cmp +7 -0
  192. data/ext/libmemcached-0.32/tests/output.res +7 -0
  193. data/ext/libmemcached-0.32/tests/output2.res +46 -0
  194. data/ext/libmemcached-0.32/tests/plus.cpp +293 -0
  195. data/ext/libmemcached-0.32/tests/r/memcat.res +19 -0
  196. data/ext/libmemcached-0.32/tests/r/memcp.res +27 -0
  197. data/ext/libmemcached-0.32/tests/r/memrm.res +19 -0
  198. data/ext/libmemcached-0.32/tests/r/memslap.res +33 -0
  199. data/ext/libmemcached-0.32/tests/r/memstat.res +33 -0
  200. data/ext/libmemcached-0.32/tests/server.c +118 -0
  201. data/ext/libmemcached-0.32/tests/server.h +25 -0
  202. data/ext/libmemcached-0.32/tests/start.c +16 -0
  203. data/ext/libmemcached-0.32/tests/t/memcat.test +4 -0
  204. data/ext/libmemcached-0.32/tests/t/memcp.test +3 -0
  205. data/ext/libmemcached-0.32/tests/t/memrm.test +3 -0
  206. data/ext/libmemcached-0.32/tests/t/memslap.test +5 -0
  207. data/ext/libmemcached-0.32/tests/t/memstat.test +3 -0
  208. data/ext/libmemcached-0.32/tests/test.c +137 -0
  209. data/ext/libmemcached-0.32/tests/test.h +46 -0
  210. data/ext/libmemcached-0.32/tests/udp.c +76 -0
  211. data/memcached.gemspec +4 -4
  212. data/test/unit/memcached_test.rb +30 -0
  213. metadata +213 -16
  214. data/ext/libmemcached-0.32.tar.gz +0 -0
  215. data/ext/libmemcached-1.patch +0 -270
  216. data/ext/libmemcached-10.patch +0 -12
  217. data/ext/libmemcached-2.patch +0 -116
  218. data/ext/libmemcached-3.patch +0 -8
  219. data/ext/libmemcached-4.patch +0 -40
  220. data/ext/libmemcached-5.patch +0 -832
  221. data/ext/libmemcached-6.patch +0 -20
  222. data/ext/libmemcached-7.patch +0 -2989
  223. data/ext/libmemcached-8.patch +0 -137
  224. data/ext/libmemcached-9.patch +0 -13
  225. data/ext/sasl.patch +0 -29283
@@ -0,0 +1,73 @@
1
+ =head1 NAME
2
+
3
+ memcached_set_memory_allocators, memcached_get_memory_allocators - Manage memory allocator functions
4
+
5
+ =head1 LIBRARY
6
+
7
+ C Client Library for memcached (libmemcached, -lmemcached)
8
+
9
+ =head1 SYNOPSIS
10
+
11
+ #include <memcached.h>
12
+
13
+ memcached_return
14
+ memcached_set_memory_allocators(memcached_st *ptr,
15
+ memcached_malloc_function mem_malloc,
16
+ memcached_free_function mem_free,
17
+ memcached_realloc_function mem_realloc,
18
+ memcached_calloc_function mem_calloc);
19
+
20
+ void memcached_get_memory_allocators(memcached_st *ptr,
21
+ memcached_malloc_function *mem_malloc,
22
+ memcached_free_function *mem_free,
23
+ memcached_realloc_function *mem_realloc,
24
+ memcached_calloc_function *mem_calloc);
25
+
26
+ void *(*memcached_malloc_function)(memcached_st *ptr, const size_t size);
27
+ void *(*memcached_realloc_function)(memcached_st *ptr, void *mem,
28
+ const size_t size);
29
+ void (*memcached_free_function)(memcached_st *ptr, void *mem);
30
+ void *(*memcached_calloc_function)(memcached_st *ptr, size_t nelem,
31
+ const size_t elsize);
32
+
33
+
34
+ =head1 DESCRIPTION
35
+
36
+ libmemcached(3) allows you to specify your own memory allocators optimized
37
+ for your application.
38
+
39
+ memcached_set_memory_allocators() is used to set the memory allocators used
40
+ by the memcached instance specified by ptr. Please note that you cannot
41
+ override only one of the memory allocators, you have to specify a complete
42
+ new set if you want to override one of them. All of the memory allocation
43
+ functions should behave as specified in the C99 standard. Specify NULL as
44
+ all functions to reset them to the default values.
45
+
46
+ memcached_get_memory_allocators() is used to get the currently used memory
47
+ allocators by a mamcached handle.
48
+
49
+ The first argument to the memory allocator functions is a pointer to a
50
+ memcached structure, and you may use the memcached_set_user_data() and
51
+ memcached_get_user_data() to store a user-specific value to each memcached
52
+ structure.
53
+
54
+ =head1 RETURN
55
+
56
+ memcached_set_memory_allocators() return MEMCACHED_SUCCESS upon success,
57
+ and MEMCACHED_FAILURE if you don't pass a complete set of function pointers.
58
+
59
+ =head1 HOME
60
+
61
+ To find out more information please check:
62
+ L<http://tangent.org/552/libmemcached.html>
63
+
64
+ =head1 AUTHOR
65
+
66
+ Trond Norbye, E<lt>trond.norbye@sun.comE<gt>
67
+
68
+ =head1 SEE ALSO
69
+
70
+ memcached(1) libmemcached(3) memcached_get_user_data(3) memcached_set_user_data(3)
71
+
72
+ =cut
73
+
@@ -0,0 +1,77 @@
1
+ =head1 NAME
2
+
3
+ memcached_pool_create, memcached_pool_destroy, memcached_pool_push, memcached_pool_pop - Manage pools
4
+
5
+ =head1 LIBRARY
6
+
7
+ C Client Library for memcached (libmemcachedutil, -lmemcachedutil)
8
+
9
+ =head1 SYNOPSIS
10
+
11
+ #include <libmemcached/memcached_pool.h>
12
+
13
+ memcached_pool_st *memcached_pool_create(memcached_st* mmc, int initial, int max);
14
+ memcached_st* memcached_pool_destroy(memcached_pool_st* pool);
15
+
16
+ memcached_st* memcached_pool_pop(memcached_pool_st* pool, bool block, memcached_return *rc);
17
+ memcached_return memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
18
+
19
+ memcached_st *memcached_create (memcached_st *ptr);
20
+
21
+
22
+ =head1 DESCRIPTION
23
+
24
+ memcached_pool_create() is used to create a connection pool of objects you
25
+ may use to remove the overhead of using memcached_clone for short
26
+ lived C<memcached_st> objects. The mmc argument should be an
27
+ initialised C<memcached_st> structure, and a successfull invocation of
28
+ memcached_pool_create takes full ownership of the variable (until it
29
+ is released by memcached_pool_destroy). The C<initial> argument
30
+ specifies the initial size of the connection pool, and the C<max>
31
+ argument specifies the maximum size the connection pool should grow
32
+ to. Please note that the library will allocate a fixed size buffer
33
+ scaled to the max size of the connection pool, so you should not pass
34
+ MAXINT or some other large number here.
35
+
36
+ memcached_pool_destroy() is used to destroy the connection pool
37
+ created with memcached_pool_create() and release all allocated
38
+ resources. It will return the pointer to the C<memcached_st> structure
39
+ passed as an argument to memcached_pool_create(), and returns the
40
+ ownership of the pointer to the caller.
41
+
42
+ memcached_pool_pop() is used to grab a connection structure from the
43
+ connection pool. The block argument specifies if the function should
44
+ block and wait for a connection structure to be available if we try
45
+ to exceed the maximum size.
46
+
47
+ memcached_pool_push() is used to return a connection structure back to the pool.
48
+
49
+ =head1 RETURN
50
+
51
+ memcached_pool_create() returns a pointer to the newly created
52
+ memcached_pool_st structure. On an allocation failure, it returns
53
+ NULL.
54
+
55
+ memcached_pool_destroy() returns the pointer (and ownership) to the
56
+ memcached_st structure used to create the pool. If connections are in
57
+ use it returns NULL.
58
+
59
+ memcached_pool_pop() returns a pointer to a memcached_st structure
60
+ from the pool (or NULL if an allocation cannot be satisfied).
61
+
62
+ memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
63
+
64
+ =head1 HOME
65
+
66
+ To find out more information please check:
67
+ L<http://tangent.org/552/libmemcached.html>
68
+
69
+ =head1 AUTHOR
70
+
71
+ Trond Norbye, E<lt>trond.norbye@sun.comE<gt>
72
+
73
+ =head1 SEE ALSO
74
+
75
+ memcached(1) libmemcached(3) memcached_create(3) memcached_free(3) libmemcachedutil(3)
76
+
77
+ =cut
@@ -0,0 +1,47 @@
1
+ =head1 NAME
2
+
3
+ memcached_quit - Disconnect from all servers
4
+
5
+ =head1 LIBRARY
6
+
7
+ C Client Library for memcached (libmemcached, -lmemcached)
8
+
9
+ =head1 SYNOPSIS
10
+
11
+ #include <memcached.h>
12
+
13
+ void memcached_quit (memcached_st *ptr);
14
+
15
+ =head1 DESCRIPTION
16
+
17
+ memcached_quit() will disconnect you from all currently connected servers.
18
+ It will also reset the state of the connection (ie, any memcached_fetch() you
19
+ are in the middle of will be terminated). This function is called
20
+ automatically when you call memcached_free() on the C<memcached_st> structure.
21
+
22
+ You do not need to call this on your own. All operations to change server
23
+ hashes and parameters will handle connections to the server for you. This
24
+ function is provided mainly so that you can timeout your connections or
25
+ reset connections during the middle of a memcached_fetch().
26
+
27
+ =head1 RETURN
28
+
29
+ A value of type C<memcached_return> is returned
30
+ On success that value will be C<MEMCACHED_SUCCESS>.
31
+ Use memcached_strerror() to translate this value to a printable string.
32
+
33
+ =head1 HOME
34
+
35
+ To find out more information please check:
36
+ L<http://tangent.org/552/libmemcached.html>
37
+
38
+ =head1 AUTHOR
39
+
40
+ Brian Aker, E<lt>brian@tangent.orgE<gt>
41
+
42
+ =head1 SEE ALSO
43
+
44
+ memcached(1) libmemcached(3) memcached_strerror(3)
45
+
46
+ =cut
47
+
@@ -0,0 +1,63 @@
1
+ =head1 NAME
2
+
3
+ memcached_set_sasl_callbacks, memcached_get_sasl_callbackss, memcached_get_sasl_set_auth_data - SASL support
4
+
5
+ =head1 LIBRARY
6
+
7
+ C Client Library for memcached (libmemcached, -lmemcached)
8
+
9
+ =head1 SYNOPSIS
10
+
11
+ #include <memcached.h>
12
+
13
+ void memcached_set_sasl_callbacks(memcached_st *ptr,
14
+ const sasl_callback_t *callbacks)
15
+
16
+ const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
17
+
18
+ memcached_return memcached_set_sasl_auth_data(memcached_st *ptr,
19
+ const char *username,
20
+ const char *password)
21
+ memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr)
22
+
23
+
24
+ =head1 DESCRIPTION
25
+
26
+ libmemcached(3) allows you to plug in your own callbacks function used by
27
+ libsasl to perform SASL authentication.
28
+
29
+ Please note that SASL requires the memcached binary protocol, and you have
30
+ to specify the callbacks before you connect to the server.
31
+
32
+ memcached_set_sasl_auth_data() is a helper function for you defining
33
+ the basic functionality for you, but it will store the username and password
34
+ in memory. If you choose to use this method you have to call
35
+ memcached_destroy_sasl_auth_data before calling memcached_free to avoid
36
+ a memory leak. You should NOT call memcached_destroy_sasl_auth_data if you
37
+ specify your own callback function with memcached_set_sasl_callbacks().
38
+
39
+ You as a client user have to initialize libsasl by using sasl_client_init
40
+ before enabling it in libmemcached, and you have to shut down libsasl by
41
+ calling sasl_done() when you are done using SASL from libmemcached.
42
+
43
+
44
+ =head1 RETURN
45
+
46
+ memcached_get_sasl_callbacks() returns the callbacks currently used
47
+ by this memcached handle.
48
+ memcached_get_sasl_set_auth_data() returns MEMCACHED_SUCCESS upon success.
49
+
50
+ =head1 HOME
51
+
52
+ To find out more information please check:
53
+ L<http://tangent.org/552/libmemcached.html>
54
+
55
+ =head1 AUTHOR
56
+
57
+ Trond Norbye, E<lt>trond.norbye@sun.comE<gt>
58
+
59
+ =head1 SEE ALSO
60
+
61
+ memcached(1) libmemcached(3)
62
+
63
+ =cut
@@ -0,0 +1,75 @@
1
+ =head1 NAME
2
+
3
+ memcached_server_list_free, memcached_server_list_append,
4
+ memcached_server_list_count, memcached_servers_parse - Manage server list
5
+
6
+ =head1 LIBRARY
7
+
8
+ C Client Library for memcached (libmemcached, -lmemcached)
9
+
10
+ =head1 SYNOPSIS
11
+
12
+ #include <memcached.h>
13
+
14
+ void memcached_server_list_free (memcached_server_st *ptr);
15
+
16
+ memcached_server_st *
17
+ memcached_server_list_append (memcached_server_st *ptr,
18
+ const char *hostname,
19
+ unsigned int port,
20
+ memcached_return *error);
21
+
22
+ unsigned int memcached_server_list_count (memcached_server_st *ptr);
23
+
24
+ memcached_server_st *memcached_servers_parse (const char *server_strings);
25
+
26
+ const char *memcached_server_error(memcached_server_st *ptr);
27
+
28
+ void memcached_server_error_reset(memcached_server_st *ptr);
29
+
30
+ =head1 DESCRIPTION
31
+
32
+ libmemcached(3) operates on a list of hosts which are stored in
33
+ memcached_server_st structures. You should not modify these structures
34
+ directly. Functions are provided to modify these structures (and more can be
35
+ added, just ask!).
36
+
37
+ memcached_server_list_free() deallocates all memory associated with the array
38
+ of memcached_server_st that you passed to it.
39
+
40
+ memcached_server_list_append() adds a server to the end of a
41
+ memcached_server_st array. On error null will be returned and the
42
+ memcached_return pointer you passed into the function will be set with the
43
+ appropriate error. If the value of port is zero, it is set to the default
44
+ port of a memcached server.
45
+
46
+ memcached_servers_parse() takes a string, the type that is used for the
47
+ command line applications, and parse it to an array of memcached_server_st.
48
+ The example is "localhost, foo:555, foo, bar". All hosts except foo:555 will
49
+ be set to the default port, while that host will have a port of 555.
50
+
51
+ memcached_server_error() can be used to look at the text of the last error
52
+ message sent by the server to to the client. Use memcached_server_error_reset()
53
+ to reset the message (this does not currently free up the memory associated
54
+ with the message).
55
+
56
+
57
+ =head1 RETURN
58
+
59
+ Varies, see particular functions.
60
+
61
+ =head1 HOME
62
+
63
+ To find out more information please check:
64
+ L<http://tangent.org/552/libmemcached.html>
65
+
66
+ =head1 AUTHOR
67
+
68
+ Brian Aker, E<lt>brian@tangent.orgE<gt>
69
+
70
+ =head1 SEE ALSO
71
+
72
+ memcached(1) libmemcached(3) memcached_strerror(3)
73
+
74
+ =cut
75
+
@@ -0,0 +1,102 @@
1
+ =head1 NAME
2
+
3
+ memcached_server_count, memcached_server_list, memcached_server_add, memcached_server_push - Manage server list
4
+
5
+ =head1 LIBRARY
6
+
7
+ C Client Library for memcached (libmemcached, -lmemcached)
8
+
9
+ =head1 SYNOPSIS
10
+
11
+ #include <memcached.h>
12
+
13
+ unsigned int memcached_server_count (memcached_st *ptr);
14
+
15
+ memcached_server_st *
16
+ memcached_server_list (memcached_st *ptr);
17
+
18
+ memcached_return
19
+ memcached_server_add (memcached_st *ptr,
20
+ const char *hostname,
21
+ unsigned int port);
22
+
23
+ memcached_return
24
+ memcached_server_add_udp (memcached_st *ptr,
25
+ const char *hostname,
26
+ unsigned int port);
27
+
28
+ memcached_return
29
+ memcached_server_add_unix_socket (memcached_st *ptr,
30
+ const char *socket);
31
+
32
+ memcached_return
33
+ memcached_server_push (memcached_st *ptr,
34
+ memcached_server_st *list);
35
+
36
+ memcached_server_st *
37
+ memcached_server_by_key (memcached_st *ptr,
38
+ const char *key, size_t key_length,
39
+ memcached_return *error);
40
+
41
+ =head1 DESCRIPTION
42
+
43
+ libmemcached(3) performs operations on a list of hosts. The order of these
44
+ hosts determine routing to keys. Functions are provided to add keys to
45
+ memcached_st structures. To manipulate lists of servers see
46
+ memcached_server_st(3).
47
+
48
+ memcached_server_count() provides you a count of the current number of
49
+ servers being used by a C<memcached_st> structure.
50
+
51
+ memcached_server_list() is used to provide an array of all defined hosts.
52
+ You are responsible for freeing this list (aka it is not a pointer to the
53
+ currently used structure).
54
+
55
+ memcached_server_add() pushes a single TCP server into the C<memcached_st>
56
+ structure. This server will be placed at the end. Duplicate servers are
57
+ allowed, so duplication is not checked. Executing this function with the
58
+ C<MEMCACHED_BEHAVIOR_USE_UDP> behavior set will result in a
59
+ C<MEMCACHED_INVALID_HOST_PROTOCOL>.
60
+
61
+ memcached_server_add_udp() pushes a single UDP server into the C<memcached_st>
62
+ structure. This server will be placed at the end. Duplicate servers are
63
+ allowed, so duplication is not checked. Executing this function with out
64
+ setting the C<MEMCACHED_BEHAVIOR_USE_UDP> behavior will result in a
65
+ C<MEMCACHED_INVALID_HOST_PROTOCOL>.
66
+
67
+ memcached_server_add_unix_socket() pushes a single UNIX socket into the
68
+ C<memcached_st> structure. This UNIX socket will be placed at the end.
69
+ Duplicate servers are allowed, so duplication is not checked. The length
70
+ of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
71
+
72
+ memcached_server_push() pushes an array of C<memcached_server_st> into
73
+ the C<memcached_st> structure. These servers will be placed at the
74
+ end. Duplicate servers are allowed, so duplication is not checked. A
75
+ copy is made of structure so the list provided (and any operations on
76
+ the list) are not saved.
77
+
78
+ memcached_server_by_key() allows you to provide a key and retrieve the
79
+ server which would be used for assignment. This structure is cloned
80
+ from its original structure and must be freed. If NULL is returned you
81
+ should consult *error. The returning structure should be freed with
82
+ memcached_server_free().
83
+
84
+ =head1 RETURN
85
+
86
+ Varies, see particular functions.
87
+
88
+ =head1 HOME
89
+
90
+ To find out more information please check:
91
+ L<http://tangent.org/552/libmemcached.html>
92
+
93
+ =head1 AUTHOR
94
+
95
+ Brian Aker, E<lt>brian@tangent.orgE<gt>
96
+
97
+ =head1 SEE ALSO
98
+
99
+ memcached(1) libmemcached(3) memcached_strerror(3)
100
+
101
+ =cut
102
+
@@ -0,0 +1,187 @@
1
+ =head1 NAME
2
+
3
+ memcached_set, memcached_add, memcached_replace - Store value on server
4
+
5
+ =head1 LIBRARY
6
+
7
+ C Client Library for memcached (libmemcached, -lmemcached)
8
+
9
+ =head1 SYNOPSIS
10
+
11
+ #include <memcached.h>
12
+
13
+ memcached_return
14
+ memcached_set (memcached_st *ptr,
15
+ const char *key, size_t key_length,
16
+ const char *value, size_t value_length,
17
+ time_t expiration,
18
+ uint32_t flags);
19
+
20
+ memcached_return
21
+ memcached_add (memcached_st *ptr,
22
+ const char *key, size_t key_length,
23
+ const char *value, size_t value_length,
24
+ time_t expiration,
25
+ uint32_t flags);
26
+
27
+ memcached_return
28
+ memcached_replace (memcached_st *ptr,
29
+ const char *key, size_t key_length,
30
+ const char *value, size_t value_length,
31
+ time_t expiration,
32
+ uint32_t flags);
33
+
34
+ memcached_return
35
+ memcached_prepend(memcached_st *ptr,
36
+ const char *key, size_t key_length,
37
+ const char *value, size_t value_length,
38
+ time_t expiration,
39
+ uint32_t flags)
40
+
41
+ memcached_return
42
+ memcached_append(memcached_st *ptr,
43
+ const char *key, size_t key_length,
44
+ const char *value, size_t value_length,
45
+ time_t expiration,
46
+ uint32_t flags)
47
+ memcached_return
48
+ memcached_cas(memcached_st *ptr,
49
+ const char *key, size_t key_length,
50
+ const char *value, size_t value_length,
51
+ time_t expiration,
52
+ uint32_t flags,
53
+ uint64_t cas);
54
+
55
+ memcached_return
56
+ memcached_set_by_key(memcached_st *ptr,
57
+ const char *master_key, size_t master_key_length,
58
+ const char *key, size_t key_length,
59
+ const char *value, size_t value_length,
60
+ time_t expiration,
61
+ uint32_t flags);
62
+
63
+ memcached_return
64
+ memcached_add_by_key(memcached_st *ptr,
65
+ const char *master_key, size_t master_key_length,
66
+ const char *key, size_t key_length,
67
+ const char *value, size_t value_length,
68
+ time_t expiration,
69
+ uint32_t flags);
70
+
71
+ memcached_return
72
+ memcached_replace_by_key(memcached_st *ptr,
73
+ const char *master_key, size_t master_key_length,
74
+ const char *key, size_t key_length,
75
+ const char *value, size_t value_length,
76
+ time_t expiration,
77
+ uint32_t flags);
78
+
79
+ memcached_return
80
+ memcached_prepend_by_key(memcached_st *ptr,
81
+ const char *master_key, size_t master_key_length,
82
+ const char *key, size_t key_length,
83
+ const char *value, size_t value_length,
84
+ time_t expiration,
85
+ uint32_t flags);
86
+
87
+ memcached_return
88
+ memcached_append_by_key(memcached_st *ptr,
89
+ const char *master_key, size_t master_key_length,
90
+ const char *key, size_t key_length,
91
+ const char *value, size_t value_length,
92
+ time_t expiration,
93
+ uint32_t flags);
94
+
95
+ memcached_return
96
+ memcached_cas_by_key(memcached_st *ptr,
97
+ const char *master_key, size_t master_key_length,
98
+ const char *key, size_t key_length,
99
+ const char *value, size_t value_length,
100
+ time_t expiration,
101
+ uint32_t flags,
102
+ uint64_t cas);
103
+
104
+ =head1 DESCRIPTION
105
+
106
+ memcached_set(), memcached_add(), and memcached_replace() are all used to
107
+ store information on the server. All methods take a key, and its length to
108
+ store the object. Keys are currently limited to 250 characters by the
109
+ memcached(1) server. You must also supply a value and a length. Optionally you
110
+ may support an expiration time for the object and a 16 byte value (it is
111
+ meant to be used as a bitmap).
112
+
113
+ memcached_set() will write an object to the server. If an object already
114
+ exists it will overwrite what is in the server. If the object does not exist
115
+ it will be written. If you are using the non-blocking mode this function
116
+ will always return true unless a network error occurs.
117
+
118
+ memcached_replace() replaces an object on the server. If the object is not
119
+ found on the server an error occurs.
120
+
121
+ memcached_add() adds an object to the server. If the object is found on the
122
+ server an error occurs, otherwise the value is stored.
123
+
124
+ memcached_prepend() places a segment of data before the last piece of data
125
+ stored. Currently expiration and key are not used in the server.
126
+
127
+ memcached_append() places a segment of data at the end of the last piece of
128
+ data stored. Currently expiration and key are not used in the server.
129
+
130
+ memcached_cas() overwrites data in the server as long as the "cas" value is
131
+ still the same in the server. You can get the cas value of a result by
132
+ calling memcached_result_cas() on a memcached_result_st(3) structure. At the point
133
+ that this note was written cas is still buggy in memached. Turning on support
134
+ for it in libmemcached(3) is optional. Please see memcached_set() for
135
+ information on how to do this.
136
+
137
+ memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(),
138
+ memcached_prepend_by_key(), memcached_append_by_key_by_key(),
139
+ memcached_cas_by_key() methods all behave in a similar method as the non key
140
+ methods. The difference is that they use their master_key parameter to map
141
+ objects to particular servers.
142
+
143
+ If you are looking for performance, memcached_set() with non-blocking IO is
144
+ the fastest way to store data on the server.
145
+
146
+ All of the above functions are supported with the C<MEMCACHED_BEHAVIOR_USE_UDP>
147
+ behavior enabled. But when using these operations with this behavior on, there
148
+ are limits to the size of the payload being sent to the server. The reason for
149
+ these limits is that the Memcahed Server does not allow multi-datagram requests
150
+ and the current server implementation sets a datagram size to 1400 bytes. Due
151
+ to protocol overhead, the actual limit of the user supplied data is less than
152
+ 1400 bytes and depends on the protocol in use as well as the operation being
153
+ executed. When running with the binary protocol, C< MEMCACHED_BEHAVIOR_BINARY_PROTOCOL>,
154
+ the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
155
+ When running with the ASCII protocol, the exact limit fluctuates depending on
156
+ which function is being executed and whether the function is a cas operation
157
+ or not. For non-cas ASCII set operations, there are at least 1335 bytes available
158
+ to split among the key, key_prefix, and value; for cas ASCII operations there are
159
+ at least 1318 bytes available to split among the key, key_prefix and value. If the
160
+ total size of the command, including overhead, exceeds 1400 bytes, a C<MEMCACHED_WRITE_FAILURE>
161
+ will be returned.
162
+
163
+
164
+ =head1 RETURN
165
+
166
+ All methods return a value of type C<memcached_return>.
167
+ On success the value will be C<MEMCACHED_SUCCESS>.
168
+ Use memcached_strerror() to translate this value to a printable string.
169
+
170
+ For memcached_replace() and memcached_add(), C<MEMCACHED_NOTSTORED> is a
171
+ legitmate error in the case of a collision.
172
+
173
+ =head1 HOME
174
+
175
+ To find out more information please check:
176
+ L<http://tangent.org/552/libmemcached.html>
177
+
178
+ =head1 AUTHOR
179
+
180
+ Brian Aker, E<lt>brian@tangent.orgE<gt>
181
+
182
+ =head1 SEE ALSO
183
+
184
+ memcached(1) libmemached(3) memcached_strerror(3)
185
+
186
+ =cut
187
+