X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libhashkit%2Fhashkit_function.html;h=f3581f7d41367eba069aaf40cfbcf606b004e99e;hb=48947a7a4247c948f23793d5da8b23cadc51c969;hp=f245f8ef6d21df53ef9ea5de08c39c0d09c8d6fe;hpb=d517b40976d8e986cada6b8b896e8f12cd179fa6;p=m6w6%2Flibmemcached diff --git a/libhashkit/hashkit_function.html b/libhashkit/hashkit_function.html index f245f8ef..f3581f7d 100644 --- a/libhashkit/hashkit_function.html +++ b/libhashkit/hashkit_function.html @@ -8,7 +8,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_set_function
(hashkit_st *hash, hashkit_hash_algorithm_t hash_algorithm)¶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_set_custom_function
(hashkit_st *hash, hashkit_hash_fn function, void *context)¶hashkit_hash_algorithm_t
¶HASHKIT_HASH_DEFAULT
¶Default hash algorithm (one_at_a_time).
+HASHKIT_HASH_MD5
¶hashkit_get_function
(const hashkit_st *hash)¶HASHKIT_HASH_CRC
¶hashkit_set_distribution_function
(hashkit_st *hash, hashkit_hash_algorithm_t hash_algorithm)¶HASHKIT_HASH_FNV1_64
¶hashkit_set_custom_distribution_function
(hashkit_st *self, hashkit_hash_fn function, void *context)¶HASHKIT_HASH_FNV1A_64
¶hashkit_get_distribution_function
(const hashkit_st *self)¶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)¶Parameters: |
|
+
---|---|
Returns: |
|
+
hashkit_set_custom_function
(hashkit_st *hash, hashkit_hash_fn function, void *context)¶Parameters: |
|
+
---|---|
Returns: |
|
+
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)¶Parameters: |
|
+
---|---|
Returns: |
|
+
hashkit_set_custom_distribution_function
(hashkit_st *hash, hashkit_hash_fn function, void *context)¶Parameters: |
|
+
---|
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.