Merge Trond
[m6w6/libmemcached] / libmemcached / behavior.h
1 /* LibMemcached
2 * Copyright (C) 2006-2009 Brian Aker
3 * All rights reserved.
4 *
5 * Use and distribution licensed under the BSD license. See
6 * the COPYING file in the parent directory for full text.
7 *
8 * Summary: Change the behavior of the memcached connection.
9 *
10 */
11
12 #ifndef __MEMCACHED_BEHAVIOR_H__
13 #define __MEMCACHED_BEHAVIOR_H__
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 LIBMEMCACHED_API
20 memcached_return_t memcached_behavior_set(memcached_st *ptr, const memcached_behavior_t flag, uint64_t data);
21
22 LIBMEMCACHED_API
23 uint64_t memcached_behavior_get(memcached_st *ptr, const memcached_behavior_t flag);
24
25 LIBMEMCACHED_API
26 memcached_return_t memcached_behavior_set_distribution(memcached_st *ptr, memcached_server_distribution_t type);
27
28 LIBMEMCACHED_API
29 memcached_server_distribution_t memcached_behavior_get_distribution(memcached_st *ptr);
30
31 LIBMEMCACHED_API
32 memcached_return_t memcached_behavior_set_key_hash(memcached_st *ptr, memcached_hash_t type);
33
34 LIBMEMCACHED_API
35 memcached_hash_t memcached_behavior_get_key_hash(memcached_st *ptr);
36
37 LIBMEMCACHED_API
38 memcached_return_t memcached_behavior_set_distribution_hash(memcached_st *ptr, memcached_hash_t type);
39
40 LIBMEMCACHED_API
41 memcached_hash_t memcached_behavior_get_distribution_hash(memcached_st *ptr);
42
43
44 #ifdef __cplusplus
45 }
46 #endif
47
48 #endif /* __MEMCACHED_BEHAVIOR_H__ */