CUBRID Engine  latest
shard_proxy_common.h File Reference
#include "porting.h"
#include "broker_shm.h"
#include "shard_proxy_queue.h"
#include "shard_proxy_log.h"
#include "memory_hash.h"
#include "shard_statement.h"
Include dependency graph for shard_proxy_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  t_io_buffer
 
struct  t_proxy_event
 
struct  t_wait_context
 
struct  t_socket_io
 
struct  t_socket_io_global
 
struct  t_client_io
 
struct  t_client_io_global
 
struct  t_cas_io
 
struct  t_shard_io
 
struct  t_shard_io_global
 
struct  t_context_stmt
 
struct  t_proxy_context
 
struct  t_proxy_context_global
 
struct  t_proxy_handler
 

Macros

#define MAX_FD   FD_SETSIZE
 
#define PROXY_INVALID_ID   (-1)
 
#define PROXY_INVALID_SHARD   (PROXY_INVALID_ID)
 
#define PROXY_INVALID_CAS   (PROXY_INVALID_ID)
 
#define PROXY_INVALID_CLIENT   (PROXY_INVALID_ID)
 
#define PROXY_INVALID_FUNC_CODE   (-1)
 
#define PROXY_INVALID_CONTEXT   (-1)
 
#define PROXY_EVENT_NULL_BUFFER   (NULL)
 
#define PROXY_EVENT_FROM_CAS   (true)
 
#define PROXY_EVENT_FROM_CLIENT   (false)
 

Typedefs

typedef struct t_io_buffer T_IO_BUFFER
 
typedef struct t_proxy_event T_PROXY_EVENT
 
typedef struct t_wait_context T_WAIT_CONTEXT
 
typedef struct t_socket_io T_SOCKET_IO
 
typedef struct t_socket_io_global T_SOCKET_IO_GLOBAL
 
typedef struct t_client_io T_CLIENT_IO
 
typedef struct t_client_io_global T_CLIENT_IO_GLOBAL
 
typedef struct t_cas_io T_CAS_IO
 
typedef struct t_shard_io T_SHARD_IO
 
typedef struct t_shard_io_global T_SHARD_IO_GLOBAL
 
typedef struct t_context_stmt T_CONTEXT_STMT
 
typedef struct t_proxy_context T_PROXY_CONTEXT
 
typedef struct t_proxy_context_global T_PROXY_CONTEXT_GLOBAL
 
typedef struct t_proxy_handler T_PROXY_HANDLER
 

Enumerations

enum  E_PROXY_EVENT {
  PROXY_EVENT_IO_READ = 0, PROXY_EVENT_IO_WRITE = 1, PROXY_EVENT_CLIENT_REQUEST = 2, PROXY_EVENT_CAS_RESPONSE = 3,
  PROXY_EVENT_CLIENT_CONN_ERROR = 4, PROXY_EVENT_CAS_CONN_ERROR = 5, PROXY_EVENT_CLIENT_WAKEUP_BY_SHARD = 6, PROXY_EVENT_CLIENT_WAKEUP_BY_STATEMENT = 7
}
 
enum  T_SOCKET_IO_STATUS { SOCK_IO_IDLE = 0, SOCK_IO_REG_WAIT = 1, SOCK_IO_ESTABLISHED = 2, SOCK_IO_CLOSE_WAIT = 3 }
 
enum  T_CAS_IO_STATUS { CAS_IO_NOT_CONNECTED = 0, CAS_IO_CONNECTED = 1, CAS_IO_CLOSE_WAIT = 2 }
 

Macro Definition Documentation

#define MAX_FD   FD_SETSIZE

Definition at line 42 of file shard_proxy_common.h.

Referenced by proxy_socket_io_initialize(), and shard_shm_get_max_context().

#define PROXY_EVENT_NULL_BUFFER   (NULL)

Definition at line 53 of file shard_proxy_common.h.

#define PROXY_INVALID_CAS   (PROXY_INVALID_ID)

Definition at line 48 of file shard_proxy_common.h.

#define PROXY_INVALID_CLIENT   (PROXY_INVALID_ID)

Definition at line 49 of file shard_proxy_common.h.

Referenced by proxy_context_clear().

#define PROXY_INVALID_FUNC_CODE   (-1)
#define PROXY_INVALID_ID   (-1)

Definition at line 46 of file shard_proxy_common.h.

#define PROXY_INVALID_SHARD   (PROXY_INVALID_ID)

Definition at line 47 of file shard_proxy_common.h.

Typedef Documentation

typedef struct t_cas_io T_CAS_IO

Definition at line 176 of file shard_proxy_common.h.

typedef struct t_client_io T_CLIENT_IO

Definition at line 142 of file shard_proxy_common.h.

Definition at line 158 of file shard_proxy_common.h.

Definition at line 215 of file shard_proxy_common.h.

typedef struct t_io_buffer T_IO_BUFFER

Definition at line 57 of file shard_proxy_common.h.

Definition at line 222 of file shard_proxy_common.h.

Definition at line 269 of file shard_proxy_common.h.

typedef struct t_proxy_event T_PROXY_EVENT

Definition at line 78 of file shard_proxy_common.h.

Definition at line 278 of file shard_proxy_common.h.

typedef struct t_shard_io T_SHARD_IO

Definition at line 193 of file shard_proxy_common.h.

Definition at line 207 of file shard_proxy_common.h.

typedef struct t_socket_io T_SOCKET_IO

Definition at line 110 of file shard_proxy_common.h.

Definition at line 132 of file shard_proxy_common.h.

Definition at line 94 of file shard_proxy_common.h.

Enumeration Type Documentation

Enumerator
PROXY_EVENT_IO_READ 
PROXY_EVENT_IO_WRITE 
PROXY_EVENT_CLIENT_REQUEST 
PROXY_EVENT_CAS_RESPONSE 
PROXY_EVENT_CLIENT_CONN_ERROR 
PROXY_EVENT_CAS_CONN_ERROR 
PROXY_EVENT_CLIENT_WAKEUP_BY_SHARD 
PROXY_EVENT_CLIENT_WAKEUP_BY_STATEMENT 

Definition at line 66 of file shard_proxy_common.h.

Enumerator
CAS_IO_NOT_CONNECTED 
CAS_IO_CONNECTED 
CAS_IO_CLOSE_WAIT 

Definition at line 169 of file shard_proxy_common.h.

Enumerator
SOCK_IO_IDLE 
SOCK_IO_REG_WAIT 
SOCK_IO_ESTABLISHED 
SOCK_IO_CLOSE_WAIT 

Definition at line 102 of file shard_proxy_common.h.