X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libhashkit%2Fhashkit_function.html;h=fa02741186ea7065bfe3d493d41485025e76c39b;hb=cffe0635412a614ab01705628d406918b0ade7fe;hp=3f280cf20057e9634fb77a232c11cb233f55a9da;hpb=c6fde8b6a27b6af31f0cf26a9cdccd54cd25734a;p=awesomized%2Flibmemcached diff --git a/libhashkit/hashkit_function.html b/libhashkit/hashkit_function.html index 3f280cf2..fa027411 100644 --- a/libhashkit/hashkit_function.html +++ b/libhashkit/hashkit_function.html @@ -8,7 +8,7 @@ -
libmemcached
-libmemcachedutil
- -libhashkit
-Client Applications
- -Copyright
@@ -128,7 +116,7 @@ @@ -159,7 +147,7 @@Compile and link with -lhashkit
-hashkit_hash_fn
)(const char *key, size_t key_length, void *context)¶hashkit_hash_fn
)(const char *key, size_t key_length, void *context)¶Parameters: |
|
+
---|---|
Returns: | the custom hash function should return a hash value for |
+
hashkit_return_t
¶hashkit_return_t
¶HASHKIT_SUCCESS
¶Operation succeeded.
+HASHKIT_FAILURE
¶Operation failed.
+HASHKIT_MEMORY_ALLOCATION_FAILURE
¶Memory allocation failed.
+HASHKIT_INVALID_HASH
¶Invalid hashkit_hash_algorithm_t
passed.
HASHKIT_INVALID_ARGUMENT
¶Invalid argument passed.
+hashkit_hash_algorithm_t
¶hashkit_hash_algorithm_t
¶HASHKIT_HASH_DEFAULT
¶Default hash algorithm (one_at_a_time).
+HASHKIT_HASH_MD5
¶HASHKIT_HASH_CRC
¶HASHKIT_HASH_FNV1_64
¶HASHKIT_HASH_FNV1A_64
¶HASHKIT_HASH_FNV1_32
¶HASHKIT_HASH_FNV1A_32
¶HASHKIT_HASH_HSIEH
¶Only available if libhashkit
hash been built with HSIEH support.
HASHKIT_HASH_MURMUR
¶Only available if libhashkit
has been built with MURMUR support.
HASHKIT_HASH_MURMUR3
¶Only available if libhashkit
has been built with MURMUR support.
HASHKIT_HASH_JENKINS
¶HASHKIT_HASH_CUSTOM
¶Use custom hashkit_hash_fn
function set through hashkit_set_custom_function()
or hashkit_set_custom_distribution_function()
.
hashkit_set_function
(hashkit_st *hash, hashkit_hash_algorithm_t hash_algorithm)¶hashkit_set_function
(hashkit_st *hash, hashkit_hash_algorithm_t hash_algorithm)¶Parameters: |
|
+
---|---|
Returns: |
|
+
hashkit_set_custom_function
(hashkit_st *hash, hashkit_hash_fn function, void *context)¶hashkit_set_custom_function
(hashkit_st *hash, hashkit_hash_fn function, void *context)¶Parameters: |
|
+
---|---|
Returns: |
|
+
hashkit_get_function
(const hashkit_st *hash)¶hashkit_get_function
(const hashkit_st *hash)¶Parameters: | hash -- pointer to an initialized hashkit_st struct |
+
---|---|
Returns: | hashkit_hash_algorithm_t indicating the currently set hash algorithm to use |
+
hashkit_set_distribution_function
(hashkit_st *hash, hashkit_hash_algorithm_t hash_algorithm)¶hashkit_set_distribution_function
(hashkit_st *hash, hashkit_hash_algorithm_t hash_algorithm)¶Parameters: |
|
+
---|---|
Returns: |
|
+
hashkit_set_custom_distribution_function
(hashkit_st *self, hashkit_hash_fn function, void *context)¶hashkit_set_custom_distribution_function
(hashkit_st *hash, hashkit_hash_fn function, void *context)¶Parameters: |
|
+
---|
hashkit_get_distribution_function
(const hashkit_st *self)¶hashkit_get_distribution_function
(const hashkit_st *hash)¶Parameters: | hash -- pointer to an initialized hashkit_st struct |
+
---|---|
Returns: | hashkit_hash_algorithm_t indicating the currently set distribution hash algorithm to use |
+
hashkit_set_function()
, hashkit_set_custom_function()
and the distribution
-equivalents return hashkit_return_t
HASHKIT_SUCCESS
on success.
hashkit_return_t::HASHKIT_SUCCESS
on success.
hashkit_get_function()
and hashkit_get_distribution_function()
return
-hashkit_hash_algorithm_t
indicating the hash function used.
hashkit_hash_algorithm_t
indicating the hash function used.