Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions
as_command.h File Reference
#include <aerospike/as_bin.h>
#include <aerospike/as_buffer.h>
#include <aerospike/as_cluster.h>
#include <aerospike/as_key.h>
#include <aerospike/as_operations.h>
#include <aerospike/as_proto.h>
#include <aerospike/as_random.h>
#include <aerospike/as_record.h>
#include <citrusleaf/cf_byte_order.h>
+ Include dependency graph for as_command.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  as_command
 
struct  as_command_parse_result_data
 

Macros

#define as_command_buffer_free(_buf, _sz)   if (_sz > AS_STACK_BUF_SIZE) {local_free(_buf);}
 
#define as_command_buffer_init(_sz)   (_sz > AS_STACK_BUF_SIZE) ? (uint8_t*)local_malloc(_sz) : (uint8_t*)alloca(_sz)
 
#define AS_COMMAND_FLAGS_BATCH   2
 
#define AS_COMMAND_FLAGS_LINEARIZE   4
 
#define AS_COMMAND_FLAGS_READ   1
 
#define AS_COMMAND_FLAGS_SPLIT_RETRY   8
 
#define AS_COMPRESS_THRESHOLD   128
 
#define AS_FIELD_BATCH_INDEX   41
 
#define AS_FIELD_BVAL_ARRAY   15
 
#define AS_FIELD_DIGEST   4
 
#define AS_FIELD_DIGEST_ARRAY   12
 
#define AS_FIELD_FILTER   43
 
#define AS_FIELD_HEADER_SIZE   5
 
#define AS_FIELD_INDEX_CONTEXT   23
 
#define AS_FIELD_INDEX_RANGE   22
 
#define AS_FIELD_INDEX_TYPE   26
 
#define AS_FIELD_KEY   2
 
#define AS_FIELD_MAX_RECORDS   13
 
#define AS_FIELD_NAMESPACE   0
 
#define AS_FIELD_PID_ARRAY   11
 
#define AS_FIELD_QUERY_BINS   40
 
#define AS_FIELD_RPS   10
 
#define AS_FIELD_SETNAME   1
 
#define AS_FIELD_SOCKET_TIMEOUT   9
 
#define AS_FIELD_TASK_ID   7
 
#define AS_FIELD_UDF_ARGLIST   32
 
#define AS_FIELD_UDF_FUNCTION   31
 
#define AS_FIELD_UDF_OP   33
 
#define AS_FIELD_UDF_PACKAGE_NAME   30
 
#define AS_HEADER_SIZE   30
 
#define AS_MSG_INFO1_BATCH_INDEX   (1 << 3)
 
#define AS_MSG_INFO1_COMPRESS_RESPONSE   (1 << 7)
 
#define AS_MSG_INFO1_GET_ALL   (1 << 1)
 
#define AS_MSG_INFO1_GET_NOBINDATA   (1 << 5)
 
#define AS_MSG_INFO1_READ   (1 << 0)
 
#define AS_MSG_INFO1_READ_MODE_AP_ALL   (1 << 6)
 
#define AS_MSG_INFO1_SHORT_QUERY   (1 << 2)
 
#define AS_MSG_INFO1_XDR   (1 << 4)
 
#define AS_MSG_INFO2_CREATE_ONLY   (1 << 5)
 
#define AS_MSG_INFO2_DELETE   (1 << 1)
 
#define AS_MSG_INFO2_DURABLE_DELETE   (1 << 4)
 
#define AS_MSG_INFO2_GENERATION   (1 << 2)
 
#define AS_MSG_INFO2_GENERATION_GT   (1 << 3)
 
#define AS_MSG_INFO2_RELAX_AP_LONG_QUERY   (1 << 6)
 
#define AS_MSG_INFO2_RESPOND_ALL_OPS   (1 << 7)
 
#define AS_MSG_INFO2_WRITE   (1 << 0)
 
#define AS_MSG_INFO3_COMMIT_MASTER   (1 << 1)
 
#define AS_MSG_INFO3_CREATE_OR_REPLACE   (1 << 4)
 
#define AS_MSG_INFO3_LAST   (1 << 0)
 
#define AS_MSG_INFO3_PARTITION_DONE   (1 << 2)
 
#define AS_MSG_INFO3_REPLACE_ONLY   (1 << 5)
 
#define AS_MSG_INFO3_SC_READ_RELAX   (1 << 7)
 
#define AS_MSG_INFO3_SC_READ_TYPE   (1 << 6)
 
#define AS_MSG_INFO3_UPDATE_ONLY   (1 << 3)
 
#define AS_OPERATION_HEADER_SIZE   8
 
#define AS_STACK_BUF_SIZE   (1024 * 16)
 

Typedefs

typedef as_status(* as_parse_results_fn) (as_error *err, struct as_command_s *cmd, as_node *node, uint8_t *buf, size_t size)
 
typedef size_t(* as_write_fn) (void *udata, uint8_t *buf)
 

Functions

static void as_buffers_destroy (as_queue *buffers)
 
static as_status as_command_bin_name_size (as_error *err, const char *name, size_t *size)
 
as_status as_command_bin_size (const as_bin *bin, as_queue *buffers, size_t *size, as_error *err)
 
as_status as_command_compress (as_error *err, uint8_t *cmd, size_t cmd_sz, uint8_t *compressed_cmd, size_t *compressed_size)
 
size_t as_command_compress_max_size (size_t cmd_sz)
 
static size_t as_command_compress_write_end (uint8_t *begin, uint8_t *end, uint64_t uncompressed_sz)
 
as_status as_command_execute (as_command *cmd, as_error *err)
 
static size_t as_command_field_size (size_t size)
 
uint8_t * as_command_ignore_bins (uint8_t *p, uint32_t n_bins)
 
uint8_t * as_command_ignore_fields (uint8_t *p, uint32_t n_fields)
 
size_t as_command_key_size (as_policy_key policy, const as_key *key, uint16_t *n_fields)
 
as_status as_command_parse_bins (uint8_t **pp, as_error *err, as_record *rec, uint32_t n_bins, bool deserialize)
 
as_status as_command_parse_header (as_error *err, as_command *cmd, as_node *node, uint8_t *buf, size_t size)
 
uint8_t * as_command_parse_key (uint8_t *p, uint32_t n_fields, as_key *key, uint64_t *bval)
 
as_status as_command_parse_result (as_error *err, as_command *cmd, as_node *node, uint8_t *buf, size_t size)
 
as_status as_command_parse_success_failure (as_error *err, as_command *cmd, as_node *node, uint8_t *buf, size_t size)
 
as_status as_command_parse_success_failure_bins (uint8_t **pp, as_error *err, as_msg *msg, as_val **value)
 
as_status as_command_parse_udf_failure (uint8_t *p, as_error *err, as_msg *msg, as_status status)
 
as_status as_command_send (as_command *cmd, as_error *err, uint32_t comp_threshold, as_write_fn write_fn, void *udata)
 
static uint32_t as_command_server_timeout (const as_policy_base *policy)
 
static void as_command_set_attr_compress (bool compress, uint8_t *read_attr)
 
static void as_command_set_attr_read (as_policy_read_mode_ap read_mode_ap, as_policy_read_mode_sc read_mode_sc, bool compress, uint8_t *read_attr, uint8_t *info_attr)
 
static void as_command_set_attr_read_header (as_policy_read_mode_ap read_mode_ap, as_policy_read_mode_sc read_mode_sc, uint8_t *read_attr, uint8_t *info_attr)
 
static void as_command_start_timer (as_command *cmd)
 
static size_t as_command_string_field_size (const char *value)
 
static size_t as_command_string_operation_size (const char *value)
 
size_t as_command_user_key_size (const as_key *key)
 
uint8_t * as_command_write_bin (uint8_t *begin, as_operator operation_type, const as_bin *bin, as_queue *buffers)
 
uint8_t * as_command_write_bin_name (uint8_t *cmd, const char *name)
 
static size_t as_command_write_end (uint8_t *begin, uint8_t *end)
 
static uint8_t * as_command_write_field_buffer (uint8_t *p, uint8_t id, as_buffer *buffer)
 
static uint8_t * as_command_write_field_digest (uint8_t *p, const as_digest *val)
 
static uint8_t * as_command_write_field_header (uint8_t *p, uint8_t id, uint32_t size)
 
static uint8_t * as_command_write_field_string (uint8_t *begin, uint8_t id, const char *val)
 
static uint8_t * as_command_write_field_uint32 (uint8_t *p, uint8_t id, uint32_t val)
 
static uint8_t * as_command_write_field_uint64 (uint8_t *p, uint8_t id, uint64_t val)
 
uint8_t * as_command_write_header_read (uint8_t *cmd, const as_policy_base *policy, as_policy_read_mode_ap read_mode_ap, as_policy_read_mode_sc read_mode_sc, int read_ttl, uint32_t timeout, uint16_t n_fields, uint16_t n_bins, uint8_t read_attr, uint8_t write_attr, uint8_t info_attr)
 
uint8_t * as_command_write_header_read_header (uint8_t *cmd, const as_policy_base *policy, as_policy_read_mode_ap read_mode_ap, as_policy_read_mode_sc read_mode_sc, int read_ttl, uint16_t n_fields, uint16_t n_bins, uint8_t read_attr)
 
uint8_t * as_command_write_header_write (uint8_t *cmd, const as_policy_base *policy, as_policy_commit_level commit_level, as_policy_exists exists, as_policy_gen gen_policy, uint32_t gen, uint32_t ttl, uint16_t n_fields, uint16_t n_bins, bool durable_delete, uint8_t read_attr, uint8_t write_attr, uint8_t info_attr)
 
uint8_t * as_command_write_key (uint8_t *p, as_policy_key policy, const as_key *key)
 
static as_policy_replica as_command_write_replica (as_policy_replica replica)
 
uint8_t * as_command_write_user_key (uint8_t *begin, const as_key *key)
 
uint8_t as_replica_index_any (void)
 
static uint8_t as_replica_index_init_read (as_policy_replica replica)
 
static uint64_t as_task_id_resolve (uint64_t *task_id_ptr)
 
static void local_free (void *memory)
 
static void * local_malloc (size_t size)
 

Macro Definition Documentation

◆ as_command_buffer_free

#define as_command_buffer_free ( _buf,
_sz )   if (_sz > AS_STACK_BUF_SIZE) {local_free(_buf);}

Free command buffer.

Definition at line 145 of file as_command.h.

◆ as_command_buffer_init

#define as_command_buffer_init ( _sz)    (_sz > AS_STACK_BUF_SIZE) ? (uint8_t*)local_malloc(_sz) : (uint8_t*)alloca(_sz)

Allocate command buffer on stack or heap depending on given size.

Definition at line 139 of file as_command.h.

◆ AS_COMMAND_FLAGS_BATCH

#define AS_COMMAND_FLAGS_BATCH   2

Definition at line 39 of file as_command.h.

◆ AS_COMMAND_FLAGS_LINEARIZE

#define AS_COMMAND_FLAGS_LINEARIZE   4

Definition at line 40 of file as_command.h.

◆ AS_COMMAND_FLAGS_READ

#define AS_COMMAND_FLAGS_READ   1

Definition at line 38 of file as_command.h.

◆ AS_COMMAND_FLAGS_SPLIT_RETRY

#define AS_COMMAND_FLAGS_SPLIT_RETRY   8

Definition at line 41 of file as_command.h.

◆ AS_COMPRESS_THRESHOLD

#define AS_COMPRESS_THRESHOLD   128

Definition at line 116 of file as_command.h.

◆ AS_FIELD_BATCH_INDEX

#define AS_FIELD_BATCH_INDEX   41

Definition at line 63 of file as_command.h.

◆ AS_FIELD_BVAL_ARRAY

#define AS_FIELD_BVAL_ARRAY   15

Definition at line 54 of file as_command.h.

◆ AS_FIELD_DIGEST

#define AS_FIELD_DIGEST   4

Definition at line 47 of file as_command.h.

◆ AS_FIELD_DIGEST_ARRAY

#define AS_FIELD_DIGEST_ARRAY   12

Definition at line 52 of file as_command.h.

◆ AS_FIELD_FILTER

#define AS_FIELD_FILTER   43

Definition at line 64 of file as_command.h.

◆ AS_FIELD_HEADER_SIZE

#define AS_FIELD_HEADER_SIZE   5

Definition at line 112 of file as_command.h.

◆ AS_FIELD_INDEX_CONTEXT

#define AS_FIELD_INDEX_CONTEXT   23

Definition at line 56 of file as_command.h.

◆ AS_FIELD_INDEX_RANGE

#define AS_FIELD_INDEX_RANGE   22

Definition at line 55 of file as_command.h.

◆ AS_FIELD_INDEX_TYPE

#define AS_FIELD_INDEX_TYPE   26

Definition at line 57 of file as_command.h.

◆ AS_FIELD_KEY

#define AS_FIELD_KEY   2

Definition at line 46 of file as_command.h.

◆ AS_FIELD_MAX_RECORDS

#define AS_FIELD_MAX_RECORDS   13

Definition at line 53 of file as_command.h.

◆ AS_FIELD_NAMESPACE

#define AS_FIELD_NAMESPACE   0

Definition at line 44 of file as_command.h.

◆ AS_FIELD_PID_ARRAY

#define AS_FIELD_PID_ARRAY   11

Definition at line 51 of file as_command.h.

◆ AS_FIELD_QUERY_BINS

#define AS_FIELD_QUERY_BINS   40

Definition at line 62 of file as_command.h.

◆ AS_FIELD_RPS

#define AS_FIELD_RPS   10

Definition at line 50 of file as_command.h.

◆ AS_FIELD_SETNAME

#define AS_FIELD_SETNAME   1

Definition at line 45 of file as_command.h.

◆ AS_FIELD_SOCKET_TIMEOUT

#define AS_FIELD_SOCKET_TIMEOUT   9

Definition at line 49 of file as_command.h.

◆ AS_FIELD_TASK_ID

#define AS_FIELD_TASK_ID   7

Definition at line 48 of file as_command.h.

◆ AS_FIELD_UDF_ARGLIST

#define AS_FIELD_UDF_ARGLIST   32

Definition at line 60 of file as_command.h.

◆ AS_FIELD_UDF_FUNCTION

#define AS_FIELD_UDF_FUNCTION   31

Definition at line 59 of file as_command.h.

◆ AS_FIELD_UDF_OP

#define AS_FIELD_UDF_OP   33

Definition at line 61 of file as_command.h.

◆ AS_FIELD_UDF_PACKAGE_NAME

#define AS_FIELD_UDF_PACKAGE_NAME   30

Definition at line 58 of file as_command.h.

◆ AS_HEADER_SIZE

#define AS_HEADER_SIZE   30

Definition at line 111 of file as_command.h.

◆ AS_MSG_INFO1_BATCH_INDEX

#define AS_MSG_INFO1_BATCH_INDEX   (1 << 3)

Definition at line 70 of file as_command.h.

◆ AS_MSG_INFO1_COMPRESS_RESPONSE

#define AS_MSG_INFO1_COMPRESS_RESPONSE   (1 << 7)

Definition at line 74 of file as_command.h.

◆ AS_MSG_INFO1_GET_ALL

#define AS_MSG_INFO1_GET_ALL   (1 << 1)

Definition at line 68 of file as_command.h.

◆ AS_MSG_INFO1_GET_NOBINDATA

#define AS_MSG_INFO1_GET_NOBINDATA   (1 << 5)

Definition at line 72 of file as_command.h.

◆ AS_MSG_INFO1_READ

#define AS_MSG_INFO1_READ   (1 << 0)

Definition at line 67 of file as_command.h.

◆ AS_MSG_INFO1_READ_MODE_AP_ALL

#define AS_MSG_INFO1_READ_MODE_AP_ALL   (1 << 6)

Definition at line 73 of file as_command.h.

◆ AS_MSG_INFO1_SHORT_QUERY

#define AS_MSG_INFO1_SHORT_QUERY   (1 << 2)

Definition at line 69 of file as_command.h.

◆ AS_MSG_INFO1_XDR

#define AS_MSG_INFO1_XDR   (1 << 4)

Definition at line 71 of file as_command.h.

◆ AS_MSG_INFO2_CREATE_ONLY

#define AS_MSG_INFO2_CREATE_ONLY   (1 << 5)

Definition at line 82 of file as_command.h.

◆ AS_MSG_INFO2_DELETE

#define AS_MSG_INFO2_DELETE   (1 << 1)

Definition at line 78 of file as_command.h.

◆ AS_MSG_INFO2_DURABLE_DELETE

#define AS_MSG_INFO2_DURABLE_DELETE   (1 << 4)

Definition at line 81 of file as_command.h.

◆ AS_MSG_INFO2_GENERATION

#define AS_MSG_INFO2_GENERATION   (1 << 2)

Definition at line 79 of file as_command.h.

◆ AS_MSG_INFO2_GENERATION_GT

#define AS_MSG_INFO2_GENERATION_GT   (1 << 3)

Definition at line 80 of file as_command.h.

◆ AS_MSG_INFO2_RELAX_AP_LONG_QUERY

#define AS_MSG_INFO2_RELAX_AP_LONG_QUERY   (1 << 6)

Definition at line 83 of file as_command.h.

◆ AS_MSG_INFO2_RESPOND_ALL_OPS

#define AS_MSG_INFO2_RESPOND_ALL_OPS   (1 << 7)

Definition at line 84 of file as_command.h.

◆ AS_MSG_INFO2_WRITE

#define AS_MSG_INFO2_WRITE   (1 << 0)

Definition at line 77 of file as_command.h.

◆ AS_MSG_INFO3_COMMIT_MASTER

#define AS_MSG_INFO3_COMMIT_MASTER   (1 << 1)

Definition at line 88 of file as_command.h.

◆ AS_MSG_INFO3_CREATE_OR_REPLACE

#define AS_MSG_INFO3_CREATE_OR_REPLACE   (1 << 4)

Definition at line 93 of file as_command.h.

◆ AS_MSG_INFO3_LAST

#define AS_MSG_INFO3_LAST   (1 << 0)

Definition at line 87 of file as_command.h.

◆ AS_MSG_INFO3_PARTITION_DONE

#define AS_MSG_INFO3_PARTITION_DONE   (1 << 2)

Definition at line 91 of file as_command.h.

◆ AS_MSG_INFO3_REPLACE_ONLY

#define AS_MSG_INFO3_REPLACE_ONLY   (1 << 5)

Definition at line 94 of file as_command.h.

◆ AS_MSG_INFO3_SC_READ_RELAX

#define AS_MSG_INFO3_SC_READ_RELAX   (1 << 7)

Definition at line 96 of file as_command.h.

◆ AS_MSG_INFO3_SC_READ_TYPE

#define AS_MSG_INFO3_SC_READ_TYPE   (1 << 6)

Definition at line 95 of file as_command.h.

◆ AS_MSG_INFO3_UPDATE_ONLY

#define AS_MSG_INFO3_UPDATE_ONLY   (1 << 3)

Definition at line 92 of file as_command.h.

◆ AS_OPERATION_HEADER_SIZE

#define AS_OPERATION_HEADER_SIZE   8

Definition at line 113 of file as_command.h.

◆ AS_STACK_BUF_SIZE

#define AS_STACK_BUF_SIZE   (1024 * 16)

Definition at line 115 of file as_command.h.

Typedef Documentation

◆ as_parse_results_fn

typedef as_status(* as_parse_results_fn) (as_error *err, struct as_command_s *cmd, as_node *node, uint8_t *buf, size_t size)
private

Parse results callback used in as_command_execute().

Definition at line 163 of file as_command.h.

◆ as_write_fn

typedef size_t(* as_write_fn) (void *udata, uint8_t *buf)
private

Write buffer callback used in as_command_send().

Definition at line 155 of file as_command.h.

Function Documentation

◆ as_buffers_destroy()

static void as_buffers_destroy ( as_queue * buffers)
inlinestaticprivate

Destroy buffers when error occurs before bins have been written.

Definition at line 214 of file as_command.h.

References as_queue_destroy(), as_queue_pop(), and as_buffer::data.

◆ as_command_bin_name_size()

static as_status as_command_bin_name_size ( as_error * err,
const char * name,
size_t * size )
inlinestaticprivate

Calculate size of bin name. Return error is bin name greater than AS_BIN_NAME_MAX_LEN characters.

Definition at line 270 of file as_command.h.

References AEROSPIKE_ERR_PARAM, AEROSPIKE_OK, AS_BIN_NAME_MAX_LEN, and AS_OPERATION_HEADER_SIZE.

◆ as_command_bin_size()

as_status as_command_bin_size ( const as_bin * bin,
as_queue * buffers,
size_t * size,
as_error * err )
private

Increment size by bin size.

◆ as_command_compress()

as_status as_command_compress ( as_error * err,
uint8_t * cmd,
size_t cmd_sz,
uint8_t * compressed_cmd,
size_t * compressed_size )
private

Compress command buffer.

◆ as_command_compress_max_size()

size_t as_command_compress_max_size ( size_t cmd_sz)
private

Calculate max size the compressed command buffer.

◆ as_command_compress_write_end()

static size_t as_command_compress_write_end ( uint8_t * begin,
uint8_t * end,
uint64_t uncompressed_sz )
inlinestaticprivate

Finish writing compressed command.

Definition at line 510 of file as_command.h.

References AS_COMPRESSED_MESSAGE_TYPE, AS_PROTO_VERSION, proto, and uncompressed_sz.

◆ as_command_execute()

as_status as_command_execute ( as_command * cmd,
as_error * err )
private

Send command to the server.

◆ as_command_field_size()

static size_t as_command_field_size ( size_t size)
inlinestaticprivate

Calculate size of field structure given field value size.

Definition at line 253 of file as_command.h.

References AS_FIELD_HEADER_SIZE.

◆ as_command_ignore_bins()

uint8_t * as_command_ignore_bins ( uint8_t * p,
uint32_t n_bins )
private

Skip over bins in returned data.

◆ as_command_ignore_fields()

uint8_t * as_command_ignore_fields ( uint8_t * p,
uint32_t n_fields )
private

Skip over fields section in returned data.

◆ as_command_key_size()

size_t as_command_key_size ( as_policy_key policy,
const as_key * key,
uint16_t * n_fields )
private

Calculate size of command header plus key fields.

◆ as_command_parse_bins()

as_status as_command_parse_bins ( uint8_t ** pp,
as_error * err,
as_record * rec,
uint32_t n_bins,
bool deserialize )
private

Parse bins received from the server.

◆ as_command_parse_header()

as_status as_command_parse_header ( as_error * err,
as_command * cmd,
as_node * node,
uint8_t * buf,
size_t size )
private

Parse header of server response.

◆ as_command_parse_key()

uint8_t * as_command_parse_key ( uint8_t * p,
uint32_t n_fields,
as_key * key,
uint64_t * bval )
private

Parse key fields received from server. Used for reads.

◆ as_command_parse_result()

as_status as_command_parse_result ( as_error * err,
as_command * cmd,
as_node * node,
uint8_t * buf,
size_t size )
private

Parse server record. Used for reads.

◆ as_command_parse_success_failure()

as_status as_command_parse_success_failure ( as_error * err,
as_command * cmd,
as_node * node,
uint8_t * buf,
size_t size )
private

Parse server success or failure result.

◆ as_command_parse_success_failure_bins()

as_status as_command_parse_success_failure_bins ( uint8_t ** pp,
as_error * err,
as_msg * msg,
as_val ** value )
private

Parse server success or failure bins.

◆ as_command_parse_udf_failure()

as_status as_command_parse_udf_failure ( uint8_t * p,
as_error * err,
as_msg * msg,
as_status status )
private

Parse user defined function error.

◆ as_command_send()

as_status as_command_send ( as_command * cmd,
as_error * err,
uint32_t comp_threshold,
as_write_fn write_fn,
void * udata )
private

Write buffer and send command to the server.

◆ as_command_server_timeout()

static uint32_t as_command_server_timeout ( const as_policy_base * policy)
inlinestaticprivate

Return timeout to be sent to server for single record transactions.

Definition at line 538 of file as_command.h.

References as_policy_base::socket_timeout, and as_policy_base::total_timeout.

◆ as_command_set_attr_compress()

static void as_command_set_attr_compress ( bool compress,
uint8_t * read_attr )
inlinestaticprivate

Set compress attributes when compress is true.

Definition at line 329 of file as_command.h.

References AS_MSG_INFO1_COMPRESS_RESPONSE.

◆ as_command_set_attr_read()

static void as_command_set_attr_read ( as_policy_read_mode_ap read_mode_ap,
as_policy_read_mode_sc read_mode_sc,
bool compress,
uint8_t * read_attr,
uint8_t * info_attr )
inlinestaticprivate

Set read attributes for read commands.

Definition at line 341 of file as_command.h.

References as_command_set_attr_compress(), and as_command_set_attr_read_header().

◆ as_command_set_attr_read_header()

static void as_command_set_attr_read_header ( as_policy_read_mode_ap read_mode_ap,
as_policy_read_mode_sc read_mode_sc,
uint8_t * read_attr,
uint8_t * info_attr )
inlinestaticprivate

◆ as_command_start_timer()

static void as_command_start_timer ( as_command * cmd)
inlinestaticprivate

◆ as_command_string_field_size()

static size_t as_command_string_field_size ( const char * value)
inlinestaticprivate

Calculate size of string field.

Definition at line 243 of file as_command.h.

References AS_FIELD_HEADER_SIZE.

◆ as_command_string_operation_size()

static size_t as_command_string_operation_size ( const char * value)
inlinestaticprivate

Calculate size of string operation.

Definition at line 286 of file as_command.h.

References AS_OPERATION_HEADER_SIZE.

◆ as_command_user_key_size()

size_t as_command_user_key_size ( const as_key * key)
private

Calculate size of user key.

◆ as_command_write_bin()

uint8_t * as_command_write_bin ( uint8_t * begin,
as_operator operation_type,
const as_bin * bin,
as_queue * buffers )
private

Write bin.

◆ as_command_write_bin_name()

uint8_t * as_command_write_bin_name ( uint8_t * cmd,
const char * name )
private

Write bin header and bin name.

◆ as_command_write_end()

static size_t as_command_write_end ( uint8_t * begin,
uint8_t * end )
inlinestaticprivate

Finish writing command.

Definition at line 497 of file as_command.h.

References AS_MESSAGE_TYPE, AS_PROTO_VERSION, and proto.

◆ as_command_write_field_buffer()

static uint8_t * as_command_write_field_buffer ( uint8_t * p,
uint8_t id,
as_buffer * buffer )
inlinestaticprivate

Write as_buffer field.

Definition at line 443 of file as_command.h.

References as_command_write_field_header(), as_buffer::data, and as_buffer::size.

◆ as_command_write_field_digest()

static uint8_t * as_command_write_field_digest ( uint8_t * p,
const as_digest * val )
inlinestaticprivate

Write digest field.

Definition at line 455 of file as_command.h.

References as_command_write_field_header(), AS_DIGEST_VALUE_SIZE, AS_FIELD_DIGEST, and as_digest::value.

◆ as_command_write_field_header()

static uint8_t * as_command_write_field_header ( uint8_t * p,
uint8_t id,
uint32_t size )
inlinestaticprivate

Write field header.

Definition at line 389 of file as_command.h.

◆ as_command_write_field_string()

static uint8_t * as_command_write_field_string ( uint8_t * begin,
uint8_t id,
const char * val )
inlinestaticprivate

Write string field.

Definition at line 402 of file as_command.h.

References as_command_write_field_header(), and AS_FIELD_HEADER_SIZE.

◆ as_command_write_field_uint32()

static uint8_t * as_command_write_field_uint32 ( uint8_t * p,
uint8_t id,
uint32_t val )
inlinestaticprivate

Write uint32_t field.

Definition at line 419 of file as_command.h.

References as_command_write_field_header().

◆ as_command_write_field_uint64()

static uint8_t * as_command_write_field_uint64 ( uint8_t * p,
uint8_t id,
uint64_t val )
inlinestaticprivate

Write uint64_t field.

Definition at line 431 of file as_command.h.

References as_command_write_field_header().

◆ as_command_write_header_read()

uint8_t * as_command_write_header_read ( uint8_t * cmd,
const as_policy_base * policy,
as_policy_read_mode_ap read_mode_ap,
as_policy_read_mode_sc read_mode_sc,
int read_ttl,
uint32_t timeout,
uint16_t n_fields,
uint16_t n_bins,
uint8_t read_attr,
uint8_t write_attr,
uint8_t info_attr )
private

Write command header for read commands.

◆ as_command_write_header_read_header()

uint8_t * as_command_write_header_read_header ( uint8_t * cmd,
const as_policy_base * policy,
as_policy_read_mode_ap read_mode_ap,
as_policy_read_mode_sc read_mode_sc,
int read_ttl,
uint16_t n_fields,
uint16_t n_bins,
uint8_t read_attr )
private

Write command header for read header commands.

◆ as_command_write_header_write()

uint8_t * as_command_write_header_write ( uint8_t * cmd,
const as_policy_base * policy,
as_policy_commit_level commit_level,
as_policy_exists exists,
as_policy_gen gen_policy,
uint32_t gen,
uint32_t ttl,
uint16_t n_fields,
uint16_t n_bins,
bool durable_delete,
uint8_t read_attr,
uint8_t write_attr,
uint8_t info_attr )
private

Write command header for write commands.

◆ as_command_write_key()

uint8_t * as_command_write_key ( uint8_t * p,
as_policy_key policy,
const as_key * key )
private

Write key structure.

◆ as_command_write_replica()

static as_policy_replica as_command_write_replica ( as_policy_replica replica)
inlinestaticprivate

Convert replica target for write commands.

Definition at line 690 of file as_command.h.

References AS_POLICY_REPLICA_MASTER, and AS_POLICY_REPLICA_SEQUENCE.

◆ as_command_write_user_key()

uint8_t * as_command_write_user_key ( uint8_t * begin,
const as_key * key )
private

Write user key.

◆ as_replica_index_any()

uint8_t as_replica_index_any ( void )
private

Return command's starting replica index for AS_POLICY_REPLICA_ANY.

◆ as_replica_index_init_read()

static uint8_t as_replica_index_init_read ( as_policy_replica replica)
inlinestaticprivate

Return starting replica index for read commands.

Definition at line 680 of file as_command.h.

References AS_POLICY_REPLICA_ANY, and as_replica_index_any().

◆ as_task_id_resolve()

static uint64_t as_task_id_resolve ( uint64_t * task_id_ptr)
inlinestaticprivate

Return random task id if not specified.

Definition at line 656 of file as_command.h.

References as_random_get_uint64().

◆ local_free()

static void local_free ( void * memory)
inlinestatic

Definition at line 130 of file as_command.h.

◆ local_malloc()

static void * local_malloc ( size_t size)
inlinestaticprivate

Macros use these stand-ins for cf_malloc() / cf_free(), so that instrumentation properly substitutes them.

Definition at line 124 of file as_command.h.