Update to handle newer endian autoconf components.
[awesomized/libmemcached] / docs / man / memcached_pool.3
1 .TH "MEMCACHED_POOL" "3" "July 05, 2012" "1.0.9" "libmemcached"
2 .SH NAME
3 memcached_pool \- 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 .sp
35 #include <libmemcached/memcached_pool.h>
36 .INDENT 0.0
37 .TP
38 .B memcached_pool_st
39 .UNINDENT
40 .INDENT 0.0
41 .TP
42 .B \fI\%memcached_pool_st\fP* memcached_pool(const char\fI\ *option_string\fP, size_t\fI\ option_string_length\fP)
43 .UNINDENT
44 .INDENT 0.0
45 .TP
46 .B \fI\%memcached_pool_st\fP* memcached_pool_create(memcached_st*\fI\ mmc\fP, int\fI\ initial\fP, int\fI\ max\fP)
47 .UNINDENT
48 .sp
49 Deprecated since version 0.46: Use \fI\%memcached_pool()\fP
50 .INDENT 0.0
51 .TP
52 .B memcached_st* memcached_pool_destroy(\fI\%memcached_pool_st\fP*\fI\ pool\fP)
53 .UNINDENT
54 .INDENT 0.0
55 .TP
56 .B memcached_st* memcached_pool_pop(\fI\%memcached_pool_st\fP*\fI\ pool\fP, bool\fI\ block\fP, memcached_return_t\fI\ *rc\fP)
57 .UNINDENT
58 .sp
59 Deprecated since version 0.53: Use \fI\%memcached_pool_fetch()\fP
60 .INDENT 0.0
61 .TP
62 .B memcached_st* memcached_pool_fetch(\fI\%memcached_pool_st\fP*, struct timespec*\fI\ relative_time\fP, memcached_return_t*\fI\ rc\fP)
63 .UNINDENT
64 .sp
65 New in version 0.53: Synonym for memcached_pool_pop
66 .INDENT 0.0
67 .TP
68 .B memcached_return_t memcached_pool_push(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st\fI\ *mmc\fP)
69 .UNINDENT
70 .sp
71 Deprecated since version 0.53: Use \fI\%memcached_pool_push()\fP
72 .INDENT 0.0
73 .TP
74 .B memcached_return_t memcached_pool_release(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st*\fI\ mmc\fP)
75 .UNINDENT
76 .sp
77 New in version 0.53: Synonym for memcached_pool_push.
78 .INDENT 0.0
79 .TP
80 .B memcached_return_t memcached_pool_behavior_set(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
81 .UNINDENT
82 .INDENT 0.0
83 .TP
84 .B memcached_return_t memcached_pool_behavior_get(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
85 .UNINDENT
86 .sp
87 Compile and link with \-lmemcachedutil \-lmemcached
88 .SH DESCRIPTION
89 .sp
90 \fI\%memcached_pool()\fP is used to create a connection pool of objects you
91 may use to remove the overhead of using memcached_clone for short lived
92 \fBmemcached_st\fP objects. Please see \fBlibmemcached_configuration\fP for details on the format of the configuration string.
93 .sp
94 \fI\%memcached_pool_destroy()\fP is used to destroy the connection pool
95 created with \fI\%memcached_pool_create()\fP and release all allocated
96 resources. It will return the pointer to the \fBmemcached_st\fP structure
97 passed as an argument to \fI\%memcached_pool_create()\fP, and returns the ownership of the pointer to the caller when created with \fI\%memcached_pool_create()\fP, otherwise NULL is returned..
98 .sp
99 \fI\%memcached_pool_fetch()\fP is used to fetch a connection structure from the
100 connection pool. The relative_time argument specifies if the function should
101 block and wait for a connection structure to be available if we try
102 to exceed the maximum size. You need to specify time in relative time.
103 .sp
104 \fI\%memcached_pool_release()\fP is used to return a connection structure back to the pool.
105 .sp
106 \fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_set()\fP is used to get/set behavior flags on all connections in the pool.
107 .sp
108 Both \fI\%memcached_pool_release()\fP and \fI\%memcached_pool_fetch()\fP are thread safe.
109 .SH RETURN
110 .sp
111 \fI\%memcached_pool_destroy()\fP returns the pointer (and ownership) to the \fBmemcached_st\fP structure used to create the pool. If connections are in use it returns NULL.
112 .sp
113 \fI\%memcached_pool_pop()\fP returns a pointer to a \fBmemcached_st\fP structure from the pool (or NULL if an allocation cannot be satisfied).
114 .sp
115 \fI\%memcached_pool_release()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
116 .sp
117 \fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_get()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
118 .sp
119 If any methods returns MEMCACHED_IN_PROGRESS then a lock on the pool could not be obtained. If any of the parameters passed to any of these functions is invalid, MEMCACHED_INVALID_ARGUMENTS will be returned.
120 .sp
121 memcached_pool_fetch may return MEMCACHED_TIMEOUT if a timeout occurs while waiting for a free memcached_st. MEMCACHED_NOTFOUND if no memcached_st was available.
122 .SH HOME
123 .sp
124 To find out more information please check:
125 \fI\%http://libmemcached.org/\fP
126 .SH AUTHOR
127 .sp
128 Brian Aker, <\fI\%brian@tangent.org\fP>
129 .sp
130 Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
131 .SH SEE ALSO
132 .sp
133 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP \fIlibmemcached_configuration(3)\fP
134 .SH AUTHOR
135 Brian Aker
136 .SH COPYRIGHT
137 2011, Brian Aker DataDifferential, http://datadifferential.com/
138 .\" Generated by docutils manpage writer.
139 .\"
140 .