Loading...
Searching...
No Matches
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)
 
void as_event_connection_complete (as_event_command *cmd)
 
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

◆ AS_ASYNC_AUTH_RETURN_CODE

#define AS_ASYNC_AUTH_RETURN_CODE   1

Definition at line 69 of file as_event_internal.h.

◆ AS_ASYNC_FLAGS_DESERIALIZE

#define AS_ASYNC_FLAGS_DESERIALIZE   1

Definition at line 60 of file as_event_internal.h.

◆ AS_ASYNC_FLAGS_EVENT_RECEIVED

#define AS_ASYNC_FLAGS_EVENT_RECEIVED   16

Definition at line 64 of file as_event_internal.h.

◆ AS_ASYNC_FLAGS_FREE_BUF

#define AS_ASYNC_FLAGS_FREE_BUF   32

Definition at line 65 of file as_event_internal.h.

◆ AS_ASYNC_FLAGS_HAS_TIMER

#define AS_ASYNC_FLAGS_HAS_TIMER   4

Definition at line 62 of file as_event_internal.h.

◆ AS_ASYNC_FLAGS_HEAP_REC

#define AS_ASYNC_FLAGS_HEAP_REC   128

Definition at line 67 of file as_event_internal.h.

◆ AS_ASYNC_FLAGS_LINEARIZE

#define AS_ASYNC_FLAGS_LINEARIZE   64

Definition at line 66 of file as_event_internal.h.

◆ AS_ASYNC_FLAGS_READ

#define AS_ASYNC_FLAGS_READ   2

Definition at line 61 of file as_event_internal.h.

◆ AS_ASYNC_FLAGS_USING_SOCKET_TIMER

#define AS_ASYNC_FLAGS_USING_SOCKET_TIMER   8

Definition at line 63 of file as_event_internal.h.

◆ AS_ASYNC_STATE_AUTH_READ_BODY

#define AS_ASYNC_STATE_AUTH_READ_BODY   7

Definition at line 53 of file as_event_internal.h.

◆ AS_ASYNC_STATE_AUTH_READ_HEADER

#define AS_ASYNC_STATE_AUTH_READ_HEADER   6

Definition at line 52 of file as_event_internal.h.

◆ AS_ASYNC_STATE_AUTH_WRITE

#define AS_ASYNC_STATE_AUTH_WRITE   5

Definition at line 51 of file as_event_internal.h.

◆ AS_ASYNC_STATE_COMMAND_READ_BODY

#define AS_ASYNC_STATE_COMMAND_READ_BODY   10

Definition at line 56 of file as_event_internal.h.

◆ AS_ASYNC_STATE_COMMAND_READ_HEADER

#define AS_ASYNC_STATE_COMMAND_READ_HEADER   9

Definition at line 55 of file as_event_internal.h.

◆ AS_ASYNC_STATE_COMMAND_WRITE

#define AS_ASYNC_STATE_COMMAND_WRITE   8

Definition at line 54 of file as_event_internal.h.

◆ AS_ASYNC_STATE_CONNECT

#define AS_ASYNC_STATE_CONNECT   3

Definition at line 49 of file as_event_internal.h.

◆ AS_ASYNC_STATE_DELAY_QUEUE

#define AS_ASYNC_STATE_DELAY_QUEUE   2

Definition at line 48 of file as_event_internal.h.

◆ AS_ASYNC_STATE_QUEUE_ERROR

#define AS_ASYNC_STATE_QUEUE_ERROR   11

Definition at line 57 of file as_event_internal.h.

◆ AS_ASYNC_STATE_REGISTERED

#define AS_ASYNC_STATE_REGISTERED   1

Definition at line 47 of file as_event_internal.h.

◆ AS_ASYNC_STATE_RETRY

#define AS_ASYNC_STATE_RETRY   12

Definition at line 58 of file as_event_internal.h.

◆ AS_ASYNC_STATE_TLS_CONNECT

#define AS_ASYNC_STATE_TLS_CONNECT   4

Definition at line 50 of file as_event_internal.h.

◆ AS_ASYNC_STATE_UNREGISTERED

#define AS_ASYNC_STATE_UNREGISTERED   0

Definition at line 46 of file as_event_internal.h.

◆ AS_EVENT_CONNECTION_COMPLETE

#define AS_EVENT_CONNECTION_COMPLETE   0

Definition at line 71 of file as_event_internal.h.

◆ AS_EVENT_CONNECTION_ERROR

#define AS_EVENT_CONNECTION_ERROR   2

Definition at line 73 of file as_event_internal.h.

◆ AS_EVENT_CONNECTION_PENDING

#define AS_EVENT_CONNECTION_PENDING   1

Definition at line 72 of file as_event_internal.h.

◆ AS_EVENT_QUEUE_INITIAL_CAPACITY

#define AS_EVENT_QUEUE_INITIAL_CAPACITY   256

Definition at line 75 of file as_event_internal.h.

Typedef Documentation

◆ as_event_executable

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

Definition at line 112 of file as_event_internal.h.

◆ as_event_executor_complete_fn

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

Definition at line 114 of file as_event_internal.h.

◆ as_event_parse_results_fn

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

Definition at line 113 of file as_event_internal.h.

Function Documentation

◆ as_async_conn_pool_incr_total()

static bool as_async_conn_pool_incr_total ( as_async_conn_pool * pool)
inlinestatic

◆ as_async_conn_pool_init()

static void as_async_conn_pool_init ( as_async_conn_pool * pool,
uint32_t min_size,
uint32_t max_size )
inlinestatic

◆ as_async_conn_pool_push()

static bool as_async_conn_pool_push ( as_async_conn_pool * pool,
as_event_connection * conn )
inlinestatic

◆ as_async_conn_pool_push_head()

static bool as_async_conn_pool_push_head ( as_async_conn_pool * pool,
as_event_connection * conn )
inlinestatic

◆ as_event_assign()

static as_event_loop * as_event_assign ( as_event_loop * event_loop)
inlinestatic

Definition at line 671 of file as_event_internal.h.

References as_event_loop_get().

◆ as_event_batch_complete()

void as_event_batch_complete ( as_event_command * cmd)

◆ as_event_close_cluster()

void as_event_close_cluster ( as_cluster * cluster)

◆ as_event_close_connection()

static void as_event_close_connection ( as_event_connection * conn)
inlinestatic

Definition at line 620 of file as_event_internal.h.

◆ as_event_command_destroy()

static void as_event_command_destroy ( as_event_command * cmd)
inlinestatic

Definition at line 815 of file as_event_internal.h.

References as_node_release(), and as_event_command::node.

◆ as_event_command_execute()

as_status as_event_command_execute ( as_event_command * cmd,
as_error * err )

◆ as_event_command_free()

void as_event_command_free ( as_event_command * cmd)

◆ as_event_command_parse_header()

bool as_event_command_parse_header ( as_event_command * cmd)

◆ as_event_command_parse_info()

bool as_event_command_parse_info ( as_event_command * cmd)

◆ as_event_command_parse_result()

bool as_event_command_parse_result ( as_event_command * cmd)

◆ as_event_command_parse_success_failure()

bool as_event_command_parse_success_failure ( as_event_command * cmd)

◆ as_event_command_release()

static void as_event_command_release ( as_event_command * cmd)
inlinestatic

Definition at line 660 of file as_event_internal.h.

◆ as_event_command_retry()

bool as_event_command_retry ( as_event_command * cmd,
bool timeout )

◆ as_event_command_schedule()

void as_event_command_schedule ( as_event_command * cmd)

◆ as_event_command_write_start()

void as_event_command_write_start ( as_event_command * cmd)

◆ as_event_conn_current_tran()

static bool as_event_conn_current_tran ( as_event_connection * conn,
uint64_t max_socket_idle_ns )
inlinestatic

Definition at line 608 of file as_event_internal.h.

◆ as_event_conn_current_trim()

static bool as_event_conn_current_trim ( as_event_connection * conn,
uint64_t max_socket_idle_ns )
inlinestatic

Definition at line 602 of file as_event_internal.h.

◆ as_event_conn_validate()

static int as_event_conn_validate ( as_event_connection * conn)
inlinestatic

Definition at line 614 of file as_event_internal.h.

◆ as_event_connect()

void as_event_connect ( as_event_command * cmd,
as_async_conn_pool * pool )

◆ as_event_connection_complete()

void as_event_connection_complete ( as_event_command * cmd)

◆ as_event_connection_timeout()

static void as_event_connection_timeout ( as_event_command * cmd,
as_async_conn_pool * pool )
inlinestatic

◆ as_event_connector_success()

void as_event_connector_success ( as_event_command * cmd)

◆ as_event_create_connections()

void as_event_create_connections ( as_node * node,
as_async_conn_pool * pools )

◆ as_event_create_loop()

bool as_event_create_loop ( as_event_loop * event_loop)

◆ as_event_decompress()

bool as_event_decompress ( as_event_command * cmd)

◆ as_event_decr_conn()

static void as_event_decr_conn ( as_event_command * cmd)
inlinestatic

◆ as_event_error_callback()

void as_event_error_callback ( as_event_command * cmd,
as_error * err )

◆ as_event_execute()

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.

◆ as_event_execute_retry()

void as_event_execute_retry ( as_event_command * cmd)

◆ as_event_executor_cancel()

void as_event_executor_cancel ( as_event_executor * executor,
uint32_t queued_count )

◆ as_event_executor_complete()

void as_event_executor_complete ( as_event_executor * executor)

◆ as_event_executor_error()

void as_event_executor_error ( as_event_executor * executor,
as_error * err,
uint32_t command_count )

◆ as_event_loop_destroy()

static void as_event_loop_destroy ( as_event_loop * event_loop)
inlinestatic

◆ as_event_node_destroy()

void as_event_node_destroy ( as_node * node)

◆ as_event_notify_error()

void as_event_notify_error ( as_event_command * cmd,
as_error * err )

◆ as_event_parse_error()

void as_event_parse_error ( as_event_command * cmd,
as_error * err )

◆ as_event_process_timer()

void as_event_process_timer ( as_event_command * cmd)

◆ as_event_proto_parse()

bool as_event_proto_parse ( as_event_command * cmd,
as_proto * proto )

◆ as_event_proto_parse_auth()

bool as_event_proto_parse_auth ( as_event_command * cmd,
as_proto * proto )

◆ as_event_query_complete()

void as_event_query_complete ( as_event_command * cmd)

◆ as_event_register_external_loop()

void as_event_register_external_loop ( as_event_loop * event_loop)

◆ as_event_release_async_connection()

static void as_event_release_async_connection ( as_event_command * cmd)
inlinestatic

◆ as_event_release_connection()

static void as_event_release_connection ( as_event_connection * conn,
as_async_conn_pool * pool )
inlinestatic

◆ as_event_response_error()

void as_event_response_error ( as_event_command * cmd,
as_error * err )

◆ as_event_set_auth_parse_header()

static bool as_event_set_auth_parse_header ( as_event_command * cmd)
inlinestatic

◆ as_event_set_auth_read_header()

static void as_event_set_auth_read_header ( as_event_command * cmd)
inlinestatic

◆ as_event_set_auth_write()

static void as_event_set_auth_write ( as_event_command * cmd,
as_session * session )
inlinestatic

◆ as_event_set_conn_last_used()

static void as_event_set_conn_last_used ( as_event_connection * conn)
inlinestatic

Definition at line 625 of file as_event_internal.h.

◆ as_event_set_write()

static void as_event_set_write ( as_event_command * cmd)
inlinestatic

◆ as_event_socket_error()

void as_event_socket_error ( as_event_command * cmd,
as_error * err )

◆ as_event_socket_retry()

static bool as_event_socket_retry ( as_event_command * cmd)
inlinestatic

◆ as_event_socket_timeout()

void as_event_socket_timeout ( as_event_command * cmd)

◆ as_event_stop_read()

static void as_event_stop_read ( as_event_connection * conn)
inlinestatic

Definition at line 655 of file as_event_internal.h.

◆ as_event_stop_watcher()

static void as_event_stop_watcher ( as_event_command * cmd,
as_event_connection * conn )
inlinestatic

Definition at line 650 of file as_event_internal.h.

◆ as_event_timer_again()

static void as_event_timer_again ( as_event_command * cmd)
inlinestatic

Definition at line 640 of file as_event_internal.h.

◆ as_event_timer_once()

static void as_event_timer_once ( as_event_command * cmd,
uint64_t timeout )
inlinestatic

Definition at line 630 of file as_event_internal.h.

◆ as_event_timer_repeat()

static void as_event_timer_repeat ( as_event_command * cmd,
uint64_t repeat )
inlinestatic

Definition at line 635 of file as_event_internal.h.

◆ as_event_timer_stop()

static void as_event_timer_stop ( as_event_command * cmd)
inlinestatic

Definition at line 645 of file as_event_internal.h.

◆ as_event_total_timeout()

void as_event_total_timeout ( as_event_command * cmd)