Update for docs
[awesomized/libmemcached] / docs / man / memcached_increment_with_initial.3
1 .TH "MEMCACHED_INCREMENT_WITH_INITIAL" "3" "April 08, 2011" "0.47" "libmemcached"
2 .SH NAME
3 memcached_increment_with_initial \- 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 Manipulate counters
35 .SH LIBRARY
36 .sp
37 C Client Library for memcached (libmemcached, \-lmemcached)
38 .SH SYNOPSIS
39 .sp
40 .nf
41 .ft C
42 #include <libmemcached/memcached.h>
43
44 memcached_return_t
45 memcached_increment (memcached_st *ptr,
46 const char *key, size_t key_length,
47 unsigned int offset,
48 uint64_t *value);
49
50 memcached_return_t
51 memcached_decrement (memcached_st *ptr,
52 const char *key, size_t key_length,
53 unsigned int offset,
54 uint64_t *value);
55
56 memcached_return_t
57 memcached_increment_with_initial (memcached_st *ptr,
58 const char *key,
59 size_t key_length,
60 uint64_t offset,
61 uint64_t initial,
62 time_t expiration,
63 uint64_t *value);
64
65 memcached_return_t
66 memcached_decrement_with_initial (memcached_st *ptr,
67 const char *key,
68 size_t key_length,
69 uint64_t offset,
70 uint64_t initial,
71 time_t expiration,
72 uint64_t *value);
73
74 memcached_return_t
75 memcached_increment_by_key (memcached_st *ptr,
76 const char *master_key, size_t master_key_length,
77 const char *key, size_t key_length,
78 unsigned int offset,
79 uint64_t *value);
80
81 memcached_return_t
82 memcached_decrement_by_key (memcached_st *ptr,
83 const char *master_key, size_t master_key_length,
84 const char *key, size_t key_length,
85 unsigned int offset,
86 uint64_t *value);
87
88 memcached_return_t
89 memcached_increment_with_initial_by_key (memcached_st *ptr,
90 const char *master_key,
91 size_t master_key_length,
92 const char *key,
93 size_t key_length,
94 uint64_t offset,
95 uint64_t initial,
96 time_t expiration,
97 uint64_t *value);
98
99 memcached_return_t
100 memcached_decrement_with_initial_by_key (memcached_st *ptr,
101 const char *master_key,
102 size_t master_key_length,
103 const char *key,
104 size_t key_length,
105 uint64_t offset,
106 uint64_t initial,
107 time_t expiration,
108 uint64_t *value);
109 .ft P
110 .fi
111 .SH DESCRIPTION
112 .sp
113 memcached(1) servers have the ability to increment and decrement keys
114 (overflow and underflow are not detected). This gives you the ability to use
115 memcached to generate shared sequences of values.
116 .sp
117 memcached_increment() takes a key and keylength and increments the value by
118 the offset passed to it. The value is then returned via the unsigned int
119 value pointer you pass to it.
120 .sp
121 memcached_decrement() takes a key and keylength and decrements the value by
122 the offset passed to it. The value is then returned via the unsigned int
123 value pointer you pass to it.
124 .sp
125 memcached_increment_with_initial() takes a key and keylength and increments
126 the value by the offset passed to it. If the object specified by key does
127 not exist, one of two things may happen: If the expiration value is
128 MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
129 expiration values, the operation will succeed by seeding the value for that
130 key with a initial value to expire with the provided expiration time. The
131 flags will be set to zero.The value is then returned via the unsigned int
132 value pointer you pass to it.
133 .sp
134 memcached_decrement_with_initial() takes a key and keylength and decrements
135 the value by the offset passed to it. If the object specified by key does
136 not exist, one of two things may happen: If the expiration value is
137 MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
138 expiration values, the operation will succeed by seeding the value for that
139 key with a initial value to expire with the provided expiration time. The
140 flags will be set to zero.The value is then returned via the unsigned int
141 value pointer you pass to it.
142 .sp
143 memcached_increment_by_key(), memcached_decrement_by_key(),
144 memcached_increment_with_initial_by_key(), and
145 memcached_decrement_with_initial_by_key() are master key equivalents of the
146 above.
147 .SH RETURN
148 .sp
149 A value of type \fBmemcached_return_t\fP is returned.
150 On success that value will be \fBMEMCACHED_SUCCESS\fP.
151 Use memcached_strerror() to translate this value to a printable string.
152 .SH HOME
153 .sp
154 To find out more information please check:
155 \fI\%https://launchpad.net/libmemcached\fP
156 .SH AUTHOR
157 .sp
158 Brian Aker, <\fI\%brian@tangent.org\fP>
159 .SH SEE ALSO
160 .sp
161 memcached(1) libmemcached(3) memcached_strerror(3)
162 .SH AUTHOR
163 Brian Aker
164 .SH COPYRIGHT
165 2011, Brian Aker
166 .\" Generated by docutils manpage writer.
167 .\"
168 .