1 /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
5 * Copyright (C) 2011 Data Differential, http://datadifferential.com/
6 * Copyright (C) 2006-2009 Brian Aker All rights reserved.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
15 * * Redistributions in binary form must reproduce the above
16 * copyright notice, this list of conditions and the following disclaimer
17 * in the documentation and/or other materials provided with the
20 * * The names of its contributors may not be used to endorse or
21 * promote products derived from this software without specific prior
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 @note these are static and should not change without a call to behavior.
46 bool is_processing_input
:1;
47 bool is_time_for_rebuild
:1;
51 // Everything below here is pretty static.
52 bool auto_eject_hosts
:1;
53 bool binary_protocol
:1;
54 bool buffer_requests
:1;
55 bool hash_with_namespace
:1;
56 bool no_block
:1; // Don't block
58 bool randomize_replica_read
:1;
61 bool use_sort_hosts
:1;
67 memcached_server_distribution_t distribution
;
72 uint32_t number_of_hosts
;
73 memcached_server_st
*servers
;
74 memcached_server_st
*last_disconnected_server
;
77 uint32_t server_failure_limit
;
78 uint32_t io_msg_watermark
;
79 uint32_t io_bytes_watermark
;
80 uint32_t io_key_prefetch
;
81 uint32_t tcp_keepidle
;
83 int32_t connect_timeout
; // How long we will wait on connect() before we will timeout
84 int32_t retry_timeout
;
90 uint32_t number_of_replicas
;
91 memcached_result_st result
;
95 uint32_t continuum_count
; // Ketama
96 uint32_t continuum_points_counter
; // Ketama
97 time_t next_distribution_rebuild
; // Ketama
98 memcached_continuum_item_st
*continuum
; // Ketama
101 struct memcached_virtual_bucket_t
*virtual_bucket
;
103 struct memcached_allocator_t allocators
;
105 memcached_clone_fn on_clone
;
106 memcached_cleanup_fn on_cleanup
;
107 memcached_trigger_key_fn get_key_failure
;
108 memcached_trigger_delete_key_fn delete_trigger
;
109 memcached_callback_st
*callbacks
;
110 struct memcached_sasl_st sasl
;
111 struct memcached_error_t
*error_messages
;
112 struct memcached_array_st
*_namespace
;
114 uint32_t initial_pool_size
;
115 uint32_t max_pool_size
;
116 int32_t version
; // This is used by pool and others to determine if the memcached_st is out of date.
117 struct memcached_array_st
*filename
;