All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
as_event_internal.h File Reference
#include <aerospike/as_admin.h>
#include <aerospike/as_cluster.h>
#include <aerospike/as_listener.h>
#include <aerospike/as_queue.h>
#include <aerospike/as_proto.h>
#include <aerospike/as_socket.h>
#include <citrusleaf/cf_ll.h>
#include <pthread.h>
+ Include dependency graph for as_event_internal.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  as_async_connection
 
struct  as_event_command
 
struct  as_event_commander
 
struct  as_event_connection
 
struct  as_event_executor
 
struct  as_queued_pipe_cb
 

Macros

#define AS_ASYNC_AUTH_RETURN_CODE   1
 
#define AS_ASYNC_FLAGS_DESERIALIZE   1
 
#define AS_ASYNC_FLAGS_EVENT_RECEIVED   16
 
#define AS_ASYNC_FLAGS_FREE_BUF   32
 
#define AS_ASYNC_FLAGS_HAS_TIMER   4
 
#define AS_ASYNC_FLAGS_HEAP_REC   128
 
#define AS_ASYNC_FLAGS_LINEARIZE   64
 
#define AS_ASYNC_FLAGS_READ   2
 
#define AS_ASYNC_FLAGS_USING_SOCKET_TIMER   8
 
#define AS_ASYNC_STATE_AUTH_READ_BODY   7
 
#define AS_ASYNC_STATE_AUTH_READ_HEADER   6
 
#define AS_ASYNC_STATE_AUTH_WRITE   5
 
#define AS_ASYNC_STATE_COMMAND_READ_BODY   10
 
#define AS_ASYNC_STATE_COMMAND_READ_HEADER   9
 
#define AS_ASYNC_STATE_COMMAND_WRITE   8
 
#define AS_ASYNC_STATE_CONNECT   3
 
#define AS_ASYNC_STATE_DELAY_QUEUE   2
 
#define AS_ASYNC_STATE_QUEUE_ERROR   11
 
#define AS_ASYNC_STATE_REGISTERED   1
 
#define AS_ASYNC_STATE_RETRY   12
 
#define AS_ASYNC_STATE_TLS_CONNECT   4
 
#define AS_ASYNC_STATE_UNREGISTERED   0
 
#define AS_EVENT_CONNECTION_COMPLETE   0
 
#define AS_EVENT_CONNECTION_ERROR   2
 
#define AS_EVENT_CONNECTION_PENDING   1
 
#define AS_EVENT_QUEUE_INITIAL_CAPACITY   256
 

Typedefs

typedef void(* as_event_executable )(as_event_loop *event_loop, void *udata)
 
typedef void(* as_event_executor_complete_fn )(struct as_event_executor *executor)
 
typedef bool(* as_event_parse_results_fn )(struct as_event_command *cmd)
 

Functions

static bool as_async_conn_pool_incr_total (as_async_conn_pool *pool)
 
static void as_async_conn_pool_init (as_async_conn_pool *pool, uint32_t min_size, uint32_t max_size)
 
static bool as_async_conn_pool_push (as_async_conn_pool *pool, as_event_connection *conn)
 
static bool as_async_conn_pool_push_head (as_async_conn_pool *pool, as_event_connection *conn)
 
static as_event_loopas_event_assign (as_event_loop *event_loop)
 
void as_event_batch_complete (as_event_command *cmd)
 
void as_event_close_cluster (as_cluster *cluster)
 
static void as_event_close_connection (as_event_connection *conn)
 
static void as_event_command_destroy (as_event_command *cmd)
 
as_status as_event_command_execute (as_event_command *cmd, as_error *err)
 
void as_event_command_free (as_event_command *cmd)
 
bool as_event_command_parse_header (as_event_command *cmd)
 
bool as_event_command_parse_info (as_event_command *cmd)
 
bool as_event_command_parse_result (as_event_command *cmd)
 
bool as_event_command_parse_success_failure (as_event_command *cmd)
 
static void as_event_command_release (as_event_command *cmd)
 
bool as_event_command_retry (as_event_command *cmd, bool timeout)
 
void as_event_command_schedule (as_event_command *cmd)
 
void as_event_command_write_start (as_event_command *cmd)
 
static bool as_event_conn_current_tran (as_event_connection *conn, uint64_t max_socket_idle_ns)
 
static bool as_event_conn_current_trim (as_event_connection *conn, uint64_t max_socket_idle_ns)
 
static int as_event_conn_validate (as_event_connection *conn)
 
void as_event_connect (as_event_command *cmd, as_async_conn_pool *pool)
 
static void as_event_connection_timeout (as_event_command *cmd, as_async_conn_pool *pool)
 
void as_event_connector_success (as_event_command *cmd)
 
void as_event_create_connections (as_node *node, as_async_conn_pool *pools)
 
bool as_event_create_loop (as_event_loop *event_loop)
 
bool as_event_decompress (as_event_command *cmd)
 
static void as_event_decr_conn (as_event_command *cmd)
 
void as_event_error_callback (as_event_command *cmd, as_error *err)
 
bool as_event_execute (as_event_loop *event_loop, as_event_executable executable, void *udata)
 
void as_event_execute_retry (as_event_command *cmd)
 
void as_event_executor_cancel (as_event_executor *executor, uint32_t queued_count)
 
void as_event_executor_complete (as_event_executor *executor)
 
void as_event_executor_error (as_event_executor *executor, as_error *err, uint32_t command_count)
 
static void as_event_loop_destroy (as_event_loop *event_loop)
 
void as_event_node_destroy (as_node *node)
 
void as_event_notify_error (as_event_command *cmd, as_error *err)
 
void as_event_parse_error (as_event_command *cmd, as_error *err)
 
void as_event_process_timer (as_event_command *cmd)
 
bool as_event_proto_parse (as_event_command *cmd, as_proto *proto)
 
bool as_event_proto_parse_auth (as_event_command *cmd, as_proto *proto)
 
void as_event_query_complete (as_event_command *cmd)
 
void as_event_register_external_loop (as_event_loop *event_loop)
 
static void as_event_release_async_connection (as_event_command *cmd)
 
static void as_event_release_connection (as_event_connection *conn, as_async_conn_pool *pool)
 
void as_event_response_error (as_event_command *cmd, as_error *err)
 
static bool as_event_set_auth_parse_header (as_event_command *cmd)
 
static void as_event_set_auth_read_header (as_event_command *cmd)
 
static void as_event_set_auth_write (as_event_command *cmd, as_session *session)
 
static void as_event_set_conn_last_used (as_event_connection *conn)
 
static void as_event_set_write (as_event_command *cmd)
 
void as_event_socket_error (as_event_command *cmd, as_error *err)
 
static bool as_event_socket_retry (as_event_command *cmd)
 
void as_event_socket_timeout (as_event_command *cmd)
 
static void as_event_stop_read (as_event_connection *conn)
 
static void as_event_stop_watcher (as_event_command *cmd, as_event_connection *conn)
 
static void as_event_timer_again (as_event_command *cmd)
 
static void as_event_timer_once (as_event_command *cmd, uint64_t timeout)
 
static void as_event_timer_repeat (as_event_command *cmd, uint64_t repeat)
 
static void as_event_timer_stop (as_event_command *cmd)
 
void as_event_total_timeout (as_event_command *cmd)
 

Macro Definition Documentation

#define AS_ASYNC_AUTH_RETURN_CODE   1

Definition at line 69 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_DESERIALIZE   1

Definition at line 60 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_EVENT_RECEIVED   16

Definition at line 64 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_FREE_BUF   32

Definition at line 65 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_HAS_TIMER   4

Definition at line 62 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_HEAP_REC   128

Definition at line 67 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_LINEARIZE   64

Definition at line 66 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_READ   2

Definition at line 61 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_USING_SOCKET_TIMER   8

Definition at line 63 of file as_event_internal.h.

#define AS_ASYNC_STATE_AUTH_READ_BODY   7

Definition at line 53 of file as_event_internal.h.

#define AS_ASYNC_STATE_AUTH_READ_HEADER   6

Definition at line 52 of file as_event_internal.h.

#define AS_ASYNC_STATE_AUTH_WRITE   5

Definition at line 51 of file as_event_internal.h.

#define AS_ASYNC_STATE_COMMAND_READ_BODY   10

Definition at line 56 of file as_event_internal.h.

#define AS_ASYNC_STATE_COMMAND_READ_HEADER   9

Definition at line 55 of file as_event_internal.h.

#define AS_ASYNC_STATE_COMMAND_WRITE   8

Definition at line 54 of file as_event_internal.h.

#define AS_ASYNC_STATE_CONNECT   3

Definition at line 49 of file as_event_internal.h.

#define AS_ASYNC_STATE_DELAY_QUEUE   2

Definition at line 48 of file as_event_internal.h.

#define AS_ASYNC_STATE_QUEUE_ERROR   11

Definition at line 57 of file as_event_internal.h.

#define AS_ASYNC_STATE_REGISTERED   1

Definition at line 47 of file as_event_internal.h.

#define AS_ASYNC_STATE_RETRY   12

Definition at line 58 of file as_event_internal.h.

#define AS_ASYNC_STATE_TLS_CONNECT   4

Definition at line 50 of file as_event_internal.h.

#define AS_ASYNC_STATE_UNREGISTERED   0

Definition at line 46 of file as_event_internal.h.

#define AS_EVENT_CONNECTION_COMPLETE   0

Definition at line 71 of file as_event_internal.h.

#define AS_EVENT_CONNECTION_ERROR   2

Definition at line 73 of file as_event_internal.h.

#define AS_EVENT_CONNECTION_PENDING   1

Definition at line 72 of file as_event_internal.h.

#define AS_EVENT_QUEUE_INITIAL_CAPACITY   256

Definition at line 75 of file as_event_internal.h.

Typedef Documentation

typedef void(* as_event_executable)(as_event_loop *event_loop, void *udata)

Definition at line 112 of file as_event_internal.h.

typedef void(* as_event_executor_complete_fn)(struct as_event_executor *executor)

Definition at line 114 of file as_event_internal.h.

typedef bool(* as_event_parse_results_fn)(struct as_event_command *cmd)

Definition at line 113 of file as_event_internal.h.

Function Documentation

static bool as_async_conn_pool_incr_total ( as_async_conn_pool pool)
inlinestatic
static void as_async_conn_pool_init ( as_async_conn_pool pool,
uint32_t  min_size,
uint32_t  max_size 
)
inlinestatic
static bool as_async_conn_pool_push ( as_async_conn_pool pool,
as_event_connection conn 
)
inlinestatic
static bool as_async_conn_pool_push_head ( as_async_conn_pool pool,
as_event_connection conn 
)
inlinestatic
static as_event_loop* as_event_assign ( as_event_loop event_loop)
inlinestatic

Definition at line 665 of file as_event_internal.h.

References as_event_loop_get().

void as_event_batch_complete ( as_event_command cmd)
void as_event_close_cluster ( as_cluster cluster)
static void as_event_close_connection ( as_event_connection conn)
inlinestatic

Definition at line 614 of file as_event_internal.h.

static void as_event_command_destroy ( as_event_command cmd)
inlinestatic

Definition at line 809 of file as_event_internal.h.

References as_node_release(), and as_event_command::node.

as_status as_event_command_execute ( as_event_command cmd,
as_error err 
)
void as_event_command_free ( as_event_command cmd)
bool as_event_command_parse_header ( as_event_command cmd)
bool as_event_command_parse_info ( as_event_command cmd)
bool as_event_command_parse_result ( as_event_command cmd)
bool as_event_command_parse_success_failure ( as_event_command cmd)
static void as_event_command_release ( as_event_command cmd)
inlinestatic

Definition at line 654 of file as_event_internal.h.

bool as_event_command_retry ( as_event_command cmd,
bool  timeout 
)
void as_event_command_schedule ( as_event_command cmd)
void as_event_command_write_start ( as_event_command cmd)
static bool as_event_conn_current_tran ( as_event_connection conn,
uint64_t  max_socket_idle_ns 
)
inlinestatic

Definition at line 602 of file as_event_internal.h.

static bool as_event_conn_current_trim ( as_event_connection conn,
uint64_t  max_socket_idle_ns 
)
inlinestatic

Definition at line 596 of file as_event_internal.h.

static int as_event_conn_validate ( as_event_connection conn)
inlinestatic

Definition at line 608 of file as_event_internal.h.

void as_event_connect ( as_event_command cmd,
as_async_conn_pool pool 
)
static void as_event_connection_timeout ( as_event_command cmd,
as_async_conn_pool pool 
)
inlinestatic
void as_event_connector_success ( as_event_command cmd)
void as_event_create_connections ( as_node node,
as_async_conn_pool pools 
)
bool as_event_create_loop ( as_event_loop event_loop)
bool as_event_decompress ( as_event_command cmd)
static void as_event_decr_conn ( as_event_command cmd)
inlinestatic
void as_event_error_callback ( as_event_command cmd,
as_error err 
)
bool as_event_execute ( as_event_loop event_loop,
as_event_executable  executable,
void *  udata 
)

Schedule execution of function on specified event loop. Command is placed on event loop queue and is never executed directly.

void as_event_execute_retry ( as_event_command cmd)
void as_event_executor_cancel ( as_event_executor executor,
uint32_t  queued_count 
)
void as_event_executor_complete ( as_event_executor executor)
void as_event_executor_error ( as_event_executor executor,
as_error err,
uint32_t  command_count 
)
static void as_event_loop_destroy ( as_event_loop event_loop)
inlinestatic
void as_event_node_destroy ( as_node node)
void as_event_notify_error ( as_event_command cmd,
as_error err 
)
void as_event_parse_error ( as_event_command cmd,
as_error err 
)
void as_event_process_timer ( as_event_command cmd)
bool as_event_proto_parse ( as_event_command cmd,
as_proto *  proto 
)
bool as_event_proto_parse_auth ( as_event_command cmd,
as_proto *  proto 
)
void as_event_query_complete ( as_event_command cmd)
void as_event_register_external_loop ( as_event_loop event_loop)
static void as_event_release_async_connection ( as_event_command cmd)
inlinestatic
static void as_event_release_connection ( as_event_connection conn,
as_async_conn_pool pool 
)
inlinestatic
void as_event_response_error ( as_event_command cmd,
as_error err 
)
static bool as_event_set_auth_parse_header ( as_event_command cmd)
inlinestatic
static void as_event_set_auth_read_header ( as_event_command cmd)
inlinestatic
static void as_event_set_auth_write ( as_event_command cmd,
as_session session 
)
inlinestatic
static void as_event_set_conn_last_used ( as_event_connection conn)
inlinestatic

Definition at line 619 of file as_event_internal.h.

static void as_event_set_write ( as_event_command cmd)
inlinestatic
void as_event_socket_error ( as_event_command cmd,
as_error err 
)
static bool as_event_socket_retry ( as_event_command cmd)
inlinestatic
void as_event_socket_timeout ( as_event_command cmd)
static void as_event_stop_read ( as_event_connection conn)
inlinestatic

Definition at line 649 of file as_event_internal.h.

static void as_event_stop_watcher ( as_event_command cmd,
as_event_connection conn 
)
inlinestatic

Definition at line 644 of file as_event_internal.h.

static void as_event_timer_again ( as_event_command cmd)
inlinestatic

Definition at line 634 of file as_event_internal.h.

static void as_event_timer_once ( as_event_command cmd,
uint64_t  timeout 
)
inlinestatic

Definition at line 624 of file as_event_internal.h.

static void as_event_timer_repeat ( as_event_command cmd,
uint64_t  repeat 
)
inlinestatic

Definition at line 629 of file as_event_internal.h.

static void as_event_timer_stop ( as_event_command cmd)
inlinestatic

Definition at line 639 of file as_event_internal.h.

void as_event_total_timeout ( as_event_command cmd)