1MEMCACHED_INCREMENT_WITH_INITIAL(3l)ibmemcacheMdEMCACHED_INCREMENT_WITH_INITIAL(3)
2
3
4
6 memcached_increment_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. mem‐
66 cached_increment_with_initial is only available when using the binary
67 protocol.
68
69 memcached_decrement_with_initial takes a key and keylength and decre‐
70 ments the value by the offset passed to it. If the object specified by
71 key does not exist, one of two things may happen: If the expiration
72 value is MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all
73 other expiration values, the operation will succeed by seeding the
74 value for that key with a initial value to expire with the provided
75 expiration time. The flags will be set to zero.The value is then
76 returned via the uint32_t value pointer you pass to it. mem‐
77 cached_decrement_with_initial is only available when using the binary
78 protocol.
79
80 memcached_increment_by_key(), memcached_decrement_by_key(),
81 memcached_increment_with_initial_by_key(), and
82 memcached_decrement_with_initial_by_key() are master key equivalents of
83 the above.
84
86 A value of type memcached_return_t is returned. On success that value
87 will be MEMCACHED_SUCCESS. Use memcached_strerror to translate this
88 value to a printable string.
89
91 To find out more information please check: http://libmemcached.org/
92
94 memcached(1) libmemcached(3) memcached_strerror(3)
95
97 Brian Aker
98
100 2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
101
102
103
104
1051.0.18 February 09,M2E0M1C4ACHED_INCREMENT_WITH_INITIAL(3)