All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Fields | Private Attributes
as_cluster Struct Reference

Detailed Description

Cluster of server nodes.

Definition at line 85 of file as_cluster.h.

#include "as_cluster.h"

+ Collaboration diagram for as_cluster:

Data Fields

as_cluster_event_callback event_callback
 
void * event_callback_udata
 
int * pending
 

Private Attributes

uint32_t async_max_conns_per_node
 
as_auth_mode auth_mode
 
char * cluster_name
 
uint32_t conn_pools_per_node
 
uint32_t conn_timeout_ms
 
as_vectorgc
 
as_vectorip_map
 
uint32_t login_timeout_ms
 
uint32_t max_conns_per_node
 
uint32_t max_socket_idle
 
uint16_t n_partitions
 
uint32_t node_index
 
as_nodesnodes
 
as_partition_tablespartition_tables
 
char * password
 
char * password_hash
 
uint32_t pipe_max_conns_per_node
 
bool rack_aware
 
int rack_id
 
pthread_mutex_t seed_lock
 
as_vectorseeds
 
struct as_shm_info_s * shm_info
 
pthread_cond_t tend_cond
 
uint32_t tend_interval
 
pthread_mutex_t tend_lock
 
pthread_t tend_thread
 
int tend_thread_cpu
 
as_thread_pool thread_pool
 
as_tls_contexttls_ctx
 
bool use_services_alternate
 
char * user
 
volatile bool valid
 

Field Documentation

uint32_t as_cluster::async_max_conns_per_node
private

Maximum number of asynchronous (non-pipeline) connections allowed for each node. Async transactions will be rejected if the maximum async node connections would be exceeded. This variable is ignored if asynchronous event loops are not created.

Definition at line 223 of file as_cluster.h.

as_auth_mode as_cluster::auth_mode
private

Authentication mode.

Definition at line 279 of file as_cluster.h.

char* as_cluster::cluster_name
private

Expected cluster name for all nodes. May be null.

Definition at line 132 of file as_cluster.h.

uint32_t as_cluster::conn_pools_per_node
private

Number of synchronous connection pools used for each node.

Definition at line 237 of file as_cluster.h.

uint32_t as_cluster::conn_timeout_ms
private

Initial connection timeout in milliseconds.

Definition at line 243 of file as_cluster.h.

as_cluster_event_callback as_cluster::event_callback

Cluster event function that will be called when nodes are added/removed from the cluster.

Definition at line 137 of file as_cluster.h.

void* as_cluster::event_callback_udata

Cluster event user data that will be passed back to event_callback.

Definition at line 142 of file as_cluster.h.

as_vector* as_cluster::gc
private

Nodes to be garbage collected.

Definition at line 102 of file as_cluster.h.

as_vector* as_cluster::ip_map
private

A IP translation table is used in cases where different clients use different server IP addresses. This may be necessary when using clients from both inside and outside a local area network. Default is no translation.

The key is the IP address returned from friend info requests to other servers. The value is the real IP address used to connect to the server.

Definition at line 164 of file as_cluster.h.

uint32_t as_cluster::login_timeout_ms
private

Node login timeout in milliseconds.

Definition at line 249 of file as_cluster.h.

uint32_t as_cluster::max_conns_per_node
private

Maximum number of synchronous connections allowed per server node.

Definition at line 215 of file as_cluster.h.

uint32_t as_cluster::max_socket_idle
private

Maximum socket idle in seconds.

Definition at line 255 of file as_cluster.h.

uint16_t as_cluster::n_partitions
private

Total number of data partitions used by cluster.

Definition at line 285 of file as_cluster.h.

uint32_t as_cluster::node_index
private

Random node index.

Definition at line 261 of file as_cluster.h.

as_nodes* as_cluster::nodes
private

Active nodes in cluster.

Definition at line 90 of file as_cluster.h.

as_partition_tables* as_cluster::partition_tables
private

Hints for best node for a partition.

Definition at line 96 of file as_cluster.h.

char* as_cluster::password
private

Password in clear text.

Definition at line 120 of file as_cluster.h.

char* as_cluster::password_hash
private

Password in hashed format.

Definition at line 126 of file as_cluster.h.

int* as_cluster::pending

Pending async commands counter array for all event loops.

Definition at line 147 of file as_cluster.h.

uint32_t as_cluster::pipe_max_conns_per_node
private

Maximum number of pipeline connections allowed for each node. Pipeline transactions will be rejected if the maximum pipeline node connections would be exceeded. This variable is ignored if asynchronous event loops are not created.

Definition at line 231 of file as_cluster.h.

bool as_cluster::rack_aware
private

Request server rack ids.

Definition at line 297 of file as_cluster.h.

int as_cluster::rack_id
private

Rack id.

Definition at line 273 of file as_cluster.h.

pthread_mutex_t as_cluster::seed_lock
private

Lock for adding/removing seeds.

Definition at line 188 of file as_cluster.h.

as_vector* as_cluster::seeds
private

Initial seed hosts specified by user.

Definition at line 153 of file as_cluster.h.

struct as_shm_info_s* as_cluster::shm_info
private

Shared memory implementation of cluster.

Definition at line 108 of file as_cluster.h.

pthread_cond_t as_cluster::tend_cond
private

Tend thread identifier to be used with tend_lock.

Definition at line 203 of file as_cluster.h.

uint32_t as_cluster::tend_interval
private

Milliseconds between cluster tends.

Definition at line 209 of file as_cluster.h.

pthread_mutex_t as_cluster::tend_lock
private

Lock for the tend thread to wait on with the tend interval as timeout. Normally locked, resulting in waiting a full interval between tend iterations. Upon cluster shutdown, unlocked by the main thread, allowing a fast termination of the tend thread.

Definition at line 197 of file as_cluster.h.

pthread_t as_cluster::tend_thread
private

Cluster tend thread.

Definition at line 182 of file as_cluster.h.

int as_cluster::tend_thread_cpu
private

Assign tend thread to this specific CPU ID.

Definition at line 267 of file as_cluster.h.

as_thread_pool as_cluster::thread_pool
private

Pool of threads used to query server nodes in parallel for batch, scan and query.

Definition at line 176 of file as_cluster.h.

as_tls_context* as_cluster::tls_ctx
private

TLS parameters

Definition at line 170 of file as_cluster.h.

bool as_cluster::use_services_alternate
private

If "services-alternate" should be used instead of "services"

Definition at line 291 of file as_cluster.h.

char* as_cluster::user
private

User name in UTF-8 encoded bytes.

Definition at line 114 of file as_cluster.h.

volatile bool as_cluster::valid
private

Should continue to tend cluster.

Definition at line 303 of file as_cluster.h.


The documentation for this struct was generated from the following file: