Skip to content

File heartbeat.h

FileList > connection > heartbeat.h

Go to the source code of this file

  • #include "connection_defs.h"

Classes

Type Name
struct hbp_header
struct hbp_proc_register

Public Types

Type Name
enum HBP_CLUSTER_MESSAGE
typedef struct hbp_header HBP_HEADER
typedef struct hbp_proc_register HBP_PROC_REGISTER
enum HB_NODE_STATE
typedef enum HB_NODE_STATE HB_NODE_STATE_TYPE
typedef enum hb_proc_type HB_PROC_TYPE
enum hb_proc_type

Public Attributes

Type Name
bool hb_Proc_shutdown

Public Functions

Type Name
int css_receive_heartbeat_data (CSS_CONN_ENTRY * conn, char * data, int size)
int css_receive_heartbeat_request (CSS_CONN_ENTRY * conn, int * command)
int css_send_heartbeat_data (CSS_CONN_ENTRY * conn, const char * data, int size)
int css_send_heartbeat_request (CSS_CONN_ENTRY * conn, int command)
int hb_deregister_from_master (void)
HBP_PROC_REGISTER * hb_make_set_hbp_register (int type)
const char * hb_node_state_string (HB_NODE_STATE_TYPE nstate)
int hb_process_init (const char * server_name, const char * log_path, HB_PROC_TYPE type)
void hb_process_term (void)
const char * hb_process_type_string (int ptype)
int hb_register_to_master (CSS_CONN_ENTRY * conn, int type)
void hb_set_argv (char ** argv)
void hb_set_exec_path (char * exec_path)

Macros

Type Name
define HB_DEFAULT_APPLY_MAX_MEM_SIZE (500)
define HB_DEFAULT_CALC_SCORE_INTERVAL_IN_MSECS (3\*1000)
define HB_DEFAULT_CHANGEMODE_INTERVAL_IN_MSECS (5\*1000)
define HB_DEFAULT_CHECK_VALID_PING_SERVER_INTERVAL_IN_MSECS (1\*60\*60\*1000)
define HB_DEFAULT_DEREG_CONFIRM_INTERVAL_IN_MSECS (500)
define HB_DEFAULT_FAILOVER_WAIT_TIME_IN_MSECS (3\*1000)
define HB_DEFAULT_HA_PORT_ID (59901)
define HB_DEFAULT_HEARTBEAT_INTERVAL_IN_MSECS (500)
define HB_DEFAULT_INIT_TIMER_IN_MSECS (10\*1000)
define HB_DEFAULT_MAX_HEARTBEAT_GAP (5)
define HB_DEFAULT_MAX_PROCESS_DEREG_CONFIRM (120)
define HB_DEFAULT_MAX_PROCESS_START_CONFIRM (20)
define HB_DEFAULT_START_CONFIRM_INTERVAL_IN_MSECS (3\*1000)
define HB_DEFAULT_UNACCEPTABLE_PROC_RESTART_TIMEDIFF_IN_MSECS (2\*60\*1000)
define HB_DISK_FAILURE_CHECK_TIMER_IN_MSECS (1\*100)
define HB_JOB_TIMER_IMMEDIATELY (0)
define HB_JOB_TIMER_WAIT_100_MILLISECOND (1\*100)
define HB_JOB_TIMER_WAIT_500_MILLISECOND (5\*100)
define HB_JOB_TIMER_WAIT_A_SECOND (1\*1000)
define HB_MAX_GROUP_ID_LEN (64)
define HB_MAX_NUM_PROC_ARGV (16)
define HB_MAX_SZ_PROC_ARGS ([**HB\_MAX\_NUM\_PROC\_ARGV**](heartbeat_8h.md#define-hb_max_num_proc_argv)\*[**HB\_MAX\_SZ\_PROC\_ARGV**](heartbeat_8h.md#define-hb_max_sz_proc_argv))
define HB_MAX_SZ_PROC_ARGV (64)
define HB_MAX_SZ_PROC_EXEC_PATH (128)
define HB_MIN_DIFF_CHECK_DISK_FAILURE_INTERVAL_IN_SECS (10)
define HB_NSTATE_MASTER_STR "master"
define HB_NSTATE_REPLICA_STR "replica"
define HB_NSTATE_SLAVE_STR "slave"
define HB_NSTATE_STR_SZ (32)
define HB_NSTATE_TO_BE_MASTER_STR "to-[**be**](broker__monitor_8c.md#function-timeout)-[**master"**](broker__monitor_8c.md#function-timeout)
define HB_NSTATE_TO_BE_SLAVE_STR "to-[**be**](broker__monitor_8c.md#function-timeout)-[**slave"**](broker__monitor_8c.md#function-timeout)
define HB_NSTATE_UNKNOWN_STR "unknown"
define HB_PTYPE_APPLYLOGDB_STR "HA-[**applylogdb"**](broker__monitor_8c.md#function-timeout)
define HB_PTYPE_COPYLOGDB_STR "HA-[**copylogdb"**](broker__monitor_8c.md#function-timeout)
define HB_PTYPE_SERVER_STR "HA-[**server"**](broker__monitor_8c.md#function-timeout)
define HB_PTYPE_STR_SZ (16)
define HB_START_WAITING_TIME_IN_SECS (10)
define HB_STOP_WAITING_TIME_IN_SECS (1)
define HB_TEMP_CHECK_VALID_PING_SERVER_INTERVAL_IN_MSECS (5\*60\*1000)

Public Types Documentation

enum HBP_CLUSTER_MESSAGE

enum HBP_CLUSTER_MESSAGE {
    HBP_CLUSTER_HEARTBEAT = 0,
    HBP_CLUSTER_MSG_MAX
};

typedef HBP_HEADER

typedef struct hbp_header HBP_HEADER;

typedef HBP_PROC_REGISTER

typedef struct hbp_proc_register HBP_PROC_REGISTER;

enum HB_NODE_STATE

enum HB_NODE_STATE {
    HB_NSTATE_UNKNOWN = 0,
    HB_NSTATE_SLAVE = 1,
    HB_NSTATE_TO_BE_MASTER = 2,
    HB_NSTATE_TO_BE_SLAVE = 3,
    HB_NSTATE_MASTER = 4,
    HB_NSTATE_REPLICA = 5,
    HB_NSTATE_MAX
};

typedef HB_NODE_STATE_TYPE

typedef enum HB_NODE_STATE HB_NODE_STATE_TYPE;

typedef HB_PROC_TYPE

typedef enum hb_proc_type HB_PROC_TYPE;

enum hb_proc_type

enum hb_proc_type {
    HB_PTYPE_SERVER = 0,
    HB_PTYPE_COPYLOGDB = 1,
    HB_PTYPE_APPLYLOGDB = 2,
    HB_PTYPE_MAX
};

Public Attributes Documentation

variable hb_Proc_shutdown

bool hb_Proc_shutdown;

Public Functions Documentation

function css_receive_heartbeat_data

int css_receive_heartbeat_data (
    CSS_CONN_ENTRY * conn,
    char * data,
    int size
) 

function css_receive_heartbeat_request

int css_receive_heartbeat_request (
    CSS_CONN_ENTRY * conn,
    int * command
) 

function css_send_heartbeat_data

int css_send_heartbeat_data (
    CSS_CONN_ENTRY * conn,
    const  char * data,
    int size
) 

function css_send_heartbeat_request

int css_send_heartbeat_request (
    CSS_CONN_ENTRY * conn,
    int command
) 

function hb_deregister_from_master

int hb_deregister_from_master (
    void
) 

function hb_make_set_hbp_register

HBP_PROC_REGISTER * hb_make_set_hbp_register (
    int type
) 

function hb_node_state_string

const  char * hb_node_state_string (
    HB_NODE_STATE_TYPE nstate
) 

function hb_process_init

int hb_process_init (
    const  char * server_name,
    const  char * log_path,
    HB_PROC_TYPE type
) 

function hb_process_term

void hb_process_term (
    void
) 

function hb_process_type_string

const  char * hb_process_type_string (
    int ptype
) 

function hb_register_to_master

int hb_register_to_master (
    CSS_CONN_ENTRY * conn,
    int type
) 

function hb_set_argv

void hb_set_argv (
    char ** argv
) 

function hb_set_exec_path

void hb_set_exec_path (
    char * exec_path
) 

Macro Definition Documentation

define HB_DEFAULT_APPLY_MAX_MEM_SIZE

#define HB_DEFAULT_APPLY_MAX_MEM_SIZE `(500)`

define HB_DEFAULT_CALC_SCORE_INTERVAL_IN_MSECS

#define HB_DEFAULT_CALC_SCORE_INTERVAL_IN_MSECS `(3*1000)`

define HB_DEFAULT_CHANGEMODE_INTERVAL_IN_MSECS

#define HB_DEFAULT_CHANGEMODE_INTERVAL_IN_MSECS `(5*1000)`

define HB_DEFAULT_CHECK_VALID_PING_SERVER_INTERVAL_IN_MSECS

#define HB_DEFAULT_CHECK_VALID_PING_SERVER_INTERVAL_IN_MSECS `(1*60*60*1000)`

define HB_DEFAULT_DEREG_CONFIRM_INTERVAL_IN_MSECS

#define HB_DEFAULT_DEREG_CONFIRM_INTERVAL_IN_MSECS `(500)`

define HB_DEFAULT_FAILOVER_WAIT_TIME_IN_MSECS

#define HB_DEFAULT_FAILOVER_WAIT_TIME_IN_MSECS `(3*1000)`

define HB_DEFAULT_HA_PORT_ID

#define HB_DEFAULT_HA_PORT_ID `(59901)`

define HB_DEFAULT_HEARTBEAT_INTERVAL_IN_MSECS

#define HB_DEFAULT_HEARTBEAT_INTERVAL_IN_MSECS `(500)`

define HB_DEFAULT_INIT_TIMER_IN_MSECS

#define HB_DEFAULT_INIT_TIMER_IN_MSECS `(10*1000)`

define HB_DEFAULT_MAX_HEARTBEAT_GAP

#define HB_DEFAULT_MAX_HEARTBEAT_GAP `(5)`

define HB_DEFAULT_MAX_PROCESS_DEREG_CONFIRM

#define HB_DEFAULT_MAX_PROCESS_DEREG_CONFIRM `(120)`

define HB_DEFAULT_MAX_PROCESS_START_CONFIRM

#define HB_DEFAULT_MAX_PROCESS_START_CONFIRM `(20)`

define HB_DEFAULT_START_CONFIRM_INTERVAL_IN_MSECS

#define HB_DEFAULT_START_CONFIRM_INTERVAL_IN_MSECS `(3*1000)`

define HB_DEFAULT_UNACCEPTABLE_PROC_RESTART_TIMEDIFF_IN_MSECS

#define HB_DEFAULT_UNACCEPTABLE_PROC_RESTART_TIMEDIFF_IN_MSECS `(2*60*1000)`

define HB_DISK_FAILURE_CHECK_TIMER_IN_MSECS

#define HB_DISK_FAILURE_CHECK_TIMER_IN_MSECS `(1*100)`

define HB_JOB_TIMER_IMMEDIATELY

#define HB_JOB_TIMER_IMMEDIATELY `(0)`

define HB_JOB_TIMER_WAIT_100_MILLISECOND

#define HB_JOB_TIMER_WAIT_100_MILLISECOND `(1*100)`

define HB_JOB_TIMER_WAIT_500_MILLISECOND

#define HB_JOB_TIMER_WAIT_500_MILLISECOND `(5*100)`

define HB_JOB_TIMER_WAIT_A_SECOND

#define HB_JOB_TIMER_WAIT_A_SECOND `(1*1000)`

define HB_MAX_GROUP_ID_LEN

#define HB_MAX_GROUP_ID_LEN `(64)`

define HB_MAX_NUM_PROC_ARGV

#define HB_MAX_NUM_PROC_ARGV `(16)`

define HB_MAX_SZ_PROC_ARGS

#define HB_MAX_SZ_PROC_ARGS `( HB_MAX_NUM_PROC_ARGV * HB_MAX_SZ_PROC_ARGV )`

define HB_MAX_SZ_PROC_ARGV

#define HB_MAX_SZ_PROC_ARGV `(64)`

define HB_MAX_SZ_PROC_EXEC_PATH

#define HB_MAX_SZ_PROC_EXEC_PATH `(128)`

define HB_MIN_DIFF_CHECK_DISK_FAILURE_INTERVAL_IN_SECS

#define HB_MIN_DIFF_CHECK_DISK_FAILURE_INTERVAL_IN_SECS `(10)`

define HB_NSTATE_MASTER_STR

#define HB_NSTATE_MASTER_STR `"master"`

define HB_NSTATE_REPLICA_STR

#define HB_NSTATE_REPLICA_STR `"replica"`

define HB_NSTATE_SLAVE_STR

#define HB_NSTATE_SLAVE_STR `"slave"`

define HB_NSTATE_STR_SZ

#define HB_NSTATE_STR_SZ `(32)`

define HB_NSTATE_TO_BE_MASTER_STR

#define HB_NSTATE_TO_BE_MASTER_STR `"to- be - master"`

define HB_NSTATE_TO_BE_SLAVE_STR

#define HB_NSTATE_TO_BE_SLAVE_STR `"to- be - slave"`

define HB_NSTATE_UNKNOWN_STR

#define HB_NSTATE_UNKNOWN_STR `"unknown"`

define HB_PTYPE_APPLYLOGDB_STR

#define HB_PTYPE_APPLYLOGDB_STR `"HA- applylogdb"`

define HB_PTYPE_COPYLOGDB_STR

#define HB_PTYPE_COPYLOGDB_STR `"HA- copylogdb"`

define HB_PTYPE_SERVER_STR

#define HB_PTYPE_SERVER_STR `"HA- server"`

define HB_PTYPE_STR_SZ

#define HB_PTYPE_STR_SZ `(16)`

define HB_START_WAITING_TIME_IN_SECS

#define HB_START_WAITING_TIME_IN_SECS `(10)`

define HB_STOP_WAITING_TIME_IN_SECS

#define HB_STOP_WAITING_TIME_IN_SECS `(1)`

define HB_TEMP_CHECK_VALID_PING_SERVER_INTERVAL_IN_MSECS

#define HB_TEMP_CHECK_VALID_PING_SERVER_INTERVAL_IN_MSECS `(5*60*1000)`


The documentation for this class was generated from the following file cubrid/src/connection/heartbeat.h