All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Typedefs | Functions
as_cluster.h File Reference
#include <aerospike/as_config.h>
#include <aerospike/as_node.h>
#include <aerospike/as_partition.h>
#include <aerospike/as_policy.h>
#include <aerospike/as_thread_pool.h>
#include <aerospike/ck/ck_pr.h>
+ Include dependency graph for as_cluster.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  as_addr_maps
 
struct  as_cluster
 
struct  as_gc_item
 
struct  as_nodes
 
struct  as_seed
 
struct  as_seeds
 

Typedefs

typedef void(* as_release_fn )(void *value)
 

Functions

void as_cluster_change_password (as_cluster *cluster, const char *user, const char *password)
 
as_status as_cluster_create (as_config *config, as_error *err, as_cluster **cluster)
 
void as_cluster_destroy (as_cluster *cluster)
 
void as_cluster_get_node_names (as_cluster *cluster, int *n_nodes, char **node_names)
 
static as_partition_tableas_cluster_get_partition_table (as_cluster *cluster, const char *ns)
 
bool as_cluster_is_connected (as_cluster *cluster)
 
void as_cluster_set_async_max_conns_per_node (as_cluster *cluster, uint32_t async_size, uint32_t pipe_size)
 
static void as_ip_map_release (as_addr_maps *ip_map)
 
static as_addr_mapsas_ip_map_reserve (as_cluster *cluster)
 
void as_ip_map_update (as_cluster *cluster, as_addr_map *ip_map_list, uint32_t size)
 
static as_nodeas_node_get (as_cluster *cluster, const char *ns, const uint8_t *digest, bool write, as_policy_replica replica)
 
as_nodeas_node_get_by_name (as_cluster *cluster, const char *name)
 
as_nodeas_node_get_random (as_cluster *cluster)
 
static void as_nodes_release (as_nodes *nodes)
 
static as_nodesas_nodes_reserve (as_cluster *cluster)
 
as_nodeas_partition_table_get_node (as_cluster *cluster, as_partition_table *table, const uint8_t *digest, bool write, as_policy_replica replica)
 
static void as_partition_tables_release (as_partition_tables *tables)
 
static as_partition_tablesas_partition_tables_reserve (as_cluster *cluster)
 
void as_seeds_add (as_cluster *cluster, as_seed *seed_list, uint32_t size)
 
static void as_seeds_release (as_seeds *seeds)
 
static as_seedsas_seeds_reserve (as_cluster *cluster)
 
void as_seeds_update (as_cluster *cluster, as_seed *seed_list, uint32_t size)
 
as_nodeas_shm_node_get (as_cluster *cluster, const char *ns, const uint8_t *digest, bool write, as_policy_replica replica)
 

Typedef Documentation

typedef void(* as_release_fn)(void *value)

Reference counted release function definition.

Definition at line 128 of file as_cluster.h.

Function Documentation

void as_cluster_change_password ( as_cluster cluster,
const char *  user,
const char *  password 
)
private

Change user and password that is used to authenticate with cluster servers.

as_status as_cluster_create ( as_config config,
as_error err,
as_cluster **  cluster 
)

Create and initialize cluster.

void as_cluster_destroy ( as_cluster cluster)

Close all connections and release memory associated with cluster.

void as_cluster_get_node_names ( as_cluster cluster,
int *  n_nodes,
char **  node_names 
)

Get all node names in cluster.

static as_partition_table* as_cluster_get_partition_table ( as_cluster cluster,
const char *  ns 
)
inlinestaticprivate

Get partition table given namespace.

Definition at line 521 of file as_cluster.h.

References as_partition_tables_get(), as_partition_tables_release(), and as_partition_tables_reserve().

bool as_cluster_is_connected ( as_cluster cluster)

Is cluster connected to any server nodes.

void as_cluster_set_async_max_conns_per_node ( as_cluster cluster,
uint32_t  async_size,
uint32_t  pipe_size 
)

Change maximum async connections per node.

static void as_ip_map_release ( as_addr_maps ip_map)
inlinestatic

Release reference counted access to IP map.

Definition at line 438 of file as_cluster.h.

References as_addr_map::alt, as_addr_maps::array, as_addr_map::orig, as_addr_maps::ref_count, and as_addr_maps::size.

static as_addr_maps* as_ip_map_reserve ( as_cluster cluster)
inlinestatic

Reserve reference counted access to IP map.

Definition at line 422 of file as_cluster.h.

References as_cluster::ip_map, and as_addr_maps::ref_count.

void as_ip_map_update ( as_cluster cluster,
as_addr_map ip_map_list,
uint32_t  size 
)

Replace the IP address map of the cluster.

static as_node* as_node_get ( as_cluster cluster,
const char *  ns,
const uint8_t *  digest,
bool  write,
as_policy_replica  replica 
)
inlinestaticprivate

Get mapped node given digest key. If there is no mapped node, a random node is used instead. as_nodes_release() must be called when done with node.

Definition at line 556 of file as_cluster.h.

References as_cluster_get_partition_table(), as_node_get_random(), as_partition_table_get_node(), as_shm_node_get(), and as_cluster::shm_info.

as_node* as_node_get_by_name ( as_cluster cluster,
const char *  name 
)
private

Get node given node name. as_nodes_release() must be called when done with node.

as_node* as_node_get_random ( as_cluster cluster)
private

Get random node in the cluster. as_nodes_release() must be called when done with node.

static void as_nodes_release ( as_nodes nodes)
inlinestatic

Release reference counted access to cluster nodes.

Definition at line 365 of file as_cluster.h.

References as_nodes::ref_count.

static as_nodes* as_nodes_reserve ( as_cluster cluster)
inlinestatic

Reserve reference counted access to cluster nodes.

Definition at line 353 of file as_cluster.h.

References as_cluster::nodes, and as_nodes::ref_count.

as_node* as_partition_table_get_node ( as_cluster cluster,
as_partition_table table,
const uint8_t *  digest,
bool  write,
as_policy_replica  replica 
)
private

Get mapped node given digest key and partition table. If there is no mapped node, a random node is used instead. as_nodes_release() must be called when done with node.

static void as_partition_tables_release ( as_partition_tables tables)
inlinestaticprivate

Release reference counted access to partition tables.

Definition at line 506 of file as_cluster.h.

References as_partition_tables::ref_count.

static as_partition_tables* as_partition_tables_reserve ( as_cluster cluster)
inlinestaticprivate

Reserve reference counted access to partition tables. as_partition_tables_release() must be called when done with tables.

Definition at line 494 of file as_cluster.h.

References as_cluster::partition_tables, and as_partition_tables::ref_count.

void as_seeds_add ( as_cluster cluster,
as_seed seed_list,
uint32_t  size 
)

Add seeds to the cluster.

static void as_seeds_release ( as_seeds seeds)
inlinestatic

Release reference counted access to seeds.

Definition at line 392 of file as_cluster.h.

References as_seeds::array, as_seed::name, as_seeds::ref_count, and as_seeds::size.

static as_seeds* as_seeds_reserve ( as_cluster cluster)
inlinestatic

Reserve reference counted access to seeds.

Definition at line 381 of file as_cluster.h.

References as_seeds::ref_count, and as_cluster::seeds.

void as_seeds_update ( as_cluster cluster,
as_seed seed_list,
uint32_t  size 
)

Replace the seeds of the cluster.

as_node* as_shm_node_get ( as_cluster cluster,
const char *  ns,
const uint8_t *  digest,
bool  write,
as_policy_replica  replica 
)
private

Get shared memory mapped node given digest key. If there is no mapped node, a random node is used instead. as_nodes_release() must be called when done with node.