number_of_hosts <-- encapsulated.
[m6w6/libmemcached] / docs / memcached_generate_hash_value.pod
1 =head1 NAME
2
3 memcached_generate_hash_value - Hash a key value
4
5 =head1 LIBRARY
6
7 C Client Library for memcached (libmemcached, -lmemcached)
8
9 =head1 SYNOPSIS
10
11 #include <memcached.h>
12
13 uint32_t
14 memcached_generate_hash_value (const char *key,
15 size_t key_length,
16 memcached_hash_t hash_algorithm);
17
18 uint32_t
19 memcached_generate_hash (memcached_st *ptr,
20 const char *key,
21 size_t key_length);
22
23 =head1 DESCRIPTION
24
25 memcached_generate_hash_value() allows you to hash a key using one of
26 the hash functions defined in the library. This method is provided for
27 the convenience of higher-level language bindings and is not necessary
28 for normal memcache operations.
29
30 The allowed hash algorithm constants are listed in the manpage for
31 memcached_behavior_set().
32
33 memcached_generate_hash() takes a memcached_st struture and produces
34 the hash value that would have been generated based on the defaults
35 of the memcached_st structure.
36
37 As of version 0.36 all hash methods have been placed into the library
38 libhashkit(3) which is linked with libmemcached(3).
39
40 =head1 RETURN
41
42 A 32-bit integer which is the result of hashing the given key.
43 For 64-bit hash algorithms, only the least-significant 32 bits are
44 returned.
45
46 =head1 HOME
47
48 To find out more information please check:
49 L<https://launchpad.net/libmemcached>
50
51 =head1 AUTHOR
52
53 Brian Aker, E<lt>brian@tangent.orgE<gt>
54
55 =head1 SEE ALSO
56
57 memcached(1) libmemcached(3) memcached_behavior_set(3) libhashkit(3)
58
59 =cut
60