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
51 #define AS_FEATURES_GEO (1 << 0)
52 #define AS_FEATURES_DOUBLE (1 << 1)
53 #define AS_FEATURES_BATCH_INDEX (1 << 2)
54 #define AS_FEATURES_REPLICAS_ALL (1 << 3)
55 #define AS_FEATURES_PIPELINING (1 << 4)
56 #define AS_FEATURES_PEERS (1 << 5)
58 #define AS_ADDRESS4_MAX 4
59 #define AS_ADDRESS6_MAX 8
68 typedef struct as_address_s {
72 struct sockaddr_storage addr;
85 typedef struct as_alias_s {
104 typedef struct as_queue_lock_s {
125 typedef struct as_node_s {
266 typedef struct as_node_info_s {
297 struct as_cluster_s* cluster,
const char* hostname,
const char* tls_name,
298 in_port_t port,
bool is_alias,
struct sockaddr* addr,
as_node_info* node_info
316 ck_pr_store_8(&node->
active,
false);
340 ck_pr_dec_32_zero(&node->
ref_count, &destroy);
373 static inline const char*
401 pthread_mutex_lock(&queue->
lock);
403 pthread_mutex_unlock(&queue->
lock);
422 pthread_mutex_lock(&queue->
lock);
424 pthread_mutex_unlock(&queue->
lock);
428 pthread_mutex_lock(&queue->
lock);
430 pthread_mutex_unlock(&queue->
lock);