@Override public boolean isAlive() { return connection.isAlive(); }
@Override public boolean isAlive() { return connection.isAlive(); }
private boolean checkAlreadyConnected(TcpIpConnection connection, Address remoteEndPoint) { final Connection existingConnection = connectionsMap.get(remoteEndPoint); if (existingConnection != null && existingConnection.isAlive()) { if (existingConnection != connection) { if (logger.isFinestEnabled()) { logger.finest(existingConnection + " is already bound to " + remoteEndPoint + ", new one is " + connection); } activeConnections.add(connection); } return true; } return false; }
private boolean checkAlreadyConnected(TcpIpConnection connection, Address remoteEndPoint) { final Connection existingConnection = connectionsMap.get(remoteEndPoint); if (existingConnection != null && existingConnection.isAlive()) { if (existingConnection != connection) { if (logger.isFinestEnabled()) { logger.finest(existingConnection + " is already bound to " + remoteEndPoint + ", new one is " + connection); } activeConnections.add(connection); } return true; } return false; }
/** * Logs a warning if the {@code member} hasn't sent a heartbeat in {@link #HEART_BEAT_INTERVAL_FACTOR} heartbeat * intervals and there is no live connection to the member */ private void logIfConnectionToEndpointIsMissing(long now, Member member) { long heartbeatTime = heartbeatFailureDetector.lastHeartbeat(member); if ((now - heartbeatTime) >= heartbeatIntervalMillis * HEART_BEAT_INTERVAL_FACTOR) { Connection conn = node.connectionManager.getOrConnect(member.getAddress()); if (conn == null || !conn.isAlive()) { logger.warning("This node does not have a connection to " + member); } } }
/** * Logs a warning if the {@code member} hasn't sent a heartbeat in {@link #HEART_BEAT_INTERVAL_FACTOR} heartbeat * intervals and there is no live connection to the member */ private void logIfConnectionToEndpointIsMissing(long now, Member member) { long heartbeatTime = heartbeatFailureDetector.lastHeartbeat(member); if ((now - heartbeatTime) >= heartbeatIntervalMillis * HEART_BEAT_INTERVAL_FACTOR) { Connection conn = node.connectionManager.getOrConnect(member.getAddress()); if (conn == null || !conn.isAlive()) { logger.warning("This node does not have a connection to " + member); } } }
iterator.remove(); } catch (Exception e) { if (subscriber.isAlive()) { successful = false; logger.warning("Deregistration of listener with ID " + userRegistrationId
iterator.remove(); } catch (Exception e) { if (subscriber.isAlive()) { successful = false; logger.warning("Deregistration of listener with ID " + userRegistrationId
private void cleanupEndpointsWithDeadConnections() { for (ClientEndpoint endpoint : clientEndpointManager.getEndpoints()) { if (!endpoint.getConnection().isAlive()) { //if connection is not alive, it means we come across an edge case. //normally connection close should remove endpoint from client endpoint manager //this means that connection.close happened before, authentication complete(endpoint registered to manager) //therefore connection.close could not remove the endpoint. //we will remove the endpoint here when detected. if (logger.isFineEnabled()) { logger.fine("Cleaning up endpoints with dead connection " + endpoint); } clientEndpointManager.removeEndpoint(endpoint); } } }
private void cleanupEndpointsWithDeadConnections() { for (ClientEndpoint endpoint : clientEndpointManager.getEndpoints()) { if (!endpoint.getConnection().isAlive()) { //if connection is not alive, it means we come across an edge case. //normally connection close should remove endpoint from client endpoint manager //this means that connection.close happened before, authentication complete(endpoint registered to manager) //therefore connection.close could not remove the endpoint. //we will remove the endpoint here when detected. if (logger.isFineEnabled()) { logger.fine("Cleaning up endpoints with dead connection " + endpoint); } clientEndpointManager.removeEndpoint(endpoint); } } }
public void suspectAddressIfNotConnected(Address address) { lock.lock(); try { MemberImpl member = getMember(address); if (member == null) { if (logger.isFineEnabled()) { logger.fine("Cannot suspect " + address + ", since it's not a member."); } return; } Connection conn = node.getConnectionManager().getConnection(address); if (conn != null && conn.isAlive()) { if (logger.isFineEnabled()) { logger.fine("Cannot suspect " + member + ", since there's a live connection -> " + conn); } return; } suspectMember(member, "No connection", false); } finally { lock.unlock(); } }
public void suspectAddressIfNotConnected(Address address) { lock.lock(); try { MemberImpl member = getMember(address); if (member == null) { if (logger.isFineEnabled()) { logger.fine("Cannot suspect " + address + ", since it's not a member."); } return; } Connection conn = node.getConnectionManager().getConnection(address); if (conn != null && conn.isAlive()) { if (logger.isFineEnabled()) { logger.fine("Cannot suspect " + member + ", since there's a live connection -> " + conn); } return; } suspectMember(member, "No connection", false); } finally { lock.unlock(); } }
writer.writeKeyValueEntry("isAlive", connection.isAlive());
writer.writeKeyValueEntry("isAlive", connection.isAlive());
private void clear(String reason) { for (ClientEndpoint ce : endpointManager.getEndpoints()) { ClientEndpointImpl endpoint = (ClientEndpointImpl) ce; try { endpoint.destroy(); } catch (LoginException e) { logger.finest(e.getMessage()); } try { final Connection conn = endpoint.getConnection(); if (conn.isAlive()) { conn.close(reason, null); } } catch (Exception e) { logger.finest(e); } } endpointManager.clear(); ownershipMappings.clear(); }
private void clear(String reason) { for (ClientEndpoint ce : endpointManager.getEndpoints()) { ClientEndpointImpl endpoint = (ClientEndpointImpl) ce; try { endpoint.destroy(); } catch (LoginException e) { logger.finest(e.getMessage()); } try { final Connection conn = endpoint.getConnection(); if (conn.isAlive()) { conn.close(reason, null); } } catch (Exception e) { logger.finest(e); } } endpointManager.clear(); ownershipMappings.clear(); }
if (conn != null && conn.isAlive()) { logger.info(format("Ignoring master response %s from %s since this node has an active master %s", masterAddress, callerAddress, currentMaster));
if (!connection.isAlive()) { if (logger.isFinestEnabled()) { logger.finest(connection + " to " + remoteEndPoint + " is not registered since connection is not active.");
if (conn != null && conn.isAlive()) { logger.info(format("Ignoring master response %s from %s since this node has an active master %s", masterAddress, callerAddress, currentMaster));
if (!connection.isAlive()) { if (logger.isFinestEnabled()) { logger.finest(connection + " to " + remoteEndPoint + " is not registered since connection is not active.");