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 <stdint.h>
#include <stdbool.h>
#include <unistd.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_CP_MODE   64
 
#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_MASTER   1
 
#define AS_ASYNC_FLAGS_READ   2
 
#define AS_ASYNC_FLAGS_USING_SOCKET_TIMER   8
 
#define AS_ASYNC_STATE_AUTH_READ_BODY   5
 
#define AS_ASYNC_STATE_AUTH_READ_HEADER   4
 
#define AS_ASYNC_STATE_AUTH_WRITE   3
 
#define AS_ASYNC_STATE_COMMAND_READ_BODY   8
 
#define AS_ASYNC_STATE_COMMAND_READ_HEADER   7
 
#define AS_ASYNC_STATE_COMMAND_WRITE   6
 
#define AS_ASYNC_STATE_COMPLETE   9
 
#define AS_ASYNC_STATE_REGISTERED   1
 
#define AS_ASYNC_STATE_TLS_CONNECT   2
 
#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 )(void *udata)
 
typedef void(* as_event_executor_complete_fn )(struct as_event_executor *executor)
 
typedef void(* as_event_executor_destroy_fn )(struct as_event_executor *executor)
 
typedef bool(* as_event_parse_results_fn )(struct as_event_command *cmd)
 

Functions

static as_event_loopas_event_assign (as_event_loop *event_loop)
 
void as_event_close_cluster (as_cluster *cluster)
 
void as_event_close_connection (as_event_connection *conn)
 
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_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 alternate)
 
void as_event_command_write_start (as_event_command *cmd)
 
void as_event_connect (as_event_command *cmd)
 
static void as_event_connection_timeout (as_event_command *cmd, as_conn_pool *pool)
 
bool as_event_create_loop (as_event_loop *event_loop)
 
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_executor_cancel (as_event_executor *executor, int queued_count)
 
void as_event_executor_complete (as_event_command *cmd)
 
static void as_event_init_socket_timer (as_event_command *cmd)
 
static void as_event_init_total_timer (as_event_command *cmd, uint64_t timeout)
 
void as_event_node_destroy (as_node *node)
 
void as_event_parse_error (as_event_command *cmd, as_error *err)
 
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_conn_pool *pool)
 
static void as_event_repeat_socket_timer (as_event_command *cmd)
 
void as_event_response_error (as_event_command *cmd, as_error *err)
 
static void 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)
 
static void as_event_set_conn_last_used (as_event_connection *conn, uint32_t max_socket_idle)
 
static void as_event_set_total_timer (as_event_command *cmd, uint64_t timeout)
 
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_timer (as_event_command *cmd)
 
static void as_event_stop_watcher (as_event_command *cmd, as_event_connection *conn)
 
void as_event_total_timeout (as_event_command *cmd)
 
static int as_event_validate_connection (as_event_connection *conn)
 

Macro Definition Documentation

#define AS_ASYNC_AUTH_RETURN_CODE   1

Definition at line 67 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_CP_MODE   64

Definition at line 65 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_EVENT_RECEIVED   16

Definition at line 63 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_FREE_BUF   32

Definition at line 64 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_HAS_TIMER   4

Definition at line 61 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_MASTER   1

Definition at line 59 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_READ   2

Definition at line 60 of file as_event_internal.h.

#define AS_ASYNC_FLAGS_USING_SOCKET_TIMER   8

Definition at line 62 of file as_event_internal.h.

#define AS_ASYNC_STATE_AUTH_READ_BODY   5

Definition at line 53 of file as_event_internal.h.

#define AS_ASYNC_STATE_AUTH_READ_HEADER   4

Definition at line 52 of file as_event_internal.h.

#define AS_ASYNC_STATE_AUTH_WRITE   3

Definition at line 51 of file as_event_internal.h.

#define AS_ASYNC_STATE_COMMAND_READ_BODY   8

Definition at line 56 of file as_event_internal.h.

#define AS_ASYNC_STATE_COMMAND_READ_HEADER   7

Definition at line 55 of file as_event_internal.h.

#define AS_ASYNC_STATE_COMMAND_WRITE   6

Definition at line 54 of file as_event_internal.h.

#define AS_ASYNC_STATE_COMPLETE   9

Definition at line 57 of file as_event_internal.h.

#define AS_ASYNC_STATE_REGISTERED   1

Definition at line 49 of file as_event_internal.h.

#define AS_ASYNC_STATE_TLS_CONNECT   2

Definition at line 50 of file as_event_internal.h.

#define AS_ASYNC_STATE_UNREGISTERED   0

Definition at line 48 of file as_event_internal.h.

#define AS_EVENT_CONNECTION_COMPLETE   0

Definition at line 69 of file as_event_internal.h.

#define AS_EVENT_CONNECTION_ERROR   2

Definition at line 71 of file as_event_internal.h.

#define AS_EVENT_CONNECTION_PENDING   1

Definition at line 70 of file as_event_internal.h.

#define AS_EVENT_QUEUE_INITIAL_CAPACITY   256

Definition at line 73 of file as_event_internal.h.

Typedef Documentation

typedef void(* as_event_executable)(void *udata)

Definition at line 108 of file as_event_internal.h.

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

Definition at line 110 of file as_event_internal.h.

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

Definition at line 111 of file as_event_internal.h.

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

Definition at line 109 of file as_event_internal.h.

Function Documentation

static as_event_loop* as_event_assign ( as_event_loop event_loop)
inlinestatic

Definition at line 557 of file as_event_internal.h.

References as_event_loop_get().

void as_event_close_cluster ( as_cluster cluster)
void as_event_close_connection ( as_event_connection conn)
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_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 546 of file as_event_internal.h.

bool as_event_command_retry ( as_event_command cmd,
bool  alternate 
)
void as_event_command_write_start ( as_event_command cmd)
void as_event_connect ( as_event_command cmd)
static void as_event_connection_timeout ( as_event_command cmd,
as_conn_pool pool 
)
inlinestatic
bool as_event_create_loop ( as_event_loop event_loop)
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_executor_cancel ( as_event_executor executor,
int  queued_count 
)
void as_event_executor_complete ( as_event_command cmd)
static void as_event_init_socket_timer ( as_event_command cmd)
inlinestatic

Definition at line 526 of file as_event_internal.h.

static void as_event_init_total_timer ( as_event_command cmd,
uint64_t  timeout 
)
inlinestatic

Definition at line 516 of file as_event_internal.h.

void as_event_node_destroy ( as_node node)
void as_event_parse_error ( as_event_command cmd,
as_error err 
)
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_conn_pool pool 
)
inlinestatic

Definition at line 601 of file as_event_internal.h.

References as_conn_pool_dec(), and as_event_close_connection().

static void as_event_repeat_socket_timer ( as_event_command cmd)
inlinestatic

Definition at line 531 of file as_event_internal.h.

void as_event_response_error ( as_event_command cmd,
as_error err 
)
static void 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)
inlinestatic
static void as_event_set_conn_last_used ( as_event_connection conn,
uint32_t  max_socket_idle 
)
inlinestatic

Definition at line 511 of file as_event_internal.h.

static void as_event_set_total_timer ( as_event_command cmd,
uint64_t  timeout 
)
inlinestatic

Definition at line 521 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_timer ( as_event_command cmd)
inlinestatic

Definition at line 536 of file as_event_internal.h.

static void as_event_stop_watcher ( as_event_command cmd,
as_event_connection conn 
)
inlinestatic

Definition at line 541 of file as_event_internal.h.

void as_event_total_timeout ( as_event_command cmd)
static int as_event_validate_connection ( as_event_connection conn)
inlinestatic

Definition at line 505 of file as_event_internal.h.