1
.TH "MEMCACHED_POOL_POP" "3" "June 17, 2011" "0.49" "libmemcached"
3
memcached_pool_pop \- libmemcached Documentation
5
.nr rst2man-indent-level 0
9
level \\n[rst2man-indent-level]
10
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
17
.\" .rstReportMargin pre:
19
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20
. nr rst2man-indent-level +1
21
.\" .rstReportMargin post:
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
31
.\" Man page generated from reStructeredText.
35
#include <libmemcached/memcached_pool.h>
38
.B memcached_pool_st *memcached_pool(const char *option_string, size_t option_string_length);
42
.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max); DEPRECATED
46
.B memcached_st * memcached_pool_destroy(memcached_pool_st* pool);
50
.B memcached_st * memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
54
.B memcached_return_t memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
58
.B memcached_st *memcached_create (memcached_st *ptr);
62
.B memcached_return_t memcached_pool_behavior_set(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
66
.B memcached_return_t memcached_pool_behavior_get(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
69
Compile and link with \-lmemcachedutil \-lmemcached
72
memcached_pool() is used to create a connection pool of objects you may use
73
to remove the overhead of using memcached_clone for short lived
74
\fBmemcached_st\fPobjects. Please see \fIlibmemcached_configuration\fP for details on the format of the configuration string.
76
DEPRECATED memcached_pool_create() is used to create a connection pool of
77
objects you may use to remove the overhead of using memcached_clone for
78
short lived \fBmemcached_st\fPobjects. The mmc argument should be an
79
initialised \fBmemcached_st\fPstructure, and a successfull invocation of
80
memcached_pool_create takes full ownership of the variable (until it is
81
released by memcached_pool_destroy). The \fBinitial\fP argument specifies
82
the initial size of the connection pool, and the \fBmax\fPargument
83
specifies the maximum size the connection pool should grow to. Please note
84
that the library will allocate a fixed size buffer scaled to the max size of
85
the connection pool, so you should not pass MAXINT or some other large
88
memcached_pool_destroy() is used to destroy the connection pool
89
created with memcached_pool_create() and release all allocated
90
resources. It will return the pointer to the \fBmemcached_st\fP structure
91
passed as an argument to memcached_pool_create(), and returns the ownership
92
of the pointer to the caller when created with memcached_pool_create,
93
otherwise NULL is returned..
95
memcached_pool_pop() is used to grab a connection structure from the
96
connection pool. The block argument specifies if the function should
97
block and wait for a connection structure to be available if we try
98
to exceed the maximum size.
100
memcached_pool_push() is used to return a connection structure back to the pool.
102
memcached_pool_behavior_set() and memcached_pool_behagior_get() is
103
used to get/set behavior flags on all connections in the pool.
106
memcached_pool_create() returns a pointer to the newly created
107
memcached_pool_st structure. On an allocation failure, it returns
110
memcached_pool_destroy() returns the pointer (and ownership) to the
111
memcached_st structure used to create the pool. If connections are in
114
memcached_pool_pop() returns a pointer to a memcached_st structure
115
from the pool (or NULL if an allocation cannot be satisfied).
117
memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
119
memcached_pool_behavior_get() and memcached_pool_behavior_get()
120
returns MEMCACHED_SUCCESS upon success.
123
To find out more information please check:
124
\fI\%http://libmemcached.org/\fP
127
Brian Aker, <\fI\%brian@tangent.org\fP>
129
Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
132
\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
136
2011, Brian Aker DataDifferential, http://datadifferential.com/
137
.\" Generated by docutils manpage writer.