1MEMCACHED_DECREMENT_WITH_INITIAL(3l)ibmemcacheMdEMCACHED_DECREMENT_WITH_INITIAL(3)
2
3
4
6 memcached_decrement_with_initial - Incrementing and Decrementing Values
7
9 #include <libmemcached/memcached.h>
10
11 memcached_return_t memcached_increment(memcached_st *ptr, const
12 char *key, size_t key_length, uint32_t offset, uint64_t *value)
13
14 memcached_return_t memcached_decrement(memcached_st *ptr, const
15 char *key, size_t key_length, uint32_t offset, uint64_t *value)
16
17 memcached_return_t memcached_increment_with_initial(memcached_st *ptr,
18 const char *key, size_t key_length, uint64_t offset, uint64_t initial,
19 time_t expiration, uint64_t *value)
20
21 memcached_return_t memcached_decrement_with_initial(memcached_st *ptr,
22 const char *key, size_t key_length, uint64_t offset, uint64_t initial,
23 time_t expiration, uint64_t *value)
24
25 memcached_return_t memcached_increment_by_key(memcached_st *ptr, const
26 char *group_key, size_t group_key_length, const char *key,
27 size_t key_length, uint32_t offset, uint64_t *value)
28
29 memcached_return_t memcached_decrement_by_key(memcached_st *ptr, const
30 char *group_key, size_t group_key_length, const char *key,
31 size_t key_length, uint32_t offset, uint64_t *value)
32
33 memcached_return_t memcached_increment_with_initial_by_key(mem‐
34 cached_st *ptr, const char *group_key, size_t group_key_length, const
35 char *key, size_t key_length, uint64_t offset, uint64_t initial,
36 time_t expiration, uint64_t *value)
37
38 memcached_return_t memcached_decrement_with_initial_by_key(mem‐
39 cached_st *ptr, const char *group_key, size_t group_key_length, const
40 char *key, size_t key_length, uint64_t offset, uint64_t initial,
41 time_t expiration, uint64_t *value)
42
43 Compile and link with -lmemcached
44
46 memcached(1) servers have the ability to increment and decrement keys
47 (overflow and underflow are not detected). This gives you the ability
48 to use memcached to generate shared sequences of values.
49
50 memcached_increment takes a key and keylength and increments the value
51 by the offset passed to it. The value is then returned via the uint32_t
52 value pointer you pass to it.
53
54 memcached_decrement takes a key and keylength and decrements the value
55 by the offset passed to it. The value is then returned via the uint32_t
56 value pointer you pass to it.
57
58 memcached_increment_with_initial takes a key and keylength and incre‐
59 ments the value by the offset passed to it. If the object specified by
60 key does not exist, one of two things may happen: If the expiration
61 value is MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all
62 other expiration values, the operation will succeed by seeding the
63 value for that key with a initial value to expire with the provided
64 expiration time. The flags will be set to zero.The value is then
65 returned via the uint32_t value pointer you pass to it.
66
67 memcached_decrement_with_initial takes a key and keylength and decre‐
68 ments the value by the offset passed to it. If the object specified by
69 key does not exist, one of two things may happen: If the expiration
70 value is MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all
71 other expiration values, the operation will succeed by seeding the
72 value for that key with a initial value to expire with the provided
73 expiration time. The flags will be set to zero.The value is then
74 returned via the uint32_t value pointer you pass to it.
75
76 memcached_increment_by_key(), memcached_decrement_by_key(),
77 memcached_increment_with_initial_by_key(), and
78 memcached_decrement_with_initial_by_key() are master key equivalents of
79 the above.
80
82 A value of type memcached_return_t is returned. On success that value
83 will be MEMCACHED_SUCCESS. Use memcached_strerror to translate this
84 value to a printable string.
85
87 To find out more information please check: http://libmemcached.org/
88
90 memcached(1) libmemcached(3) memcached_strerror(3)
91
93 Brian Aker
94
96 2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
97
98
99
100
1011.0.16 January 31, 2M0E1M3CACHED_DECREMENT_WITH_INITIAL(3)