Temp save for Monty.
[awesomized/libmemcached] / libhashkit / behavior.h
1 /* HashKit
2 * Copyright (C) 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
9 /**
10 * @file
11 * @brief HashKit Header
12 */
13
14 #ifndef HASHKIT_BEHAVIOR_H
15 #define HASHKIT_BEHAVIORH
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21
22 HASHKIT_API
23 hashkit_return_t hashkit_behavior_set_distribution(hashkit_st *hashkit, hashkit_distribution_t distribution);
24
25 HASHKIT_API
26 hashkit_distribution_t hashkit_behavior_get_distribution(hashkit_st *hashkit);
27
28 HASHKIT_API
29 hashkit_return_t hashkit_behavior_set_key_hash_algorithm(hashkit_st *hashkit, hashkit_hash_algorithm_t hash_algorithm);
30
31 HASHKIT_API
32 hashkit_hash_algorithm_t hashkit_behavior_get_key_hash_algorithm(hashkit_st *hashkit);
33
34 HASHKIT_API
35 void hashkit_behavior_set_active_fn(hashkit_st *hash, hashkit_active_fn *function);
36
37 HASHKIT_API
38 hashkit_active_fn * hashkit_behavior_get_active_fn(hashkit_st *hash);
39
40 HASHKIT_API
41 void hashkit_behavior_set_continuum_hash_fn(hashkit_st *hash, hashkit_fn *function);
42
43 HASHKIT_API
44 hashkit_fn * hashkit_behavior_get_continuum_hash_fn(hashkit_st *hash);
45
46 HASHKIT_API
47 void hashkit_behavior_set_continuum_key_fn(hashkit_st *hash, hashkit_key_fn *function);
48
49 HASHKIT_API
50 hashkit_key_fn * hashkit_behavior_get_continuum_key_fn(hashkit_st *hash);
51
52 HASHKIT_API
53 void hashkit_behavior_set_sort_fn(hashkit_st *hash, hashkit_sort_fn *function);
54
55 HASHKIT_API
56 hashkit_sort_fn * hashkit_behavior_get_sort_fn(hashkit_st *hash);
57
58 HASHKIT_API
59 void hashkit_behavior_set_weight_fn(hashkit_st *hash, hashkit_weight_fn *function);
60
61 HASHKIT_API
62 hashkit_weight_fn * hashkit_behavior_get_weight_fn(hashkit_st *hash);
63
64 #ifdef __cplusplus
65 }
66 #endif
67
68 #endif /* HASHKIT_BEHAVIOR_H */