public final class ServerUtils extends Object
| Constructor and Description |
|---|
ServerUtils() |
ServerUtils(ServerHandler server,
ZkClient zkc) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkServerState(int serverState) |
static String |
convertFreeResourceOptToString(int freeResourceOpt) |
static String |
convertOpIdToString(int opId) |
static String |
convertRequestToString(int request) |
static String |
convertStateToString(int serverState) |
String |
getThreadRegisteredData() |
String |
getThreadRegisteredPath() |
static String |
julianTimestamp() |
static String |
processId() |
void |
updateServerState(int serverState) |
void |
updateServerStateAvailable() |
void |
updateStateClientTimeouted() |
void |
updateStateConnectFailed() |
void |
updateStateConnectingTimeouted() |
void |
updateStateConnectRejected() |
void |
updateStateDisconnected() |
void |
updateStatePortInUse() |
void |
updateStateReadTimeouted() |
void |
updateStateToConnected() |
void |
updateStateToStarting() |
void |
updateStateWriteTimeouted() |
public ServerUtils()
public ServerUtils(ServerHandler server, ZkClient zkc)
public static String julianTimestamp()
public static String processId()
public String getThreadRegisteredPath()
public String getThreadRegisteredData()
public static String convertStateToString(int serverState)
public static String convertRequestToString(int request)
public static String convertOpIdToString(int opId)
public static String convertFreeResourceOptToString(int freeResourceOpt)
public void updateServerStateAvailable()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void updateServerState(int serverState)
public void updateStateToStarting()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void updateStateToConnected()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void updateStateConnectFailed()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void updateStateConnectRejected()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void updateStateReadTimeouted()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void updateStateWriteTimeouted()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void updateStateClientTimeouted()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void updateStatePortInUse()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void updateStateConnectingTimeouted()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void updateStateDisconnected()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic boolean checkServerState(int serverState)
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionCopyright © 2020. All rights reserved.