Loading...
Searching...
No Matches
Data Structures | Macros | Functions
as_partition.h File Reference
#include <aerospike/as_atomic.h>
#include <aerospike/as_std.h>
#include <aerospike/as_status.h>
+ Include dependency graph for as_partition.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  as_partition
 
struct  as_partition_info
 
struct  as_partition_table
 
struct  as_partition_tables
 

Macros

#define AS_MAX_NAMESPACE_SIZE   32
 
#define AS_MAX_NAMESPACES   128
 
#define AS_MAX_REPLICATION_FACTOR   3
 

Functions

static uint32_t as_partition_getid (const uint8_t *digest, uint32_t n_partitions)
 
as_status as_partition_info_init (as_partition_info *pi, struct as_cluster_s *cluster, struct as_error_s *err, const struct as_key_s *key)
 
void as_partition_tables_destroy (as_partition_tables *tables)
 
void as_partition_tables_dump (struct as_cluster_s *cluster)
 
as_partition_tableas_partition_tables_get (as_partition_tables *tables, const char *ns)
 

Macro Definition Documentation

◆ AS_MAX_NAMESPACE_SIZE

#define AS_MAX_NAMESPACE_SIZE   32

Maximum namespace size including null byte. Effective maximum length is 31.

Definition at line 40 of file as_partition.h.

◆ AS_MAX_NAMESPACES

#define AS_MAX_NAMESPACES   128

If the server removes then adds namespaces, the client may contain more than the server max of 32.

Definition at line 35 of file as_partition.h.

◆ AS_MAX_REPLICATION_FACTOR

#define AS_MAX_REPLICATION_FACTOR   3

Maximum number of stored replicas in partition map.

Definition at line 45 of file as_partition.h.

Function Documentation

◆ as_partition_getid()

static uint32_t as_partition_getid ( const uint8_t * digest,
uint32_t n_partitions )
inlinestaticprivate

Return partition ID given digest.

Definition at line 121 of file as_partition.h.

◆ as_partition_info_init()

as_status as_partition_info_init ( as_partition_info * pi,
struct as_cluster_s * cluster,
struct as_error_s * err,
const struct as_key_s * key )
private

Initialize partition info given key. If this function succeeds and not using shared memory, as_partition_tables_release() must be called when done with partition.

◆ as_partition_tables_destroy()

void as_partition_tables_destroy ( as_partition_tables * tables)
private

Destroy partition tables.

◆ as_partition_tables_dump()

void as_partition_tables_dump ( struct as_cluster_s * cluster)
private

Log all partition maps in the cluster.

◆ as_partition_tables_get()

as_partition_table * as_partition_tables_get ( as_partition_tables * tables,
const char * ns )
private

Get partition table given namespace.