📄 haframework.h
字号:
/******************************************************************* * * * userdef.h * * * * This file is a part of the eXtremeDB-HA Application Framework * * Copyright (c) 2001-2006 McObject LLC * * All Rights Reserved * * * *******************************************************************//* * ++ * * PROJECT: eXtremeDB(tm) (c) 2003 McObject LLC * * SUBSYSTEM: HA support * * MODULE: USERDEF.H * * ABSTRACT: Low level OS dependent IPC framework. User definitions. * * VERSION: 1.0 * * HISTORY: * 1.0- 1 SS 1-Aug-2003 Created it was * */#ifndef _USERDEF_H_ #define _USERDEF_H_#define INCLUDE_SOCKETS#include "platform.h"#include "mco.h"#include "mcoHA.h"#ifdef CFG_USER_DEFINED_CHANNEL#ifdef __cplusplusextern "C" { #endif/********************************************************************** definitions of HA endpoints **********************************************************************/#define CHANNEL_NAME "Unknown"#define nw_MasterName "userdef"//#define nw_ConnectionString1 "userdef"#define nw_ConnectionString2 "userdef"#define nw_ConnectionString3 "userdef"#ifdef SECOND_INTERFACE #define nw_ConnectionString4 "userdef" #define nw_ConnectionString5 "userdef"#endif /********************************************************************** definitions of HA timeouts **********************************************************************//* Master/replica timeouts. These parameters * are passed to the mco_HA_attach_replica() & mco_HA_attach_master() */#if(CFG_USER_DEFINED_CHANNEL) #define TM_ATTACH_REPLICA 1000*5 // time to establish initial connection and the initial // databases synchronization #define TM_DETACH_REPLICA 1000*5 // time to disconnect a replica from the master #define TM_MASTER_COMMIT 1000*5 // total commit time (master) #define TM_REPLICA_COMMIT 1000*5 // total database update time at the replica side // "replica commit" #define TM_WAIT_FOR_DATA 1000*5 // amount of time a replica waits for the next transaction. #define TM_INFINITE -1 // also used if the parameter is irrelevant// #define RECONNECTION_DELAY 1000 #define TM_CONNECTION_TIMEOUT 1000 #define TM_ACCEPT_TIMEOUT 1000#endif/******************************************************************* * Insert here the definitions and functions prototipes that are * necessary for realisation of your own communication protocol *//*************************************************************************** * Definitions of user-defined-channel * ***************************************************************************/#define NW_MAX_NAMELENGTH 64 // max length of host name typedef struct nw_channel_ { mco_channel_t mco_channel; // internal HA channel descriptor uint2 status; // channel status void * db; // database handle } nw_channel_t, *nw_channel_h;#ifdef __cplusplus }#endif#endif //CFG_USER_DEFINED_CHANNEL#endif //_USERDEF_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -