Merge in more updates for docs (we are just going to check them all in so that users...
[m6w6/libmemcached] / docs / man / memcached_pool_push.3
1 .TH "MEMCACHED_POOL_PUSH" "3" "April 07, 2011" "0.47" "libmemcached"
2 .SH NAME
3 memcached_pool_push \- 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 .sp
34 Manage pools
35 .SH LIBRARY
36 .sp
37 C Client Library for memcached (libmemcachedutil, \-lmemcachedutil)
38 .SH SYNOPSIS
39 .sp
40 .nf
41 .ft C
42 #include <libmemcached/memcached_pool.h>
43
44 memcached_pool_st *
45 memcached_pool_create(memcached_st* mmc, int initial, int max);
46
47 memcached_st *
48 memcached_pool_destroy(memcached_pool_st* pool);
49
50 memcached_st *
51 memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
52
53 memcached_return_t
54 memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
55
56 memcached_st *memcached_create (memcached_st *ptr);
57
58 memcached_return_t
59 memcached_pool_behavior_set(memcached_pool_st *pool,
60 memcached_behavior_t flag,
61 uint64_t data)
62
63 memcached_return_t
64 memcached_pool_behavior_get(memcached_pool_st *pool,
65 memcached_behavior_t flag,
66 uint64_t *value)
67 .ft P
68 .fi
69 .SH DESCRIPTION
70 .sp
71 memcached_pool_create() is used to create a connection pool of objects you
72 may use to remove the overhead of using memcached_clone for short
73 lived \fBmemcached_st\fP objects. The mmc argument should be an
74 initialised \fBmemcached_st\fP structure, and a successfull invocation of
75 memcached_pool_create takes full ownership of the variable (until it
76 is released by memcached_pool_destroy). The \fBinitial\fP argument
77 specifies the initial size of the connection pool, and the \fBmax\fPargument specifies the maximum size the connection pool should grow
78 to. Please note that the library will allocate a fixed size buffer
79 scaled to the max size of the connection pool, so you should not pass
80 MAXINT or some other large number here.
81 .sp
82 memcached_pool_destroy() is used to destroy the connection pool
83 created with memcached_pool_create() and release all allocated
84 resources. It will return the pointer to the \fBmemcached_st\fP structure
85 passed as an argument to memcached_pool_create(), and returns the
86 ownership of the pointer to the caller.
87 .sp
88 memcached_pool_pop() is used to grab a connection structure from the
89 connection pool. The block argument specifies if the function should
90 block and wait for a connection structure to be available if we try
91 to exceed the maximum size.
92 .sp
93 memcached_pool_push() is used to return a connection structure back to the pool.
94 .sp
95 memcached_pool_behavior_set() and memcached_pool_behagior_get() is
96 used to get/set behavior flags on all connections in the pool.
97 .SH RETURN
98 .sp
99 memcached_pool_create() returns a pointer to the newly created
100 memcached_pool_st structure. On an allocation failure, it returns
101 NULL.
102 .sp
103 memcached_pool_destroy() returns the pointer (and ownership) to the
104 memcached_st structure used to create the pool. If connections are in
105 use it returns NULL.
106 .sp
107 memcached_pool_pop() returns a pointer to a memcached_st structure
108 from the pool (or NULL if an allocation cannot be satisfied).
109 .sp
110 memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
111 .sp
112 memcached_pool_behavior_get() and memcached_pool_behavior_get()
113 returns MEMCACHED_SUCCESS upon success.
114 .SH HOME
115 .sp
116 To find out more information please check:
117 \fI\%https://launchpad.net/libmemcached\fP
118 .SH AUTHOR
119 .sp
120 Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
121 .SH SEE ALSO
122 .sp
123 memcached(1) libmemcached(3) memcached_create(3) memcached_free(3) libmemcachedutil(3) memcached_behavior_get(3) memcached_behavior_set(3)
124 .SH AUTHOR
125 Brian Aker
126 .SH COPYRIGHT
127 2011, Brian Aker
128 .\" Generated by docutils manpage writer.
129 .\"
130 .