1..::docs::memcached_auto(3)      libmemcached      ..::docs::memcached_auto(3)
2
3
4

NAME

6       memcached_increment, memcached_decrement,
7       memcached_increment_with_initial, memcached_decrement_with_initial -
8       Manipulate counters
9

LIBRARY

11       C Client Library for memcached (libmemcached, -lmemcached)
12

SYNOPSIS

14         #include <memcached.h>
15
16         memcached_return
17           memcached_increment (memcached_st *ptr,
18                                const char *key, size_t key_length,
19                                unsigned int offset,
20                                uint64_t *value);
21
22         memcached_return
23           memcached_decrement (memcached_st *ptr,
24                                const char *key, size_t key_length,
25                                unsigned int offset,
26                                uint64_t *value);
27
28         memcached_return
29           memcached_increment_with_initial (memcached_st *ptr,
30                                             const char *key,
31                                             size_t key_length,
32                                             uint64_t offset,
33                                             uint64_t initial,
34                                             time_t expiration,
35                                             uint64_t *value);
36
37         memcached_return
38           memcached_decrement_with_initial (memcached_st *ptr,
39                                             const char *key,
40                                             size_t key_length,
41                                             uint64_t offset,
42                                             uint64_t initial,
43                                             time_t expiration,
44                                             uint64_t *value);
45

DESCRIPTION

47       memcached(1) servers have the ability to increment and decrement keys
48       (overflow and underflow are not detected). This gives you the ability
49       to use memcached to generate shared sequences of values.
50
51       memcached_increment() takes a key and keylength and increments the
52       value by the offset passed to it. The value is then returned via the
53       unsigned int value pointer you pass to it.
54
55       memcached_decrement() takes a key and keylength and decrements the
56       value by the offset passed to it. The value is then returned via the
57       unsigned int value pointer you pass to it.
58
59       memcached_increment_with_initial() takes a key and keylength and
60       increments the value by the offset passed to it. If the object
61       specified by key does not exist, one of two things may happen: If the
62       expiration value is MEMCACHED_EXPIRATION_NOT_ADD, the operation will
63       fail. For all other expiration values, the operation will succeed by
64       seeding the value for that key with a initial value to expire with the
65       provided expiration time. The flags will be set to zero.The value is
66       then returned via the unsigned int value pointer you pass to it.
67
68       memcached_decrement_with_initial() takes a key and keylength and
69       decrements the value by the offset passed to it. If the object
70       specified by key does not exist, one of two things may happen: If the
71       expiration value is MEMCACHED_EXPIRATION_NOT_ADD, the operation will
72       fail. For all other expiration values, the operation will succeed by
73       seeding the value for that key with a initial value to expire with the
74       provided expiration time. The flags will be set to zero.The value is
75       then returned via the unsigned int value pointer you pass to it.
76

RETURN

78       A value of type "memcached_return" is returned.  On success that value
79       will be "MEMCACHED_SUCCESS".  Use memcached_strerror() to translate
80       this value to a printable string.
81

HOME

83       To find out more information please check:
84       <http://tangent.org/552/libmemcached.html>
85

AUTHOR

87       Brian Aker, <brian@tangent.org>
88

SEE ALSO

90       memcached(1) libmemcached(3) memcached_strerror(3)
91
92
93
94                                  2009-05-20       ..::docs::memcached_auto(3)
Impressum