| | |
| | | import org.opends.server.types.*; |
| | | import static org.opends.messages.ReplicationMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | /** |
| | | * This class defines a server handler : |
| | |
| | | { |
| | | if (providedMsg != null) |
| | | { |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("In " + |
| | | if (logger.isTraceEnabled()) |
| | | logger.trace("In " + |
| | | ((handler != null) ? handler.toString() : "Replication Server") + |
| | | " closing session with err=" + providedMsg); |
| | | logError(providedMsg); |
| | |
| | | public void send(ReplicationMsg msg) throws IOException |
| | | { |
| | | // avoid logging anything for unit tests that include a null domain. |
| | | if (debugEnabled() && replicationServerDomain != null) |
| | | if (logger.isTraceEnabled() && replicationServerDomain != null) |
| | | { |
| | | TRACER.debugInfo("In " |
| | | logger.trace("In " |
| | | + replicationServerDomain.getLocalRSMonitorInstanceName() + " " |
| | | + this + " publishes message:\n" + msg); |
| | | } |
| | |
| | | */ |
| | | public void process(RoutableMsg msg) |
| | | { |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("In " |
| | | if (logger.isTraceEnabled()) |
| | | logger.trace("In " |
| | | + replicationServerDomain.getLocalRSMonitorInstanceName() + " " |
| | | + this + " processes routable msg received:" + msg); |
| | | replicationServerDomain.process(msg, this); |
| | |
| | | */ |
| | | public void process(ChangeTimeHeartbeatMsg msg) |
| | | { |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("In " |
| | | if (logger.isTraceEnabled()) |
| | | logger.trace("In " |
| | | + replicationServerDomain.getLocalRSMonitorInstanceName() + " " |
| | | + this + " processes received msg:\n" + msg); |
| | | replicationServerDomain.processChangeTimeHeartbeatMsg(this, msg); |
| | |
| | | { |
| | | // don't try anymore to join and return. |
| | | } |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("SH.shutdowned(" + this + ")"); |
| | | if (logger.isTraceEnabled()) |
| | | logger.trace("SH.shutdowned(" + this + ")"); |
| | | } |
| | | |
| | | /** |
| | |
| | | StartMsg inStartMsg, |
| | | StartMsg outStartMsg) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("In " + this.replicationServer.getMonitorInstanceName() |
| | | logger.trace("In " + this.replicationServer.getMonitorInstanceName() |
| | | + ", " + getClass().getSimpleName() + " " + this + ":" |
| | | + "\nSH START HANDSHAKE RECEIVED:\n" + inStartMsg |
| | | + "\nAND REPLIED:\n" + outStartMsg); |
| | |
| | | StartMsg outStartMsg, |
| | | StartMsg inStartMsg) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("In " + this.replicationServer.getMonitorInstanceName() |
| | | logger.trace("In " + this.replicationServer.getMonitorInstanceName() |
| | | + ", " + getClass().getSimpleName() + " " + this + ":" |
| | | + "\nSH START HANDSHAKE SENT:\n" + outStartMsg + "\nAND RECEIVED:\n" |
| | | + inStartMsg); |
| | |
| | | TopologyMsg inTopoMsg, |
| | | TopologyMsg outTopoMsg) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("In " + this.replicationServer.getMonitorInstanceName() |
| | | logger.trace("In " + this.replicationServer.getMonitorInstanceName() |
| | | + ", " + getClass().getSimpleName() + " " + this + ":" |
| | | + "\nSH TOPO HANDSHAKE RECEIVED:\n" + inTopoMsg + "\nAND REPLIED:\n" |
| | | + outTopoMsg); |
| | |
| | | TopologyMsg outTopoMsg, |
| | | TopologyMsg inTopoMsg) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("In " + this.replicationServer.getMonitorInstanceName() |
| | | logger.trace("In " + this.replicationServer.getMonitorInstanceName() |
| | | + ", " + getClass().getSimpleName() + " " + this + ":" |
| | | + "\nSH TOPO HANDSHAKE SENT:\n" + outTopoMsg + "\nAND RECEIVED:\n" |
| | | + inTopoMsg); |
| | |
| | | StartSessionMsg inStartSessionMsg, |
| | | TopologyMsg outTopoMsg) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("In " + this.replicationServer.getMonitorInstanceName() |
| | | logger.trace("In " + this.replicationServer.getMonitorInstanceName() |
| | | + ", " + getClass().getSimpleName() + " " + this + " :" |
| | | + "\nSH SESSION HANDSHAKE RECEIVED:\n" + inStartSessionMsg |
| | | + "\nAND REPLIED:\n" + outTopoMsg); |
| | |
| | | */ |
| | | protected void logStopReceived() |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("In " + this.replicationServer.getMonitorInstanceName() |
| | | logger.trace("In " + this.replicationServer.getMonitorInstanceName() |
| | | + ", " + getClass().getSimpleName() + " " + this + " :" |
| | | + "\nSH SESSION HANDSHAKE RECEIVED A STOP MESSAGE"); |
| | | } |
| | |
| | | protected void logStartECLSessionHandshake( |
| | | StartECLSessionMsg inStartECLSessionMsg) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("In " + this.replicationServer.getMonitorInstanceName() |
| | | logger.trace("In " + this.replicationServer.getMonitorInstanceName() |
| | | + ", " + getClass().getSimpleName() + " " + this + " :" |
| | | + "\nSH SESSION HANDSHAKE RECEIVED:\n" + inStartECLSessionMsg); |
| | | } |