23 #include <citrusleaf/cf_queue.h>
24 #include <netinet/in.h>
32 #include <aerospike/ck/ck_pr.h>
41 #define AS_HOSTNAME_SIZE 256
46 #define AS_NODE_NAME_SIZE 20
49 #define AS_NODE_NAME_MAX_SIZE AS_NODE_NAME_SIZE
58 typedef struct as_address_s {
62 struct sockaddr_in addr;
67 char name[INET_ADDRSTRLEN];
75 typedef struct as_node_s {
200 typedef struct as_node_info_s {
243 typedef struct as_host_s {
284 ck_pr_store_8(&node->
active,
false);
308 ck_pr_dec_32_zero(&node->
ref_count, &destroy);
326 static inline struct sockaddr_in*
330 return &address->
addr;
366 if (cf_queue_push(node->
conn_q, &fd) != CF_QUEUE_OK) {
static void as_node_deactivate(as_node *node)
static void as_node_put_connection(as_node *node, int fd)
void as_node_destroy(as_node *node)
static void as_node_close_connection(as_node *node, int fd)
struct as_cluster_s * cluster
void as_node_add_address(as_node *node, as_host *host, struct sockaddr_in *addr)
as_status as_node_get_connection(as_error *err, as_node *node, uint64_t deadline_ms, int *fd)
static void * as_vector_get(as_vector *vector, uint32_t index)
static bool as_host_equals(as_host *h1, as_host *h2)
#define AS_NODE_NAME_SIZE
static struct sockaddr_in * as_node_get_address(as_node *node)
as_node * as_node_create(struct as_cluster_s *cluster, as_host *host, struct sockaddr_in *addr, as_node_info *node_info)
uint32_t partition_generation
char name[AS_HOSTNAME_SIZE]
static void as_node_release(as_node *node)
static as_address * as_node_get_address_full(as_node *node)
static void as_node_reserve(as_node *node)