1MEMCACHED_POOL_BEHAVIOR_SET(3)   libmemcached   MEMCACHED_POOL_BEHAVIOR_SET(3)
2
3
4

NAME

6       memcached_pool_behavior_set - libmemcached Documentation
7

SYNOPSIS

9       #include <libmemcached/memcached_pool.h>
10
11       memcached_pool_st
12
13       memcached_pool_st*       memcached_pool(const      char *option_string,
14       size_t option_string_length)
15
16       memcached_pool_st*  memcached_pool_create(memcached_st* mmc,   int ini‐
17       tial, int max)
18
19       Deprecated since version 0.46: Use memcached_pool()
20
21       memcached_st* memcached_pool_destroy(memcached_pool_st* pool)
22
23       memcached_st*  memcached_pool_pop(memcached_pool_st* pool,  bool block,
24       memcached_return_t *rc)
25
26       Deprecated since version 0.53: Use memcached_pool_fetch()
27
28       memcached_st*  memcached_pool_fetch(memcached_pool_st*,  struct   time‐
29       spec* relative_time, memcached_return_t* rc)
30
31       New in version 0.53: Synonym for memcached_pool_pop
32
33       memcached_return_t   memcached_pool_push(memcached_pool_st* pool,  mem‐
34       cached_st *mmc)
35
36       Deprecated since version 0.53: Use memcached_pool_push()
37
38       memcached_return_t memcached_pool_release(memcached_pool_st* pool, mem‐
39       cached_st* mmc)
40
41       New in version 0.53: Synonym for memcached_pool_push.
42
43       memcached_return_t memcached_pool_behavior_set(memcached_pool_st *pool,
44       memcached_behavior_t flag, uint64_t data)
45
46       memcached_return_t memcached_pool_behavior_get(memcached_pool_st *pool,
47       memcached_behavior_t flag, uint64_t *value)
48
49       Compile and link with -lmemcachedutil -lmemcached
50

DESCRIPTION

52       memcached_pool() is used to create a connection pool of objects you may
53       use to remove the overhead of using  memcached_clone  for  short  lived
54       memcached_st objects. Please see libmemcached_configuration for details
55       on the format of the configuration string.
56
57       memcached_pool_destroy() is used to destroy the connection pool created
58       with  memcached_pool_create()  and  release all allocated resources. It
59       will return the pointer to the  memcached_st  structure  passed  as  an
60       argument  to  memcached_pool_create(), and returns the ownership of the
61       pointer to the caller when created with memcached_pool_create(), other‐
62       wise NULL is returned..
63
64       memcached_pool_fetch() is used to fetch a connection structure from the
65       connection pool. The relative_time argument specifies if  the  function
66       should  block and wait for a connection structure to be available if we
67       try to exceed the maximum size. You need to specify  time  in  relative
68       time.
69
70       memcached_pool_release()  is used to return a connection structure back
71       to the pool.
72
73       memcached_pool_behavior_get() and memcached_pool_behavior_set() is used
74       to get/set behavior flags on all connections in the pool.
75
76       Both  memcached_pool_release()  and  memcached_pool_fetch()  are thread
77       safe.
78

RETURN

80       memcached_pool_destroy() returns the pointer  (and  ownership)  to  the
81       memcached_st  structure  used to create the pool. If connections are in
82       use it returns NULL.
83
84       memcached_pool_pop() returns a pointer to a memcached_st structure from
85       the pool (or NULL if an allocation cannot be satisfied).
86
87       memcached_pool_release() returns MEMCACHED_SUCCESS upon success.
88
89       memcached_pool_behavior_get() and memcached_pool_behavior_get() returns
90       MEMCACHED_SUCCESS upon success.
91
92       If any methods returns MEMCACHED_IN_PROGRESS then a lock  on  the  pool
93       could  not be obtained. If any of the parameters passed to any of these
94       functions is invalid, MEMCACHED_INVALID_ARGUMENTS will be returned.
95
96       memcached_pool_fetch may return MEMCACHED_TIMEOUT if a  timeout  occurs
97       while  waiting  for  a free memcached_st. MEMCACHED_NOTFOUND if no mem‐
98       cached_st was available.
99

HOME

101       To find out more information please check: http://libmemcached.org/
102

AUTHOR

104       Brian Aker, <brian@tangent.org>
105
106       Trond Norbye, <trond.norbye@gmail.com>
107

SEE ALSO

109       memcached(1) libmemcached(3) memcached_strerror(3) libmemcached_config‐
110       uration(3)
111

AUTHOR

113       Brian Aker
114
116       2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
117
118
119
120
1211.0.16                         January 31, 2013 MEMCACHED_POOL_BEHAVIOR_SET(3)
Impressum