public class UnicastNode extends java.lang.Object implements ClusterNode, java.lang.Runnable
ACTION_ADD, ACTION_CHK, ACTION_DEL, ACTION_IGR, ACTION_MOD, ACTION_OVR, ACTION_VOTE, DEBUG_ALL, DEBUG_CHECK, DEBUG_CLOSE, DEBUG_EXAM, DEBUG_HBEAT, DEBUG_INIT, DEBUG_NONE, DEBUG_RELAY, HB_ECOUNT, HB_ETIME, HB_PCOUNT, HB_PTIME, HB_SIZE, HB_TYPE, NODE_DOWN, NODE_NEW, NODE_RUNNING, NODE_STANDBY, NODE_TIMEOUT, RCVR_COMM, RCVR_JMS, RCVR_NONE, RCVR_TCP, RCVR_UDP| Constructor and Description |
|---|
UnicastNode(java.util.Map props) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
closes the node and all resources
|
int |
getDebug()
returns the debug mode of the node
|
int |
getRole()
returns the role of the node
|
int |
getSize()
returns the size of the cluster
|
int |
getStatus()
returns the status of the node
|
int |
getTimeout()
returns the sessionTimeout of the node
|
java.lang.String |
getURI()
returns the URI of the node
|
boolean |
isMaster() |
static void |
main(java.lang.String[] args) |
int |
relay(Event data,
int waitTime)
It is the API for application to send data to the node or group
asynchronously.
|
void |
run() |
void |
setDebug(int debug)
sets the debug mode of the node
|
void |
start()
It starts the cluster node and supervises its state.
|
void |
start(XQueue out,
int begin,
int len)
It starts the cluster node and supervises its state.
|
public void run()
run in interface java.lang.Runnablepublic void close()
ClusterNodeclose in interface ClusterNodepublic int relay(Event data, int waitTime)
relay in interface ClusterNodepublic boolean isMaster()
isMaster in interface ClusterNodepublic int getRole()
ClusterNodegetRole in interface ClusterNodepublic int getStatus()
ClusterNodegetStatus in interface ClusterNodepublic int getTimeout()
ClusterNodegetTimeout in interface ClusterNodepublic java.lang.String getURI()
ClusterNodegetURI in interface ClusterNodepublic int getSize()
ClusterNodegetSize in interface ClusterNodepublic int getDebug()
ClusterNodegetDebug in interface ClusterNodepublic void setDebug(int debug)
ClusterNodesetDebug in interface ClusterNodepublic void start()
public void start(XQueue out, int begin, int len)
start in interface ClusterNodepublic static void main(java.lang.String[] args)