| memcached.h | | memcached.h | |
| | | | |
| skipping to change at line 45 | | skipping to change at line 45 | |
| | | | |
| /* These are Private and should not be used by applications */ | | /* These are Private and should not be used by applications */ | |
| #define MEMCACHED_VERSION_STRING_LENGTH 24 | | #define MEMCACHED_VERSION_STRING_LENGTH 24 | |
| | | | |
| /* string value */ | | /* string value */ | |
| struct memcached_continuum_item_st { | | struct memcached_continuum_item_st { | |
| uint32_t index; | | uint32_t index; | |
| uint32_t value; | | uint32_t value; | |
| }; | | }; | |
| | | | |
|
| #define LIBMEMCACHED_VERSION_STRING "0.29" | | #define LIBMEMCACHED_VERSION_STRING "0.30" | |
| | | | |
| struct memcached_analysis_st { | | struct memcached_analysis_st { | |
|
| uint64_t most_used_bytes; | | | |
| uint64_t least_remaining_bytes; | | | |
| uint32_t average_item_size; | | uint32_t average_item_size; | |
| uint32_t longest_uptime; | | uint32_t longest_uptime; | |
| uint32_t least_free_server; | | uint32_t least_free_server; | |
| uint32_t most_consumed_server; | | uint32_t most_consumed_server; | |
| uint32_t oldest_server; | | uint32_t oldest_server; | |
| double pool_hit_ratio; | | double pool_hit_ratio; | |
|
| | | uint64_t most_used_bytes; | |
| | | uint64_t least_remaining_bytes; | |
| }; | | }; | |
| | | | |
| struct memcached_stat_st { | | struct memcached_stat_st { | |
|
| | | uint32_t connection_structures; | |
| | | uint32_t curr_connections; | |
| | | uint32_t curr_items; | |
| uint32_t pid; | | uint32_t pid; | |
|
| uint32_t uptime; | | | |
| uint32_t threads; | | | |
| uint32_t time; | | | |
| uint32_t pointer_size; | | uint32_t pointer_size; | |
|
| uint32_t rusage_user_seconds; | | | |
| uint32_t rusage_user_microseconds; | | | |
| uint32_t rusage_system_seconds; | | | |
| uint32_t rusage_system_microseconds; | | uint32_t rusage_system_microseconds; | |
|
| uint32_t curr_items; | | uint32_t rusage_system_seconds; | |
| uint32_t total_items; | | uint32_t rusage_user_microseconds; | |
| uint64_t limit_maxbytes; | | uint32_t rusage_user_seconds; | |
| uint32_t curr_connections; | | uint32_t threads; | |
| | | uint32_t time; | |
| uint32_t total_connections; | | uint32_t total_connections; | |
|
| uint32_t connection_structures; | | uint32_t total_items; | |
| | | uint32_t uptime; | |
| uint64_t bytes; | | uint64_t bytes; | |
|
| | | uint64_t bytes_read; | |
| | | uint64_t bytes_written; | |
| uint64_t cmd_get; | | uint64_t cmd_get; | |
| uint64_t cmd_set; | | uint64_t cmd_set; | |
|
| | | uint64_t evictions; | |
| uint64_t get_hits; | | uint64_t get_hits; | |
| uint64_t get_misses; | | uint64_t get_misses; | |
|
| uint64_t evictions; | | uint64_t limit_maxbytes; | |
| uint64_t bytes_read; | | | |
| uint64_t bytes_written; | | | |
| char version[MEMCACHED_VERSION_STRING_LENGTH]; | | char version[MEMCACHED_VERSION_STRING_LENGTH]; | |
| }; | | }; | |
| | | | |
| struct memcached_st { | | struct memcached_st { | |
| uint8_t purging; | | uint8_t purging; | |
| bool is_allocated; | | bool is_allocated; | |
|
| | | uint8_t distribution; | |
| | | uint8_t hash; | |
| | | uint32_t continuum_points_counter; | |
| memcached_server_st *hosts; | | memcached_server_st *hosts; | |
|
| | | int32_t snd_timeout; | |
| | | int32_t rcv_timeout; | |
| | | uint32_t server_failure_limit; | |
| | | uint32_t io_msg_watermark; | |
| | | uint32_t io_bytes_watermark; | |
| | | uint32_t io_key_prefetch; | |
| uint32_t number_of_hosts; | | uint32_t number_of_hosts; | |
| uint32_t cursor_server; | | uint32_t cursor_server; | |
| int cached_errno; | | int cached_errno; | |
| uint32_t flags; | | uint32_t flags; | |
|
| int send_size; | | | |
| int recv_size; | | | |
| int32_t poll_timeout; | | int32_t poll_timeout; | |
| int32_t connect_timeout; | | int32_t connect_timeout; | |
| int32_t retry_timeout; | | int32_t retry_timeout; | |
|
| memcached_result_st result; | | | |
| memcached_hash hash; | | | |
| memcached_server_distribution distribution; | | | |
| void *user_data; | | | |
| uint32_t continuum_count; | | uint32_t continuum_count; | |
|
| | | int send_size; | |
| | | int recv_size; | |
| | | void *user_data; | |
| | | time_t next_distribution_rebuild; | |
| | | size_t prefix_key_length; | |
| | | memcached_hash hash_continuum; | |
| | | memcached_result_st result; | |
| memcached_continuum_item_st *continuum; | | memcached_continuum_item_st *continuum; | |
| memcached_clone_func on_clone; | | memcached_clone_func on_clone; | |
| memcached_cleanup_func on_cleanup; | | memcached_cleanup_func on_cleanup; | |
| memcached_free_function call_free; | | memcached_free_function call_free; | |
| memcached_malloc_function call_malloc; | | memcached_malloc_function call_malloc; | |
| memcached_realloc_function call_realloc; | | memcached_realloc_function call_realloc; | |
| memcached_trigger_key get_key_failure; | | memcached_trigger_key get_key_failure; | |
| memcached_trigger_delete_key delete_trigger; | | memcached_trigger_delete_key delete_trigger; | |
| char prefix_key[MEMCACHED_PREFIX_KEY_MAX_SIZE]; | | char prefix_key[MEMCACHED_PREFIX_KEY_MAX_SIZE]; | |
|
| size_t prefix_key_length; | | | |
| memcached_hash hash_continuum; | | | |
| uint32_t continuum_points_counter; | | | |
| int32_t snd_timeout; | | | |
| int32_t rcv_timeout; | | | |
| uint32_t server_failure_limit; | | | |
| uint32_t io_msg_watermark; | | | |
| uint32_t io_bytes_watermark; | | | |
| uint32_t io_key_prefetch; | | | |
| time_t next_distribution_rebuild; | | | |
| }; | | }; | |
| | | | |
| /* Public API */ | | /* Public API */ | |
| const char * memcached_lib_version(void); | | const char * memcached_lib_version(void); | |
| | | | |
| memcached_st *memcached_create(memcached_st *ptr); | | memcached_st *memcached_create(memcached_st *ptr); | |
| void memcached_free(memcached_st *ptr); | | void memcached_free(memcached_st *ptr); | |
| memcached_st *memcached_clone(memcached_st *clone, memcached_st *ptr); | | memcached_st *memcached_clone(memcached_st *clone, memcached_st *ptr); | |
| | | | |
| memcached_return memcached_delete(memcached_st *ptr, const char *key, size_
t key_length, | | memcached_return memcached_delete(memcached_st *ptr, const char *key, size_
t key_length, | |
| | | | |
| skipping to change at line 165 | | skipping to change at line 165 | |
| void memcached_stat_free(memcached_st *, memcached_stat_st *); | | void memcached_stat_free(memcached_st *, memcached_stat_st *); | |
| memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_
return *error); | | memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_
return *error); | |
| memcached_return memcached_stat_servername(memcached_stat_st *stat, char *a
rgs, | | memcached_return memcached_stat_servername(memcached_stat_st *stat, char *a
rgs, | |
| char *hostname, unsigned int por
t); | | char *hostname, unsigned int por
t); | |
| memcached_return memcached_flush(memcached_st *ptr, time_t expiration); | | memcached_return memcached_flush(memcached_st *ptr, time_t expiration); | |
| memcached_return memcached_verbosity(memcached_st *ptr, unsigned int verbos
ity); | | memcached_return memcached_verbosity(memcached_st *ptr, unsigned int verbos
ity); | |
| void memcached_quit(memcached_st *ptr); | | void memcached_quit(memcached_st *ptr); | |
| char *memcached_strerror(memcached_st *ptr, memcached_return rc); | | char *memcached_strerror(memcached_st *ptr, memcached_return rc); | |
| memcached_return memcached_behavior_set(memcached_st *ptr, memcached_behavi
or flag, uint64_t data); | | memcached_return memcached_behavior_set(memcached_st *ptr, memcached_behavi
or flag, uint64_t data); | |
| uint64_t memcached_behavior_get(memcached_st *ptr, memcached_behavior flag)
; | | uint64_t memcached_behavior_get(memcached_st *ptr, memcached_behavior flag)
; | |
|
| | | | |
| | | /* The two public hash bits */ | |
| uint32_t memcached_generate_hash_value(const char *key, size_t key_length,
memcached_hash hash_algorithm); | | uint32_t memcached_generate_hash_value(const char *key, size_t key_length,
memcached_hash hash_algorithm); | |
|
| | | uint32_t memcached_generate_hash(memcached_st *ptr, const char *key, size_t | |
| | | key_length); | |
| | | | |
| memcached_return memcached_flush_buffers(memcached_st *mem); | | memcached_return memcached_flush_buffers(memcached_st *mem); | |
| | | | |
| /* Server Public functions */ | | /* Server Public functions */ | |
| | | | |
| memcached_return memcached_server_add_udp(memcached_st *ptr, | | memcached_return memcached_server_add_udp(memcached_st *ptr, | |
| const char *hostname, | | const char *hostname, | |
| unsigned int port); | | unsigned int port); | |
| memcached_return memcached_server_add_unix_socket(memcached_st *ptr, | | memcached_return memcached_server_add_unix_socket(memcached_st *ptr, | |
| const char *filename); | | const char *filename); | |
| memcached_return memcached_server_add(memcached_st *ptr, const char *hostna
me, | | memcached_return memcached_server_add(memcached_st *ptr, const char *hostna
me, | |
| | | | |
| skipping to change at line 225 | | skipping to change at line 229 | |
| void *context, | | void *context, | |
| unsigned int number_of_callbac
ks); | | unsigned int number_of_callbac
ks); | |
| | | | |
| memcached_return memcached_callback_set(memcached_st *ptr, | | memcached_return memcached_callback_set(memcached_st *ptr, | |
| memcached_callback flag, | | memcached_callback flag, | |
| void *data); | | void *data); | |
| void *memcached_callback_get(memcached_st *ptr, | | void *memcached_callback_get(memcached_st *ptr, | |
| memcached_callback flag, | | memcached_callback flag, | |
| memcached_return *error); | | memcached_return *error); | |
| | | | |
|
| | | memcached_return memcached_dump(memcached_st *ptr, memcached_dump_func *fun | |
| | | ction, void *context, uint32_t number_of_callbacks); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #include <libmemcached/memcached_storage.h> | | #include <libmemcached/memcached_storage.h> | |
| | | | |
| #endif /* __MEMCACHED_H__ */ | | #endif /* __MEMCACHED_H__ */ | |
| | | | |
End of changes. 20 change blocks. |
| 33 lines changed or deleted | | 41 lines changed or added | |
|
| memcached_constants.h | | memcached_constants.h | |
| | | | |
| skipping to change at line 57 | | skipping to change at line 57 | |
| MEMCACHED_STORED, | | MEMCACHED_STORED, | |
| MEMCACHED_NOTFOUND, | | MEMCACHED_NOTFOUND, | |
| MEMCACHED_MEMORY_ALLOCATION_FAILURE, | | MEMCACHED_MEMORY_ALLOCATION_FAILURE, | |
| MEMCACHED_PARTIAL_READ, | | MEMCACHED_PARTIAL_READ, | |
| MEMCACHED_SOME_ERRORS, | | MEMCACHED_SOME_ERRORS, | |
| MEMCACHED_NO_SERVERS, | | MEMCACHED_NO_SERVERS, | |
| MEMCACHED_END, | | MEMCACHED_END, | |
| MEMCACHED_DELETED, | | MEMCACHED_DELETED, | |
| MEMCACHED_VALUE, | | MEMCACHED_VALUE, | |
| MEMCACHED_STAT, | | MEMCACHED_STAT, | |
|
| | | MEMCACHED_ITEM, | |
| MEMCACHED_ERRNO, | | MEMCACHED_ERRNO, | |
| MEMCACHED_FAIL_UNIX_SOCKET, | | MEMCACHED_FAIL_UNIX_SOCKET, | |
| MEMCACHED_NOT_SUPPORTED, | | MEMCACHED_NOT_SUPPORTED, | |
| MEMCACHED_NO_KEY_PROVIDED, /* Deprecated. Use MEMCACHED_BAD_KEY_PROVIDED!
*/ | | MEMCACHED_NO_KEY_PROVIDED, /* Deprecated. Use MEMCACHED_BAD_KEY_PROVIDED!
*/ | |
| MEMCACHED_FETCH_NOTFINISHED, | | MEMCACHED_FETCH_NOTFINISHED, | |
| MEMCACHED_TIMEOUT, | | MEMCACHED_TIMEOUT, | |
| MEMCACHED_BUFFERED, | | MEMCACHED_BUFFERED, | |
| MEMCACHED_BAD_KEY_PROVIDED, | | MEMCACHED_BAD_KEY_PROVIDED, | |
| MEMCACHED_INVALID_HOST_PROTOCOL, | | MEMCACHED_INVALID_HOST_PROTOCOL, | |
| MEMCACHED_SERVER_MARKED_DEAD, | | MEMCACHED_SERVER_MARKED_DEAD, | |
|
| | | MEMCACHED_UNKNOWN_STAT_KEY, | |
| MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */ | | MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */ | |
| } memcached_return; | | } memcached_return; | |
| | | | |
| typedef enum { | | typedef enum { | |
| MEMCACHED_DISTRIBUTION_MODULA, | | MEMCACHED_DISTRIBUTION_MODULA, | |
| MEMCACHED_DISTRIBUTION_CONSISTENT, | | MEMCACHED_DISTRIBUTION_CONSISTENT, | |
| MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA, | | MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA, | |
| MEMCACHED_DISTRIBUTION_RANDOM | | MEMCACHED_DISTRIBUTION_RANDOM | |
| } memcached_server_distribution; | | } memcached_server_distribution; | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 0 lines changed or deleted | | 2 lines changed or added | |
|
| memcached_server.h | | memcached_server.h | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| | | | |
| #ifndef __MEMCACHED_SERVER_H__ | | #ifndef __MEMCACHED_SERVER_H__ | |
| #define __MEMCACHED_SERVER_H__ | | #define __MEMCACHED_SERVER_H__ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| struct memcached_server_st { | | struct memcached_server_st { | |
| bool is_allocated; | | bool is_allocated; | |
|
| char hostname[MEMCACHED_MAX_HOST_LENGTH]; | | bool sockaddr_inited; | |
| | | uint16_t count; | |
| | | unsigned int cursor_active; | |
| unsigned int port; | | unsigned int port; | |
|
| int fd; | | | |
| int cached_errno; | | int cached_errno; | |
|
| unsigned int cursor_active; | | int fd; | |
| char write_buffer[MEMCACHED_MAX_BUFFER]; | | uint32_t io_bytes_sent; /* # bytes sent since last read */ | |
| size_t write_buffer_offset; | | uint32_t server_failure_counter; | |
| char read_buffer[MEMCACHED_MAX_BUFFER]; | | uint32_t weight; | |
| size_t read_data_length; | | | |
| size_t read_buffer_length; | | | |
| char *read_ptr; | | | |
| bool sockaddr_inited; | | | |
| struct addrinfo *address_info; | | | |
| memcached_connection type; | | | |
| uint8_t major_version; | | uint8_t major_version; | |
|
| uint8_t minor_version; | | | |
| uint8_t micro_version; | | uint8_t micro_version; | |
|
| uint16_t count; | | uint8_t minor_version; | |
| | | memcached_connection type; | |
| | | char *read_ptr; | |
| | | size_t read_buffer_length; | |
| | | size_t read_data_length; | |
| | | size_t write_buffer_offset; | |
| | | struct addrinfo *address_info; | |
| time_t next_retry; | | time_t next_retry; | |
| memcached_st *root; | | memcached_st *root; | |
| uint64_t limit_maxbytes; | | uint64_t limit_maxbytes; | |
|
| uint32_t server_failure_counter; | | char read_buffer[MEMCACHED_MAX_BUFFER]; | |
| uint32_t io_bytes_sent; /* # bytes sent since last read */ | | char write_buffer[MEMCACHED_MAX_BUFFER]; | |
| uint32_t weight; | | char hostname[MEMCACHED_MAX_HOST_LENGTH]; | |
| }; | | }; | |
| | | | |
| #define memcached_server_count(A) (A)->number_of_hosts | | #define memcached_server_count(A) (A)->number_of_hosts | |
| #define memcached_server_name(A,B) (B).hostname | | #define memcached_server_name(A,B) (B).hostname | |
| #define memcached_server_port(A,B) (B).port | | #define memcached_server_port(A,B) (B).port | |
| #define memcached_server_list(A) (A)->hosts | | #define memcached_server_list(A) (A)->hosts | |
| #define memcached_server_response_count(A) (A)->cursor_active | | #define memcached_server_response_count(A) (A)->cursor_active | |
| | | | |
| memcached_return memcached_server_cursor(memcached_st *ptr, | | memcached_return memcached_server_cursor(memcached_st *ptr, | |
| memcached_server_function *callbac
k, | | memcached_server_function *callbac
k, | |
| | | | |
End of changes. 6 change blocks. |
| 17 lines changed or deleted | | 17 lines changed or added | |
|
| memcached_types.h | | memcached_types.h | |
| | | | |
| skipping to change at line 36 | | skipping to change at line 36 | |
| typedef void *(*memcached_malloc_function)(memcached_st *ptr, const size_t
size); | | typedef void *(*memcached_malloc_function)(memcached_st *ptr, const size_t
size); | |
| typedef void *(*memcached_realloc_function)(memcached_st *ptr, void *mem, c
onst size_t size); | | typedef void *(*memcached_realloc_function)(memcached_st *ptr, void *mem, c
onst size_t size); | |
| typedef memcached_return (*memcached_execute_function)(memcached_st *ptr, m
emcached_result_st *result, void *context); | | typedef memcached_return (*memcached_execute_function)(memcached_st *ptr, m
emcached_result_st *result, void *context); | |
| typedef memcached_return (*memcached_server_function)(memcached_st *ptr, me
mcached_server_st *server, void *context); | | typedef memcached_return (*memcached_server_function)(memcached_st *ptr, me
mcached_server_st *server, void *context); | |
| typedef memcached_return (*memcached_trigger_key)(memcached_st *ptr, | | typedef memcached_return (*memcached_trigger_key)(memcached_st *ptr, | |
| const char *key, size_t k
ey_length, | | const char *key, size_t k
ey_length, | |
| memcached_result_st *resu
lt); | | memcached_result_st *resu
lt); | |
| typedef memcached_return (*memcached_trigger_delete_key)(memcached_st *ptr, | | typedef memcached_return (*memcached_trigger_delete_key)(memcached_st *ptr, | |
| const char *key, s
ize_t key_length); | | const char *key, s
ize_t key_length); | |
| | | | |
|
| | | typedef memcached_return (*memcached_dump_func)(memcached_st *ptr, | |
| | | const char *key, size_t key | |
| | | _length, void *context); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* __MEMCACHED_TYPES_H__ */ | | #endif /* __MEMCACHED_TYPES_H__ */ | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 4 lines changed or added | |
|