32 #define HB_DEFAULT_HA_PORT_ID (59901) 33 #define HB_DEFAULT_APPLY_MAX_MEM_SIZE (500) 35 #define HB_DEFAULT_INIT_TIMER_IN_MSECS (10*1000) 36 #define HB_DEFAULT_HEARTBEAT_INTERVAL_IN_MSECS (500) 37 #define HB_DEFAULT_CALC_SCORE_INTERVAL_IN_MSECS (3*1000) 38 #define HB_DEFAULT_CHECK_VALID_PING_SERVER_INTERVAL_IN_MSECS (1*60*60*1000) 39 #define HB_TEMP_CHECK_VALID_PING_SERVER_INTERVAL_IN_MSECS (5*60*1000) 40 #define HB_DEFAULT_FAILOVER_WAIT_TIME_IN_MSECS (3*1000) 41 #define HB_DEFAULT_START_CONFIRM_INTERVAL_IN_MSECS (3*1000) 42 #define HB_DEFAULT_DEREG_CONFIRM_INTERVAL_IN_MSECS (500) 43 #define HB_DEFAULT_MAX_PROCESS_START_CONFIRM (20) 44 #define HB_DEFAULT_MAX_PROCESS_DEREG_CONFIRM (120) 45 #define HB_DEFAULT_UNACCEPTABLE_PROC_RESTART_TIMEDIFF_IN_MSECS (2*60*1000) 46 #define HB_DEFAULT_CHANGEMODE_INTERVAL_IN_MSECS (5*1000) 47 #define HB_DEFAULT_MAX_HEARTBEAT_GAP (5) 48 #define HB_MIN_DIFF_CHECK_DISK_FAILURE_INTERVAL_IN_SECS (10) 50 #define HB_JOB_TIMER_IMMEDIATELY (0) 51 #define HB_JOB_TIMER_WAIT_A_SECOND (1*1000) 52 #define HB_JOB_TIMER_WAIT_500_MILLISECOND (5*100) 53 #define HB_JOB_TIMER_WAIT_100_MILLISECOND (1*100) 54 #define HB_DISK_FAILURE_CHECK_TIMER_IN_MSECS (1*100) 56 #define HB_START_WAITING_TIME_IN_SECS (10) 57 #define HB_STOP_WAITING_TIME_IN_SECS (1) 68 #define HB_PTYPE_SERVER_STR "HA-server" 69 #define HB_PTYPE_COPYLOGDB_STR "HA-copylogdb" 70 #define HB_PTYPE_APPLYLOGDB_STR "HA-applylogdb" 71 #define HB_PTYPE_STR_SZ (16) 79 #define HB_MAX_GROUP_ID_LEN (64) 80 #define HB_MAX_SZ_PROC_EXEC_PATH (128) 81 #define HB_MAX_NUM_PROC_ARGV (16) 82 #define HB_MAX_SZ_PROC_ARGV (64) 83 #define HB_MAX_SZ_PROC_ARGS (HB_MAX_NUM_PROC_ARGV*HB_MAX_SZ_PROC_ARGV) 97 #define HB_NSTATE_UNKNOWN_STR "unknown" 98 #define HB_NSTATE_SLAVE_STR "slave" 99 #define HB_NSTATE_TO_BE_MASTER_STR "to-be-master" 100 #define HB_NSTATE_TO_BE_SLAVE_STR "to-be-slave" 101 #define HB_NSTATE_MASTER_STR "master" 102 #define HB_NSTATE_REPLICA_STR "replica" 104 #define HB_NSTATE_STR_SZ (32) 117 #if defined(HPUX) || defined(_AIX) || defined(sparc)
int hb_process_master_request(void)
int css_receive_heartbeat_data(CSS_CONN_ENTRY *conn, char *data, int size)
int css_send_heartbeat_request(CSS_CONN_ENTRY *conn, int command)
int hb_register_to_master(CSS_CONN_ENTRY *conn, int type)
const char * hb_process_type_string(int ptype)
int hb_process_init(const char *server_name, const char *log_path, HB_PROC_TYPE type)
#define HB_MAX_SZ_PROC_ARGS
enum hb_proc_type HB_PROC_TYPE
#define HB_MAX_SZ_PROC_EXEC_PATH
void hb_set_exec_path(char *exec_path)
#define HB_MAX_GROUP_ID_LEN
void hb_process_term(void)
const char * hb_node_state_string(HB_NODE_STATE_TYPE nstate)
enum HB_NODE_STATE HB_NODE_STATE_TYPE
void hb_set_argv(char **argv)
int css_receive_heartbeat_request(CSS_CONN_ENTRY *conn, int *command)
#define CUB_MAXHOSTNAMELEN
int hb_deregister_from_master(void)
int css_send_heartbeat_data(CSS_CONN_ENTRY *conn, const char *data, int size)