private void closeConnection(Address address, String reason) { Connection conn = node.connectionManager.getConnection(address); if (conn != null) { conn.close(reason, null); } }
private void closeConnection(Address address, String reason) { Connection conn = node.connectionManager.getConnection(address); if (conn != null) { conn.close(reason, null); } }
public static Connection getMemberConnection(@Nonnull NodeEngine engine, @Nonnull Address memberAddr) { return ((NodeEngineImpl) engine).getNode().getConnectionManager().getConnection(memberAddr); }
private boolean isThisNodeMasterCandidate(Collection<Address> addresses) { int thisHashCode = node.getThisAddress().hashCode(); for (Address address : addresses) { if (isBlacklisted(address)) { continue; } if (node.connectionManager.getConnection(address) != null) { if (thisHashCode > address.hashCode()) { return false; } } } return true; }
private boolean isThisNodeMasterCandidate(Collection<Address> possibleAddresses) { int thisHashCode = node.getThisAddress().hashCode(); for (Address address : possibleAddresses) { if (isBlacklisted(address)) { continue; } if (node.connectionManager.getConnection(address) != null) { if (thisHashCode > address.hashCode()) { return false; } } } return true; }
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(); } }
continue; if (node.getConnectionManager().getConnection(address) != null) { Future<Boolean> future = node.nodeEngine.getOperationService() .createInvocationBuilder(ClusterServiceImpl.SERVICE_NAME,
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(); } }
return null; conn = node.connectionManager.getConnection(target);
return null; conn = node.connectionManager.getConnection(target);
Connection conn = node.connectionManager.getConnection(currentMaster); if (conn != null && conn.isAlive()) { logger.info(format("Ignoring master response %s from %s since this node has an active master %s",
Connection conn = node.connectionManager.getConnection(currentMaster); if (conn != null && conn.isAlive()) { logger.info(format("Ignoring master response %s from %s since this node has an active master %s",
Connection existing = node.connectionManager.getConnection(target); if (existing != connection) { if (existing != null) {
Connection existing = node.connectionManager.getConnection(target); if (existing != connection) { if (existing != null) {