All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Functions
as_conn_pool.h File Reference
#include <aerospike/as_queue.h>
#include <aerospike/as_socket.h>
#include <pthread.h>
+ Include dependency graph for as_conn_pool.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  as_conn_pool
 

Functions

static void as_conn_pool_decr (as_conn_pool *pool)
 
static void as_conn_pool_destroy (as_conn_pool *pool)
 
static int as_conn_pool_excess (as_conn_pool *pool)
 
static bool as_conn_pool_incr (as_conn_pool *pool)
 
static void as_conn_pool_init (as_conn_pool *pool, uint32_t item_size, uint32_t min_size, uint32_t max_size)
 
static bool as_conn_pool_pop_head (as_conn_pool *pool, as_socket *sock)
 
static bool as_conn_pool_pop_tail (as_conn_pool *pool, as_socket *sock)
 
static bool as_conn_pool_push_head (as_conn_pool *pool, as_socket *sock)
 
static bool as_conn_pool_push_tail (as_conn_pool *pool, as_socket *sock)
 

Function Documentation

static void as_conn_pool_decr ( as_conn_pool pool)
inlinestaticprivate

Decrement connection total.

Definition at line 136 of file as_conn_pool.h.

References as_decr_uint32, as_conn_pool::queue, and as_queue::total.

static void as_conn_pool_destroy ( as_conn_pool pool)
inlinestaticprivate

Destroy a connection pool.

Definition at line 156 of file as_conn_pool.h.

References as_queue_destroy(), as_queue_pop(), as_socket_close(), as_conn_pool::lock, and as_conn_pool::queue.

static int as_conn_pool_excess ( as_conn_pool pool)
inlinestaticprivate

Return number of connections that might be closed.

Definition at line 146 of file as_conn_pool.h.

References as_load_uint32, as_conn_pool::min_size, as_conn_pool::queue, and as_queue::total.

static bool as_conn_pool_incr ( as_conn_pool pool)
inlinestaticprivate

Increment connection total. Return true if connection total is within limits.

Definition at line 126 of file as_conn_pool.h.

References as_faa_uint32, as_queue::capacity, as_conn_pool::queue, and as_queue::total.

static void as_conn_pool_init ( as_conn_pool pool,
uint32_t  item_size,
uint32_t  min_size,
uint32_t  max_size 
)
inlinestaticprivate

Initialize a connection pool.

Definition at line 61 of file as_conn_pool.h.

References as_queue_init(), as_conn_pool::lock, as_conn_pool::min_size, and as_conn_pool::queue.

static bool as_conn_pool_pop_head ( as_conn_pool pool,
as_socket sock 
)
inlinestaticprivate

Pop connection from head of pool.

Definition at line 73 of file as_conn_pool.h.

References as_queue_pop(), as_conn_pool::lock, and as_conn_pool::queue.

static bool as_conn_pool_pop_tail ( as_conn_pool pool,
as_socket sock 
)
inlinestaticprivate

Pop connection from tail of pool.

Definition at line 86 of file as_conn_pool.h.

References as_queue_pop_tail(), as_conn_pool::lock, and as_conn_pool::queue.

static bool as_conn_pool_push_head ( as_conn_pool pool,
as_socket sock 
)
inlinestaticprivate

Push connection to head of pool if size < capacity.

Definition at line 99 of file as_conn_pool.h.

References as_queue_push_head_limit(), as_conn_pool::lock, and as_conn_pool::queue.

static bool as_conn_pool_push_tail ( as_conn_pool pool,
as_socket sock 
)
inlinestaticprivate

Push connection to tail of pool if size < capacity.

Definition at line 112 of file as_conn_pool.h.

References as_queue_push_limit(), as_conn_pool::lock, and as_conn_pool::queue.