@Override public void connectionReadyForWrites(Object connectionID, boolean ready) { RemotingConnection connection = connectionMap.get(connectionID); if (connection != null) { log.info("Connection " + connection.getRemoteAddress() + " ready"); connection.getTransportConnection().fireReady(true); } else { log.error("Connection with id " + connectionID + " not found in connectionReadyForWrites()!"); } }
@Override public void connectionReadyForWrites(Object connectionID, boolean ready) { RemotingConnection connection = connectionMap.get(connectionID); if (connection != null) { log.info("Connection " + connection.getRemoteAddress() + " ready"); connection.getTransportConnection().fireReady(true); } else { log.error("Connection with id " + connectionID + " not found in connectionReadyForWrites()!"); } }
@Override public void connectionReadyForWrites(Object connectionID, boolean ready) { RemotingConnection connection = connectionMap.get(connectionID); if (connection != null) { log.info("Connection " + connection.getRemoteAddress() + " ready"); connection.getTransportConnection().fireReady(true); } else { log.error("Connection with id " + connectionID + " not found in connectionReadyForWrites()!"); } }
public void stop(boolean clearTokens) throws Exception { synchronized (this) { if (!started) { logger.trace("Stopping being ignored as it hasn't been started"); return; } started = false; } if (logger.isTraceEnabled()) { logger.trace("stop(clearTokens=" + clearTokens + ")", new Exception("Trace")); } // This is to avoid the write holding a lock while we are trying to close it if (replicatingChannel != null) { replicatingChannel.close(); replicatingChannel.getConnection().getTransportConnection().fireReady(true); } enabled = false; if (clearTokens) { clearReplicationTokens(); } RemotingConnection toStop = remotingConnection; if (toStop != null) { toStop.removeFailureListener(failureListener); toStop.destroy(); } remotingConnection = null; }
oldTransportConnection.fireReady(true);