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.KeeperException
InterruptedException
public void updateServerState(int serverState)
public void updateStateToStarting() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void updateStateToConnected() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void updateStateConnectFailed() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void updateStateConnectRejected() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void updateStateReadTimeouted() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void updateStateWriteTimeouted() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void updateStateClientTimeouted() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void updateStatePortInUse() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void updateStateConnectingTimeouted() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void updateStateDisconnected() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public boolean checkServerState(int serverState) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
Copyright © 2020. All rights reserved.