~piotr-sikora/libmemcached/connect-fix

« back to all changes in this revision

Viewing changes to docs/man/memcached_pool_pop.3

  • Committer: Brian Aker
  • Date: 2011-06-18 03:50:54 UTC
  • mfrom: (929.1.148 libmemcached-build)
  • Revision ID: brian@tangent.org-20110618035054-qyuahv16cx83kyef
Merge Trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH "MEMCACHED_POOL_POP" "3" "June 17, 2011" "0.49" "libmemcached"
 
2
.SH NAME
 
3
memcached_pool_pop \- 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 *memcached_pool(const char *option_string, size_t option_string_length);
 
39
.UNINDENT
 
40
.INDENT 0.0
 
41
.TP
 
42
.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max); DEPRECATED
 
43
.UNINDENT
 
44
.INDENT 0.0
 
45
.TP
 
46
.B memcached_st * memcached_pool_destroy(memcached_pool_st* pool);
 
47
.UNINDENT
 
48
.INDENT 0.0
 
49
.TP
 
50
.B memcached_st * memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
 
51
.UNINDENT
 
52
.INDENT 0.0
 
53
.TP
 
54
.B memcached_return_t memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
 
55
.UNINDENT
 
56
.INDENT 0.0
 
57
.TP
 
58
.B memcached_st *memcached_create (memcached_st *ptr);
 
59
.UNINDENT
 
60
.INDENT 0.0
 
61
.TP
 
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)
 
63
.UNINDENT
 
64
.INDENT 0.0
 
65
.TP
 
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)
 
67
.UNINDENT
 
68
.sp
 
69
Compile and link with \-lmemcachedutil \-lmemcached
 
70
.SH DESCRIPTION
 
71
.sp
 
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.
 
75
.sp
 
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
 
86
number here.
 
87
.sp
 
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..
 
94
.sp
 
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.
 
99
.sp
 
100
memcached_pool_push() is used to return a connection structure back to the pool.
 
101
.sp
 
102
memcached_pool_behavior_set() and memcached_pool_behagior_get() is
 
103
used to get/set behavior flags on all connections in the pool.
 
104
.SH RETURN
 
105
.sp
 
106
memcached_pool_create() returns a pointer to the newly created
 
107
memcached_pool_st structure. On an allocation failure, it returns
 
108
NULL.
 
109
.sp
 
110
memcached_pool_destroy() returns the pointer (and ownership) to the
 
111
memcached_st structure used to create the pool. If connections are in
 
112
use it returns NULL.
 
113
.sp
 
114
memcached_pool_pop() returns a pointer to a memcached_st structure
 
115
from the pool (or NULL if an allocation cannot be satisfied).
 
116
.sp
 
117
memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
 
118
.sp
 
119
memcached_pool_behavior_get() and memcached_pool_behavior_get()
 
120
returns MEMCACHED_SUCCESS upon success.
 
121
.SH HOME
 
122
.sp
 
123
To find out more information please check:
 
124
\fI\%http://libmemcached.org/\fP
 
125
.SH AUTHOR
 
126
.sp
 
127
Brian Aker, <\fI\%brian@tangent.org\fP>
 
128
.sp
 
129
Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
 
130
.SH SEE ALSO
 
131
.sp
 
132
\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
 
133
.SH AUTHOR
 
134
Brian Aker
 
135
.SH COPYRIGHT
 
136
2011, Brian Aker DataDifferential, http://datadifferential.com/
 
137
.\" Generated by docutils manpage writer.
 
138
.\" 
 
139
.