use of com.navercorp.pinpoint.common.server.cluster.zookeeper.exception.ConnectionException in project pinpoint by naver.
the class CuratorZookeeperClient method checkState.
private void checkState() throws PinpointZookeeperException {
if (!isConnected()) {
notConnectedStatus.update();
if (reconnectCondition.check(notConnectedStatus)) {
notConnectedStatus.reset();
try {
final org.apache.curator.CuratorZookeeperClient zookeeperClient = connectionManager.getCuratorFramework().getZookeeperClient();
logger.warn("ConnectionState looks something wrong. It will be reset.");
zookeeperClient.reset();
return;
} catch (Exception e) {
logger.warn("Could not reset connection. cause:{}", e.getMessage(), e);
}
}
final ConnectionState connectionState = connectionManager.getConnectionState();
throw new ConnectionException("Instance must be connected. connectionState:" + connectionState);
} else {
notConnectedStatus.reset();
}
}
use of com.navercorp.pinpoint.common.server.cluster.zookeeper.exception.ConnectionException in project pinpoint by pinpoint-apm.
the class CuratorZookeeperClient method checkState.
private void checkState() throws PinpointZookeeperException {
if (!isConnected()) {
notConnectedStatus.update();
if (reconnectCondition.check(notConnectedStatus)) {
notConnectedStatus.reset();
try {
final org.apache.curator.CuratorZookeeperClient zookeeperClient = connectionManager.getCuratorFramework().getZookeeperClient();
logger.warn("ConnectionState looks something wrong. It will be reset.");
zookeeperClient.reset();
return;
} catch (Exception e) {
logger.warn("Could not reset connection. cause:{}", e.getMessage(), e);
}
}
final ConnectionState connectionState = connectionManager.getConnectionState();
throw new ConnectionException("Instance must be connected. connectionState:" + connectionState);
} else {
notConnectedStatus.reset();
}
}
Aggregations