* New error system.
* New flow control for messages means faster get/set calls.
* Added new documentation system.
+ * A behavior change has been now made that if you specify a weight for any
+ server, we enable the weight flag and do weight balancing.
* A behavior change has been now made that if you specify a weight for any server, we enable the weight flag and do weight balancing.
-
* Added MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS to simplify the setting of AUTO REJECT for servers.
0.48 Tue Mar 15 23:05:18 PDT 2011
-.TH "HASHKIT_CLONE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_CLONE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_clone \- libhashkit Documentation
.
-.TH "HASHKIT_CRC32" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_CRC32" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_crc32 \- libhashkit Documentation
.
-.TH "HASHKIT_CREATE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_CREATE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_create \- libhashkit Documentation
.
-.TH "HASHKIT_FNV1_32" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_FNV1_32" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_fnv1_32 \- libhashkit Documentation
.
-.TH "HASHKIT_FNV1_64" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_FNV1_64" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_fnv1_64 \- libhashkit Documentation
.
-.TH "HASHKIT_FNV1A_32" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_FNV1A_32" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_fnv1a_32 \- libhashkit Documentation
.
-.TH "HASHKIT_FNV1A_64" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_FNV1A_64" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_fnv1a_64 \- libhashkit Documentation
.
-.TH "HASHKIT_FREE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_FREE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_free \- libhashkit Documentation
.
-.TH "HASHKIT_FUNCTIONS" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_FUNCTIONS" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_functions \- libhashkit Documentation
.
-.TH "HASHKIT_HSIEH" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_HSIEH" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_hsieh \- libhashkit Documentation
.
-.TH "HASHKIT_IS_ALLOCATED" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_IS_ALLOCATED" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_is_allocated \- libhashkit Documentation
.
-.TH "HASHKIT_JENKINS" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_JENKINS" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_jenkins \- libhashkit Documentation
.
-.TH "HASHKIT_MD5" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_MD5" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_md5 \- libhashkit Documentation
.
-.TH "HASHKIT_MURMUR" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_MURMUR" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_murmur \- libhashkit Documentation
.
-.TH "HASHKIT_VALUE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "HASHKIT_VALUE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
hashkit_value \- libhashkit Documentation
.
-.TH "LIBHASHKIT" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "LIBHASHKIT" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
libhashkit \- libhashkit Documentation
.
-.TH "LIBMEMCACHED" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "LIBMEMCACHED" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
libmemcached \- Introducing the C Client Library for memcached
.
-.TH "LIBMEMCACHED_CHECK_CONFIGURATION" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "LIBMEMCACHED_CHECK_CONFIGURATION" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
libmemcached_check_configuration \- libmemcached Documentation
.
-.TH "LIBMEMCACHED_CONFIGURATION" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "LIBMEMCACHED_CONFIGURATION" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
libmemcached_configuration \- libmemcached Documentation
.
-.TH "LIBMEMCACHED_EXAMPLES" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "LIBMEMCACHED_EXAMPLES" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
libmemcached_examples \- libmemcached Documentation
.
-.TH "LIBMEMCACHEDUTIL" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "LIBMEMCACHEDUTIL" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
libmemcachedutil \- libmemcached Documentation
.
-.TH "MEMASLAP" "1" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMASLAP" "1" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memaslap \- libmemcached Documentation
.
-.TH "MEMCACHED" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached \- libmemcached Documentation
.
-.TH "MEMCACHED_ADD" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_ADD" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_add \- Storing and Replacing Data
.
-.TH "MEMCACHED_ADD_BY_KEY" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_ADD_BY_KEY" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_add_by_key \- Storing and Replacing Data
.
-.TH "MEMCACHED_ANALYZE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_ANALYZE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_analyze \- libmemcached Documentation
.
-.TH "MEMCACHED_APPEND" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_APPEND" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_append \- Appending to or Prepending to data on the server
.
-.TH "MEMCACHED_APPEND_BY_KEY" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_APPEND_BY_KEY" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_append_by_key \- Appending to or Prepending to data on the server
.
-.TH "MEMCACHED_AUTO" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_AUTO" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_auto \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_BEHAVIOR" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_BEHAVIOR" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_behavior \- libmemcached Documentation
.
-.TH "MEMCACHED_BEHAVIOR_GET" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_BEHAVIOR_GET" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_behavior_get \- libmemcached Documentation
.
-.TH "MEMCACHED_BEHAVIOR_SET" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_BEHAVIOR_SET" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_behavior_set \- libmemcached Documentation
.
-.TH "MEMCACHED_CALLBACK" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_CALLBACK" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_callback \- libmemcached Documentation
.
-.TH "MEMCACHED_CALLBACK_GET" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_CALLBACK_GET" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_callback_get \- libmemcached Documentation
.
-.TH "MEMCACHED_CALLBACK_SET" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_CALLBACK_SET" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_callback_set \- libmemcached Documentation
.
-.TH "MEMCACHED_CAS" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_CAS" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_cas \- Working with data on the server in an atomic fashion
.
-.TH "MEMCACHED_CAS_BY_KEY" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_CAS_BY_KEY" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_cas_by_key \- Storing and Replacing Data
.
-.TH "MEMCACHED_CLONE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_CLONE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_clone \- libmemcached Documentation
.
-.TH "MEMCACHED_CREATE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_CREATE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_create \- libmemcached Documentation
.
-.TH "MEMCACHED_DECREMENT" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_DECREMENT" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_decrement \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_DECREMENT_WITH_INITIAL" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_DECREMENT_WITH_INITIAL" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_decrement_with_initial \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_DELETE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_DELETE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_delete \- libmemcached Documentation
.
-.TH "MEMCACHED_DELETE_BY_KEY" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_DELETE_BY_KEY" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_delete_by_key \- libmemcached Documentation
.
-.TH "MEMCACHED_DESTROY_SASL_AUTH_DATA" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_DESTROY_SASL_AUTH_DATA" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_destroy_sasl_auth_data \- libmemcached Documentation
.
-.TH "MEMCACHED_DUMP" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_DUMP" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_dump \- libmemcached Documentation
.
-.TH "MEMCACHED_FETCH" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_FETCH" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_fetch \- Retrieving data from the server
.
-.TH "MEMCACHED_FETCH_EXECUTE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_FETCH_EXECUTE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_fetch_execute \- Retrieving data from the server
.
-.TH "MEMCACHED_FETCH_RESULT" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_FETCH_RESULT" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_fetch_result \- Retrieving data from the server
.
-.TH "MEMCACHED_FLUSH" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_FLUSH" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_flush \- libmemcached Documentation
.
Compile and link with \-lmemcached
.SH DESCRIPTION
.sp
-memcached_flush() is used to wipe clean the contents of memcached(1) servers.
+:c:func::\fImemcached_flush()\fP is used to wipe clean the contents of memcached(1) servers.
It will either do this immediately or expire the content based on the
expiration time passed to the method (a value of zero causes an immediate
flush). The operation is not atomic to multiple servers, just atomic to a
added.
.SH RETURN
.sp
-A value of type \fBmemcached_return_t\fP is returned
+A value of type \fBmemcached_return_t\fP is returned
On success that value will be \fBMEMCACHED_SUCCESS\fP.
-Use memcached_strerror() to translate this value to a printable string.
+Use \fBmemcached_strerror()\fP to translate this value to a printable string.
.SH HOME
.sp
To find out more information please check:
-.TH "MEMCACHED_FLUSH_BUFFERS" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_FLUSH_BUFFERS" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_flush_buffers \- libmemcached Documentation
.
-.TH "MEMCACHED_FREE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_FREE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_free \- libmemcached Documentation
.
-.TH "MEMCACHED_GENERATE_HASH" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_GENERATE_HASH" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_generate_hash \- Generating hash values directly
.
-.TH "MEMCACHED_GENERATE_HASH_VALUE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_GENERATE_HASH_VALUE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_generate_hash_value \- Generating hash values directly
.
-.TH "MEMCACHED_GET" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_GET" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_get \- Retrieving data from the server
.
-.TH "MEMCACHED_GET_BY_KEY" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_GET_BY_KEY" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_get_by_key \- Retrieving data from the server
.
-.TH "MEMCACHED_GET_MEMORY_ALLOCATORS" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_GET_MEMORY_ALLOCATORS" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_get_memory_allocators \- libmemcached Documentation
.
-.TH "MEMCACHED_GET_SASL_CALLBACKS" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_GET_SASL_CALLBACKS" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_get_sasl_callbacks \- libmemcached Documentation
.
-.TH "MEMCACHED_GET_USER_DATA" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_GET_USER_DATA" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_get_user_data \- libmemcached Documentation
.
-.TH "MEMCACHED_INCREMENT" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_INCREMENT" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_increment \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_INCREMENT_WITH_INITIAL" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_INCREMENT_WITH_INITIAL" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_increment_with_initial \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_LIB_VERSION" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_LIB_VERSION" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_lib_version \- libmemcached Documentation
.
-.TH "MEMCACHED_MEMORY_ALLOCATORS" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_MEMORY_ALLOCATORS" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_memory_allocators \- libmemcached Documentation
.
-.TH "MEMCACHED_MGET" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_MGET" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_mget \- Retrieving data from the server
.
-.TH "MEMCACHED_MGET_BY_KEY" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_MGET_BY_KEY" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_mget_by_key \- Retrieving data from the server
.
-.TH "MEMCACHED_MGET_EXECUTE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_MGET_EXECUTE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_mget_execute \- Retrieving data from the server
.
-.TH "MEMCACHED_MGET_EXECUTE_BY_KEY" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_MGET_EXECUTE_BY_KEY" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_mget_execute_by_key \- Retrieving data from the server
.
-.TH "MEMCACHED_POOL" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_POOL" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_pool \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_BEHAVIOR_GET" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_POOL_BEHAVIOR_GET" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_pool_behavior_get \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_BEHAVIOR_SET" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_POOL_BEHAVIOR_SET" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_pool_behavior_set \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_CREATE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_POOL_CREATE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_pool_create \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_DESTROY" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_POOL_DESTROY" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_pool_destroy \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_POP" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_POOL_POP" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_pool_pop \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_PUSH" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_POOL_PUSH" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_pool_push \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_ST" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_POOL_ST" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_pool_st \- libmemcached Documentation
.
-.TH "MEMCACHED_PREPEND" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_PREPEND" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_prepend \- Appending to or Prepending to data on the server
.
-.TH "MEMCACHED_PREPEND_BY_KEY" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_PREPEND_BY_KEY" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_prepend_by_key \- Appending to or Prepending to data on the server
.
-.TH "MEMCACHED_QUIT" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_QUIT" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_quit \- libmemcached Documentation
.
-.TH "MEMCACHED_REPLACE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_REPLACE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_replace \- Storing and Replacing Data
.
-.TH "MEMCACHED_REPLACE_BY_KEY" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_REPLACE_BY_KEY" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_replace_by_key \- Storing and Replacing Data
.
-.TH "MEMCACHED_RESULT_CAS" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_RESULT_CAS" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_result_cas \- Working with result sets
.
-.TH "MEMCACHED_RESULT_CREATE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_RESULT_CREATE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_result_create \- Working with result sets
.
-.TH "MEMCACHED_RESULT_FLAGS" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_RESULT_FLAGS" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_result_flags \- Working with result sets
.
-.TH "MEMCACHED_RESULT_FREE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_RESULT_FREE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_result_free \- Working with result sets
.
-.TH "MEMCACHED_RESULT_KEY_LENGTH" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_RESULT_KEY_LENGTH" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_result_key_length \- Working with result sets
.
-.TH "MEMCACHED_RESULT_KEY_VALUE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_RESULT_KEY_VALUE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_result_key_value \- Working with result sets
.
-.TH "MEMCACHED_RESULT_LENGTH" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_RESULT_LENGTH" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_result_length \- Working with result sets
.
-.TH "MEMCACHED_RESULT_ST" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_RESULT_ST" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_result_st \- Working with result sets
.
-.TH "MEMCACHED_RESULT_VALUE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_RESULT_VALUE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_result_value \- Working with result sets
.
-.TH "MEMCACHED_SASL" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SASL" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_sasl \- libmemcached Documentation
.
-.TH "MEMCACHED_SASL_SET_AUTH_DATA" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SASL_SET_AUTH_DATA" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_sasl_set_auth_data \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_ADD" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SERVER_ADD" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_server_add \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_ADD_UNIX_SOCKET" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SERVER_ADD_UNIX_SOCKET" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_server_add_unix_socket \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_COUNT" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SERVER_COUNT" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_server_count \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_CURSOR" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SERVER_CURSOR" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_server_cursor \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_LIST" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SERVER_LIST" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_server_list \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_LIST_APPEND" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SERVER_LIST_APPEND" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_server_list_append \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_LIST_COUNT" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SERVER_LIST_COUNT" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_server_list_count \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_LIST_FREE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SERVER_LIST_FREE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_server_list_free \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_PUSH" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SERVER_PUSH" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_server_push \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_ST" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SERVER_ST" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_server_st \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVERS" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SERVERS" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_servers \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVERS_PARSE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SERVERS_PARSE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_servers_parse \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVERS_RESET" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SERVERS_RESET" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_servers_reset \- libmemcached Documentation
.
-.TH "MEMCACHED_SET" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SET" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_set \- Storing and Replacing Data
.
-.TH "MEMCACHED_SET_BY_KEY" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SET_BY_KEY" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_set_by_key \- Storing and Replacing Data
.
-.TH "MEMCACHED_SET_MEMORY_ALLOCATORS" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SET_MEMORY_ALLOCATORS" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_set_memory_allocators \- libmemcached Documentation
.
-.TH "MEMCACHED_SET_MEMORY_ALLOCATORS_CONTEXT" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SET_MEMORY_ALLOCATORS_CONTEXT" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_set_memory_allocators_context \- libmemcached Documentation
.
-.TH "MEMCACHED_SET_SASL_CALLBACKS" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SET_SASL_CALLBACKS" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_set_sasl_callbacks \- libmemcached Documentation
.
-.TH "MEMCACHED_SET_USER_DATA" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_SET_USER_DATA" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_set_user_data \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_STAT" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_stat \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT_EXECUTE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_STAT_EXECUTE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_stat_execute \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT_GET_KEYS" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_STAT_GET_KEYS" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_stat_get_keys \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT_GET_VALUE" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_STAT_GET_VALUE" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_stat_get_value \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT_SERVERNAME" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_STAT_SERVERNAME" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_stat_servername \- libmemcached Documentation
.
-.TH "MEMCACHED_STATS" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_STATS" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_stats \- libmemcached Documentation
.
-.TH "MEMCACHED_STRERROR" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_STRERROR" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_strerror \- libmemcached Documentation
.
-.TH "MEMCACHED_USER_DATA" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_USER_DATA" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_user_data \- libmemcached Documentation
.
-.TH "MEMCACHED_VERBOSITY" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_VERBOSITY" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_verbosity \- libmemcached Documentation
.
-.TH "MEMCACHED_VERSION" "3" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCACHED_VERSION" "3" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcached_version \- libmemcached Documentation
.
-.TH "MEMCAPABLE" "1" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCAPABLE" "1" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcapable \- libmemcached Documentation
.
-.TH "MEMCAT" "1" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCAT" "1" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcat \- libmemcached Documentation
.
-.TH "MEMCP" "1" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMCP" "1" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memcp \- libmemcached Documentation
.
-.TH "MEMDUMP" "1" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMDUMP" "1" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memdump \- libmemcached Documentation
.
-.TH "MEMERROR" "1" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMERROR" "1" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memerror \- libmemcached Documentation
.
-.TH "MEMFLUSH" "1" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMFLUSH" "1" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memflush \- libmemcached Documentation
.
-.TH "MEMRM" "1" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMRM" "1" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memrm \- libmemcached Documentation
.
-.TH "MEMSLAP" "1" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMSLAP" "1" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memslap \- libmemcached Documentation
.
-.TH "MEMSTAT" "1" "May 23, 2011" "0.47" "libmemcached"
+.TH "MEMSTAT" "1" "June 02, 2011" "0.47" "libmemcached"
.SH NAME
memstat \- libmemcached Documentation
.
for (uint32_t x= 0; x < pointer_per_hash; x++)
{
uint32_t value= ketama_server_hash(sort_host, (size_t)sort_host_length, x);
- ptr->ketama.continuum[continuum_index].index= host_index;
- ptr->ketama.continuum[continuum_index++].value= value;
+ ptr->ketama.continuum[continuum_index].index= host_index;
+ ptr->ketama.continuum[continuum_index++].value= value;
}
}
else
{
for (uint32_t x = 0; x < pointer_per_hash; x++)
{
- uint32_t value= ketama_server_hash(sort_host, (size_t)sort_host_length, x);
- ptr->ketama.continuum[continuum_index].index= host_index;
- ptr->ketama.continuum[continuum_index++].value= value;
+ uint32_t value= ketama_server_hash(sort_host, (size_t)sort_host_length, x);
+ ptr->ketama.continuum[continuum_index].index= host_index;
+ ptr->ketama.continuum[continuum_index++].value= value;
}
}
else
return run_distribution(ptr);
}
+
+memcached_return_t memcached_server_add_parsed(memcached_st *ptr,
+ const char *hostname,
+ size_t hostname_length,
+ in_port_t port,
+ uint32_t weight)
+{
+ char buffer[NI_MAXHOST];
+
+ memcpy(buffer, hostname, hostname_length);
+ buffer[hostname_length]= 0;
+
+ return server_add(ptr, buffer,
+ port,
+ weight,
+ MEMCACHED_CONNECTION_TCP);
+}
-# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-#
-# Libmemcached Scanner and Parser
-#
-# Copyright (C) 2011 DataDifferental, http://datadifferential.com
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-libmemcached/options/parser.h: libmemcached/options/parser.cc
-
-libmemcached/options/parser.cc: libmemcached/options/parser.yy libmemcached/options/scanner.l libmemcached/options/scanner.h
- $(AM_V_YACC)$(am__skipyacc) $(YACC) $(YLFLAGS) $(AM_YFLAGS) -o $@ $<
-
-libmemcached/options/scanner.h: libmemcached/options/scanner.cc
-
-libmemcached/options/scanner.cc: libmemcached/options/scanner.l libmemcached/options/parser.yy
- $(AM_V_GEN)$(LEX) $<
+++ /dev/null
-/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
- *
- * Libmemcached Scanner and Parser
- *
- * Copyright (C) 2011 DataDifferental, http://datadifferential.com
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-%error-verbose
-%debug
-%defines
-%expect 0
-%output "libmemcached/options/parser.cc"
-%defines "libmemcached/options/parser.h"
-%lex-param { yyscan_t *scanner }
-%name-prefix="config_"
-%parse-param { Context *context }
-%parse-param { yyscan_t *scanner }
-%pure-parser
-%require "2.2"
-%start begin
-%verbose
-
-%{
-
-#include <config.h>
-
-#include <stdint.h>
-
-#include <libmemcached/common.h>
-#include <libmemcached/options/context.h>
-#include <libmemcached/options/symbol.h>
-#include <libmemcached/options/scanner.h>
-
-#pragma GCC diagnostic ignored "-Wold-style-cast"
-
-int conf_lex(YYSTYPE* lvalp, void* scanner);
-
-#define parser_abort(A, B) do { (A)->abort((B)); YYABORT; } while (0)
-
-inline void config_error(Context *context, yyscan_t *scanner, const char *error)
-{
- if (not context->end())
- context->abort(error);
-}
-
-%}
-
-%token COMMENT
-%token END
-%token ERROR
-%token RESET
-%token PARSER_DEBUG
-%token INCLUDE
-%token CONFIGURE_FILE
-%token EMPTY_LINE
-%token SERVER
-%token SERVERS
-%token SERVERS_OPTION
-%token UNKNOWN_OPTION
-%token UNKNOWN
-
-/* All behavior options */
-%token BINARY_PROTOCOL
-%token BUFFER_REQUESTS
-%token CONNECT_TIMEOUT
-%token DISTRIBUTION
-%token HASH
-%token HASH_WITH_NAMESPACE
-%token IO_BYTES_WATERMARK
-%token IO_KEY_PREFETCH
-%token IO_MSG_WATERMARK
-%token KETAMA_HASH
-%token KETAMA_WEIGHTED
-%token NOREPLY
-%token NUMBER_OF_REPLICAS
-%token POLL_TIMEOUT
-%token RANDOMIZE_REPLICA_READ
-%token RCV_TIMEOUT
-%token REMOVE_FAILED_SERVERS
-%token RETRY_TIMEOUT
-%token SND_TIMEOUT
-%token SOCKET_RECV_SIZE
-%token SOCKET_SEND_SIZE
-%token SORT_HOSTS
-%token SUPPORT_CAS
-%token USER_DATA
-%token USE_UDP
-%token VERIFY_KEY
-%token _TCP_KEEPALIVE
-%token _TCP_KEEPIDLE
-%token _TCP_NODELAY
-
-/* Callbacks */
-%token NAMESPACE
-
-/* Pool */
-%token POOL_MIN
-%token POOL_MAX
-
-/* Hash types */
-%token MD5
-%token CRC
-%token FNV1_64
-%token FNV1A_64
-%token FNV1_32
-%token FNV1A_32
-%token HSIEH
-%token MURMUR
-%token JENKINS
-
-/* Distributions */
-%token CONSISTENT
-%token MODULA
-%token RANDOM
-
-/* Boolean values */
-%token <boolean> TRUE
-%token <boolean> FALSE
-
-%nonassoc ','
-%nonassoc '='
-
-%token <number> FLOAT
-%token <number> NUMBER
-%token <number> PORT
-%token <number> WEIGHT_START
-%token <server> IPADDRESS
-%token <server> HOSTNAME
-%token <string> STRING
-%token <string> QUOTED_STRING
-%token <string> FILE_PATH
-
-%type <behavior> behavior_boolean
-%type <behavior> behavior_number
-%type <distribution> distribution
-%type <hash> hash
-%type <number> optional_port
-%type <number> optional_weight
-%type <string> string
-
-%%
-
-begin:
- statement
- | begin ' ' statement
- ;
-
-statement:
- expression
- { }
- | COMMENT
- { }
- | EMPTY_LINE
- { }
- | END
- {
- context->set_end();
- YYACCEPT;
- }
- | ERROR
- {
- context->rc= MEMCACHED_PARSE_USER_ERROR;
- parser_abort(context, NULL);
- }
- | RESET
- {
- memcached_reset(context->memc);
- }
- | PARSER_DEBUG
- {
- yydebug= 1;
- }
- | INCLUDE ' ' string
- {
- if ((context->rc= memcached_parse_configure_file(context->memc, $3.c_str, $3.size)) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);
- }
- }
- ;
-
-
-expression:
- SERVER HOSTNAME optional_port optional_weight
- {
- if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, $2.c_str, $3, $4)))
- {
- parser_abort(context, NULL);
- }
- context->unset_server();
- }
- | SERVER IPADDRESS optional_port optional_weight
- {
- if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, $2.c_str, $3, $4)))
- {
- parser_abort(context, NULL);
- }
- context->unset_server();
- }
- | CONFIGURE_FILE string
- {
- memcached_set_configuration_file(context->memc, $2.c_str, $2.size);
- }
- | POOL_MIN NUMBER
- {
- context->memc->configure.initial_pool_size= $2;
- }
- | POOL_MAX NUMBER
- {
- context->memc->configure.max_pool_size= $2;
- }
- | behaviors
- ;
-
-behaviors:
- NAMESPACE string
- {
- if ((context->rc= memcached_set_prefix_key(context->memc, $2.c_str, $2.size)) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);;
- }
- }
- | DISTRIBUTION distribution
- {
- if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, $2)) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);;
- }
- }
- | DISTRIBUTION distribution ',' hash
- {
- if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, $2)) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);;
- }
- if ((context->rc= memcached_behavior_set_distribution_hash(context->memc, $4)) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);;
- }
- }
- | HASH hash
- {
- if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_HASH, $2)) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);;
- }
- }
- | behavior_number NUMBER
- {
- if ((context->rc= memcached_behavior_set(context->memc, $1, $2)) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);;
- }
- }
- | behavior_boolean
- {
- if ((context->rc= memcached_behavior_set(context->memc, $1, true)) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);;
- }
- }
- | USER_DATA
- {
- }
- ;
-
-behavior_number:
- REMOVE_FAILED_SERVERS
- {
- $$= MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS;
- }
- | CONNECT_TIMEOUT
- {
- $$= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT;
- }
- | IO_MSG_WATERMARK
- {
- $$= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK;
- }
- | IO_BYTES_WATERMARK
- {
- $$= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK;
- }
- | IO_KEY_PREFETCH
- {
- $$= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH;
- }
- | NUMBER_OF_REPLICAS
- {
- $$= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS;
- }
- | POLL_TIMEOUT
- {
- $$= MEMCACHED_BEHAVIOR_POLL_TIMEOUT;
- }
- | RCV_TIMEOUT
- {
- $$= MEMCACHED_BEHAVIOR_RCV_TIMEOUT;
- }
- | RETRY_TIMEOUT
- {
- $$= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT;
- }
- | SND_TIMEOUT
- {
- $$= MEMCACHED_BEHAVIOR_SND_TIMEOUT;
- }
- | SOCKET_RECV_SIZE
- {
- $$= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE;
- }
- | SOCKET_SEND_SIZE
- {
- $$= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE;
- }
- ;
-
-behavior_boolean:
- BINARY_PROTOCOL
- {
- $$= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL;
- }
- | BUFFER_REQUESTS
- {
- $$= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS;
- }
- | HASH_WITH_NAMESPACE
- {
- $$= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY;
- }
- | NOREPLY
- {
- $$= MEMCACHED_BEHAVIOR_NOREPLY;
- }
- | RANDOMIZE_REPLICA_READ
- {
- $$= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ;
- }
- | SORT_HOSTS
- {
- $$= MEMCACHED_BEHAVIOR_SORT_HOSTS;
- }
- | SUPPORT_CAS
- {
- $$= MEMCACHED_BEHAVIOR_SUPPORT_CAS;
- }
- | _TCP_NODELAY
- {
- $$= MEMCACHED_BEHAVIOR_TCP_NODELAY;
- }
- | _TCP_KEEPALIVE
- {
- $$= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE;
- }
- | _TCP_KEEPIDLE
- {
- $$= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE;
- }
- | USE_UDP
- {
- $$= MEMCACHED_BEHAVIOR_USE_UDP;
- }
- | VERIFY_KEY
- {
- $$= MEMCACHED_BEHAVIOR_VERIFY_KEY;
- }
-
-
-optional_port:
- { $$= MEMCACHED_DEFAULT_PORT;}
- | PORT
- { };
- ;
-
-optional_weight:
- { $$= 1; }
- | WEIGHT_START
- { }
- ;
-
-hash:
- MD5
- {
- $$= MEMCACHED_HASH_MD5;
- }
- | CRC
- {
- $$= MEMCACHED_HASH_CRC;
- }
- | FNV1_64
- {
- $$= MEMCACHED_HASH_FNV1_64;
- }
- | FNV1A_64
- {
- $$= MEMCACHED_HASH_FNV1A_64;
- }
- | FNV1_32
- {
- $$= MEMCACHED_HASH_FNV1_32;
- }
- | FNV1A_32
- {
- $$= MEMCACHED_HASH_FNV1A_32;
- }
- | HSIEH
- {
- $$= MEMCACHED_HASH_HSIEH;
- }
- | MURMUR
- {
- $$= MEMCACHED_HASH_MURMUR;
- }
- | JENKINS
- {
- $$= MEMCACHED_HASH_JENKINS;
- }
- ;
-
-string:
- STRING
- {
- $$= $1;
- }
- | QUOTED_STRING
- {
- $$.c_str= $1.c_str +1; // +1 to move use passed the initial quote
- $$.size= $1.size -2; // -2 removes the begin and end quote
- }
- ;
-
-distribution:
- CONSISTENT
- {
- $$= MEMCACHED_DISTRIBUTION_CONSISTENT;
- }
- | MODULA
- {
- $$= MEMCACHED_DISTRIBUTION_MODULA;
- }
- | RANDOM
- {
- $$= MEMCACHED_DISTRIBUTION_RANDOM;
- }
- ;
-
-%%
-
-void Context::start()
-{
- config_parse(this, (void **)scanner);
-}
-
+++ /dev/null
-/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
- *
- * Libmemcached Scanner and Parser
- *
- * Copyright (C) 2011 DataDifferental, http://datadifferential.com
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-%top{
-
-#include <libmemcached/common.h>
-#include <libmemcached/options/context.h>
-#include <libmemcached/options/parser.h>
-#include <libmemcached/options/symbol.h>
-
-#pragma GCC diagnostic ignored "-Wold-style-cast"
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-
-#define YY_EXTRA_TYPE Context*
-
-}
-
-
-%{
-#include <cstdlib>
-#include <cstring>
-
-#define PARAM yyget_extra(yyscanner)
-
-#define get_lex_chars(buffer, result, max_size, context) \
-{ \
- if (context->pos >= context->length) \
- { \
- result= YY_NULL; \
- } \
- else \
- { \
- result= (int)(context->length - context->pos); \
- (size_t)result > (size_t)max_size ? result= max_size : 0; \
- memcpy(buffer, context->buf + context->pos, result); \
- context->pos += result; \
- } \
-}
-
-
-#define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM)
-
-%}
-
-%option 8bit
-%option bison-bridge
-%option case-insensitive
-%option debug
-%option nounput
-%option noyywrap
-%option outfile="libmemcached/options/scanner.cc" header-file="libmemcached/options/scanner.h"
-%option perf-report
-%option prefix="config_"
-%option reentrant
-
-%%
-
-
-=|,|[ ] { return yytext[0];}
-
-[[:digit:]]+ { yylval->number= atoi(yytext); return (NUMBER); }
-
-:[[:digit:]]{1,5} { yylval->number= atoi(yytext +1); return PORT; }
-
-"/?"[[:digit:]]{1,5} { yylval->number= atoi(yytext +2); return WEIGHT_START; }
-
-[\t\r\n] ; /* skip whitespace */
-
-
-^#.*$ {
- return COMMENT;
- }
-
-"--SERVER=" { yyextra->begin= yytext; yyextra->set_server(); return SERVER; }
-
-"--BINARY-PROTOCOL" { yyextra->begin= yytext; return BINARY_PROTOCOL; }
-"--BUFFER-REQUESTS" { yyextra->begin= yytext; return BUFFER_REQUESTS; }
-"--CONFIGURE-FILE=" { yyextra->begin= yytext; return CONFIGURE_FILE; }
-"--CONNECT-TIMEOUT=" { yyextra->begin= yytext; return CONNECT_TIMEOUT; }
-"--DISTRIBUTION=" { yyextra->begin= yytext; return DISTRIBUTION; }
-"--HASH-WITH-NAMESPACE" { yyextra->begin= yytext; return HASH_WITH_NAMESPACE; }
-"--HASH=" { yyextra->begin= yytext; return HASH; }
-"--IO-BYTES-WATERMARK=" { yyextra->begin= yytext; return IO_BYTES_WATERMARK; }
-"--IO-KEY-PREFETCH=" { yyextra->begin= yytext; return IO_KEY_PREFETCH; }
-"--IO-MSG-WATERMARK=" { yyextra->begin= yytext; return IO_MSG_WATERMARK; }
-"--NOREPLY" { yyextra->begin= yytext; return NOREPLY; }
-"--NUMBER-OF-REPLICAS=" { yyextra->begin= yytext; return NUMBER_OF_REPLICAS; }
-"--POLL-TIMEOUT=" { yyextra->begin= yytext; return POLL_TIMEOUT; }
-"--RANDOMIZE-REPLICA-READ" { yyextra->begin= yytext; return RANDOMIZE_REPLICA_READ; }
-"--RCV-TIMEOUT=" { yyextra->begin= yytext; return RCV_TIMEOUT; }
-"--REMOVE-FAILED-SERVERS=" { yyextra->begin= yytext; return REMOVE_FAILED_SERVERS; }
-"--RETRY-TIMEOUT=" { yyextra->begin= yytext; return RETRY_TIMEOUT; }
-"--SND-TIMEOUT=" { yyextra->begin= yytext; return SND_TIMEOUT; }
-"--SOCKET-RECV-SIZE=" { yyextra->begin= yytext; return SOCKET_RECV_SIZE; }
-"--SOCKET-SEND-SIZE=" { yyextra->begin= yytext; return SOCKET_SEND_SIZE; }
-"--SORT-HOSTS" { yyextra->begin= yytext; return SORT_HOSTS; }
-"--SUPPORT-CAS" { yyextra->begin= yytext; return SUPPORT_CAS; }
-"--TCP-KEEPALIVE" { yyextra->begin= yytext; return _TCP_KEEPALIVE; }
-"--TCP-KEEPIDLE" { yyextra->begin= yytext; return _TCP_KEEPIDLE; }
-"--TCP-NODELAY" { yyextra->begin= yytext; return _TCP_NODELAY; }
-"--USE-UDP" { yyextra->begin= yytext; return USE_UDP; }
-"--USER-DATA" { yyextra->begin= yytext; return USER_DATA; }
-"--VERIFY-KEY" { yyextra->begin= yytext; return VERIFY_KEY; }
-
-"--POOL-MIN=" { yyextra->begin= yytext; return POOL_MIN; }
-"--POOL-MAX=" { yyextra->begin= yytext; return POOL_MAX; }
-
-"--NAMESPACE=" { yyextra->begin= yytext; return NAMESPACE; }
-
-INCLUDE { yyextra->begin= yytext; return INCLUDE; }
-RESET { yyextra->begin= yytext; return RESET; }
-DEBUG { yyextra->begin= yytext; return PARSER_DEBUG; }
-SERVERS { yyextra->begin= yytext; return SERVERS; }
-END { yyextra->begin= yytext; return END; }
-ERROR { yyextra->begin= yytext; return ERROR; }
-
-TRUE { return TRUE; }
-FALSE { return FALSE; }
-
-
-"--"[[:alnum:]]* {
- yyextra->begin= yytext;
- return UNKNOWN_OPTION;
- }
-
-CONSISTENT { return CONSISTENT; }
-MODULA { return MODULA; }
-RANDOM { return RANDOM; }
-
-MD5 { return MD5; }
-CRC { return CRC; }
-FNV1_64 { return FNV1_64; }
-FNV1A_64 { return FNV1A_64; }
-FNV1_32 { return FNV1_32; }
-FNV1A_32 { return FNV1A_32; }
-HSIEH { return HSIEH; }
-MURMUR { return MURMUR; }
-JENKINS { return JENKINS; }
-
-(([[:digit:]]{1,3}"."){3}([[:digit:]]{1,3})) {
- yylval->server.port= MEMCACHED_DEFAULT_PORT;
- yylval->server.weight= 1;
- yylval->server.c_str= yyextra->set_hostname(yytext, yyleng);
- if (yylval->server.c_str)
- yylval->server.size= yyleng;
- return IPADDRESS;
- }
-
-[[:alnum:]]["."[:alnum:]_-]+[[:alnum:]] {
- if (yyextra->is_server())
- {
- yylval->server.port= MEMCACHED_DEFAULT_PORT;
- yylval->server.weight= 1;
- yylval->server.c_str= yyextra->set_hostname(yytext, yyleng);
- if (yylval->server.c_str)
- yylval->server.size= yyleng;
-
- return HOSTNAME;
- }
-
- yylval->string.c_str = yytext;
- yylval->string.size = yyleng;
-
- return STRING;
- }
-
-(\".*\") {
- yylval->string.c_str = yytext;
- yylval->string.size = yyleng;
- return QUOTED_STRING;
- }
-
-. {
- yyextra->begin= yytext;
- return UNKNOWN;
- }
-
-%%
-
-void Context::init_scanner()
-{
- yylex_init(&scanner);
- yyset_extra(this, scanner);
-}
-
-void Context::destroy_scanner()
-{
- yylex_destroy(scanner);
-}
-
memcached_return_t memcached_server_add(memcached_st *ptr,
const char *hostname, in_port_t port);
+LIBMEMCACHED_LOCAL
+ memcached_return_t memcached_server_add_parsed(memcached_st *ptr,
+ const char *hostname,
+ size_t hostname_length,
+ in_port_t port,
+ uint32_t weight);
+
LIBMEMCACHED_API
memcached_return_t memcached_server_add_udp_with_weight(memcached_st *ptr,
const char *hostname,
%{_includedir}/libhashkit/strerror.h
%{_includedir}/libhashkit/types.h
%{_includedir}/libhashkit/visibility.h
+%{_includedir}/libhashkit/hashkit.hpp
+
%{_includedir}/libmemcached/allocators.h
%{_includedir}/libmemcached/analyze.h
%{_includedir}/libmemcached/array.h
%{_includedir}/libmemcached/auto.h
+%{_includedir}/libmemcached/basic_string.h
%{_includedir}/libmemcached/behavior.h
%{_includedir}/libmemcached/callback.h
%{_includedir}/libmemcached/configure.h
%{_includedir}/libmemcached/protocol_handler.h
%{_includedir}/libmemcached/quit.h
%{_includedir}/libmemcached/result.h
+%{_includedir}/libmemcached/return.h
%{_includedir}/libmemcached/sasl.h
%{_includedir}/libmemcached/server.h
%{_includedir}/libmemcached/server_list.h