![]() |
#include <aerospike/as_error.h>
#include <aerospike/as_event.h>
#include <aerospike/as_socket.h>
#include <aerospike/as_queue.h>
#include <aerospike/as_vector.h>
#include <netinet/in.h>
#include <sys/uio.h>
#include <aerospike/ck/ck_pr.h>
Go to the source code of this file.
Data Structures | |
struct | as_address |
struct | as_alias |
struct | as_conn_pool |
struct | as_conn_pool_lock |
struct | as_node |
struct | as_node_info |
Macros | |
#define | AS_ADDRESS4_MAX 4 |
#define | AS_ADDRESS6_MAX 8 |
#define | AS_FEATURES_BATCH_INDEX (1 << 2) |
#define | AS_FEATURES_DOUBLE (1 << 1) |
#define | AS_FEATURES_GEO (1 << 0) |
#define | AS_FEATURES_PEERS (1 << 5) |
#define | AS_FEATURES_PIPELINING (1 << 4) |
#define | AS_FEATURES_REPLICAS (1 << 6) |
#define | AS_FEATURES_REPLICAS_ALL (1 << 3) |
#define | AS_HOSTNAME_SIZE 256 |
#define | AS_NODE_NAME_MAX_SIZE AS_NODE_NAME_SIZE |
#define | AS_NODE_NAME_SIZE 20 |
Functions | |
static void | as_conn_pool_dec (as_conn_pool *pool) |
static void | as_conn_pool_destroy (as_conn_pool *pool) |
static bool | as_conn_pool_get (as_conn_pool *pool, void *conn) |
static bool | as_conn_pool_inc (as_conn_pool *pool) |
static void | as_conn_pool_init (as_conn_pool *pool, uint32_t size, uint32_t limit) |
static bool | as_conn_pool_put (as_conn_pool *pool, void *conn) |
static bool | as_host_equals (as_host *h1, as_host *h2) |
void | as_node_add_address (as_node *node, struct sockaddr *addr) |
void | as_node_add_alias (as_node *node, const char *hostname, in_port_t port) |
as_status | as_node_authenticate_connection (struct as_cluster_s *cluster, const char *user, const char *password) |
static void | as_node_close_connection (as_socket *sock) |
as_node * | as_node_create (struct as_cluster_s *cluster, const char *hostname, const char *tls_name, in_port_t port, bool is_alias, struct sockaddr *addr, as_node_info *node_info) |
static void | as_node_deactivate (as_node *node) |
void | as_node_destroy (as_node *node) |
static as_address * | as_node_get_address (as_node *node) |
static const char * | as_node_get_address_string (as_node *node) |
as_status | as_node_get_connection (as_error *err, as_node *node, uint32_t socket_timeout, uint64_t deadline_ms, as_socket *sock) |
static void | as_node_put_connection (as_socket *sock, uint32_t max_socket_idle) |
static void | as_node_release (as_node *node) |
static void | as_node_reserve (as_node *node) |
#define AS_HOSTNAME_SIZE 256 |
#define AS_NODE_NAME_MAX_SIZE AS_NODE_NAME_SIZE |
|
inlinestaticprivate |
Reduce the total count of connections associated with this pool.
Definition at line 346 of file as_node.h.
References as_conn_pool::total.
|
inlinestaticprivate |
Destroy an empty connection pool.
Definition at line 336 of file as_node.h.
References as_queue_destroy(), and as_conn_pool::queue.
|
inlinestaticprivate |
Get a connection from the pool.
Definition at line 371 of file as_node.h.
References as_queue_pop(), and as_conn_pool::queue.
|
inlinestaticprivate |
Increase the total count of connections associated with this pool.
Definition at line 356 of file as_node.h.
References as_conn_pool::limit, and as_conn_pool::total.
|
inlinestaticprivate |
Initialize a connection pool.
Definition at line 323 of file as_node.h.
References as_queue_init(), as_conn_pool::limit, as_conn_pool::queue, and as_conn_pool::total.
|
inlinestaticprivate |
Return a connection to the pool.
Definition at line 381 of file as_node.h.
References as_queue_push(), as_conn_pool::limit, as_conn_pool::queue, and as_conn_pool::total.
Are hosts equal.
Definition at line 546 of file as_node.h.
References as_host::name, and as_host::port.
|
private |
Add socket address to node addresses.
|
private |
Add hostname to node aliases.
|
private |
Attempt to authenticate given user and password.
|
inlinestaticprivate |
Close a node's connection and do not put back into pool.
Definition at line 497 of file as_node.h.
References as_conn_pool_dec(), as_socket_close(), as_conn_pool_lock::lock, as_conn_pool_lock::pool, and as_socket::pool_lock.
|
private |
Create new cluster node.
|
inlinestaticprivate |
|
private |
Close all connections in pool and free resources.
|
inlinestatic |
Get primary socket address.
Definition at line 464 of file as_node.h.
References as_node::address_index, and as_node::addresses.
|
inlinestatic |
Get socket address as a string.
Definition at line 473 of file as_node.h.
References as_node::address_index, as_node::addresses, and as_address::name.
|
private |
Get a connection to the given node from pool and validate. Return 0 on success.
|
inlinestaticprivate |
Put connection back into pool.
Definition at line 510 of file as_node.h.
References as_conn_pool_dec(), as_conn_pool_put(), as_socket_close(), as_socket::ctx, as_socket::idle_check, as_conn_pool_lock::lock, as_conn_pool_lock::pool, and as_socket::pool_lock.
|
inlinestaticprivate |
Release existing cluster node.
Definition at line 434 of file as_node.h.
References as_node_destroy(), and as_node::ref_count.
|
inlinestaticprivate |
Reserve existing cluster node.
Definition at line 423 of file as_node.h.
References as_node::ref_count.