X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fmemcached_constants.h;h=f698cff63e436e1af43c49fbd449110530d9b5f4;hb=f562c49d93b63a33b4c914a1c5b0ec43576aaafc;hp=65192bfbbc67f1471751e434dd82c51702059a18;hpb=8fce86636639afaeac4ca0e869e8bcd833324a62;p=m6w6%2Flibmemcached diff --git a/libmemcached/memcached_constants.h b/libmemcached/memcached_constants.h index 65192bfb..f698cff6 100644 --- a/libmemcached/memcached_constants.h +++ b/libmemcached/memcached_constants.h @@ -18,9 +18,13 @@ extern "C" { #define MEMCACHED_MAX_KEY 251 /* We add one to have it null terminated */ #define MEMCACHED_MAX_BUFFER 8196 #define MEMCACHED_MAX_HOST_LENGTH 64 -#define MEMCACHED_WHEEL_SIZE 1024 +#define MEMCACHED_MAX_HOST_SORT_LENGTH 86 /* Used for Ketama */ +#define MEMCACHED_POINTS_PER_SERVER 100 +#define MEMCACHED_CONTINUUM_SIZE MEMCACHED_POINTS_PER_SERVER*100 /* This would then set max hosts to 100 */ #define MEMCACHED_STRIDE 4 -#define MEMCACHED_DEFAULT_TIMEOUT INT32_MAX +#define MEMCACHED_DEFAULT_TIMEOUT 1000 +#define MEMCACHED_CONTINUUM_ADDITION 10 /* How many extra slots we should build for in the continuum */ +#define MEMCACHED_PREFIX_KEY_MAX_SIZE 12 typedef enum { MEMCACHED_SUCCESS, @@ -62,6 +66,8 @@ typedef enum { typedef enum { MEMCACHED_DISTRIBUTION_MODULA, MEMCACHED_DISTRIBUTION_CONSISTENT, + MEMCACHED_DISTRIBUTION_CONSISTENT_WHEEL, + MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA, } memcached_server_distribution; typedef enum { @@ -84,12 +90,15 @@ typedef enum { } memcached_behavior; typedef enum { + MEMCACHED_CALLBACK_PREFIX_KEY, MEMCACHED_CALLBACK_USER_DATA, MEMCACHED_CALLBACK_CLEANUP_FUNCTION, MEMCACHED_CALLBACK_CLONE_FUNCTION, MEMCACHED_CALLBACK_MALLOC_FUNCTION, MEMCACHED_CALLBACK_REALLOC_FUNCTION, MEMCACHED_CALLBACK_FREE_FUNCTION, + MEMCACHED_CALLBACK_GET_FAILURE, + MEMCACHED_CALLBACK_DELETE_TRIGGER, } memcached_callback; typedef enum { @@ -100,7 +109,6 @@ typedef enum { MEMCACHED_HASH_FNV1A_64, MEMCACHED_HASH_FNV1_32, MEMCACHED_HASH_FNV1A_32, - MEMCACHED_HASH_KETAMA, MEMCACHED_HASH_HSIEH, MEMCACHED_HASH_MURMUR, } memcached_hash;