| | |
| | | package org.opends.server.replication.server; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | import java.util.concurrent.Semaphore; |
| | |
| | | import org.opends.server.replication.protocol.*; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ResultCode; |
| | | |
| | | import static org.opends.messages.ReplicationMessages.*; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public ReplicationServerDomain getDomain() |
| | | { |
| | | return this.replicationServerDomain; |
| | | return replicationServerDomain; |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * @param msg The message to be processed. |
| | | */ |
| | | public void process(RoutableMsg msg) |
| | | void process(RoutableMsg msg) |
| | | { |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | logger.trace("In " |
| | | + replicationServerDomain.getLocalRSMonitorInstanceName() + " " |
| | | + this + " processes routable msg received:" + msg); |
| | | } |
| | | replicationServerDomain.process(msg, this); |
| | | } |
| | | |
| | | /** |
| | | * Responds to a monitor request message. |
| | | * |
| | | * @param msg |
| | | * The monitor request message. |
| | | */ |
| | | void processMonitorRequestMsg(MonitorRequestMsg msg) |
| | | { |
| | | replicationServerDomain.processMonitorRequestMsg(msg, this); |
| | | } |
| | | |
| | | /** |
| | | * Responds to a monitor message. |
| | | * |
| | | * @param msg |
| | | * The monitor message. |
| | | */ |
| | | void processMonitorMsg(MonitorMsg msg) |
| | | { |
| | | replicationServerDomain.processMonitorMsg(msg, this); |
| | | } |
| | | |
| | | /** |
| | | * Processes a change time heartbeat msg. |
| | | * |
| | | * @param msg The message to be processed. |
| | | */ |
| | | public void process(ChangeTimeHeartbeatMsg msg) |
| | | void process(ChangeTimeHeartbeatMsg msg) |
| | | { |
| | | if (logger.isTraceEnabled()) |
| | | logger.trace("In " |
| | |
| | | } |
| | | |
| | | /** |
| | | * Sets the replication server domain associated. |
| | | * @param rsd The provided replication server domain. |
| | | */ |
| | | protected void setReplicationServerDomain(ReplicationServerDomain rsd) |
| | | { |
| | | this.replicationServerDomain = rsd; |
| | | } |
| | | |
| | | /** |
| | | * Sets the window size when used when sending to the remote. |
| | | * @param size The provided window size. |
| | | */ |
| | |
| | | * Process a Ack message received. |
| | | * @param ack the message received. |
| | | */ |
| | | public void processAck(AckMsg ack) |
| | | void processAck(AckMsg ack) |
| | | { |
| | | if (replicationServerDomain!=null) |
| | | replicationServerDomain.processAck(ack, this); |
| | |
| | | * Process a ResetGenerationIdMsg message received. |
| | | * @param msg the message received. |
| | | */ |
| | | public void processResetGenId(ResetGenerationIdMsg msg) |
| | | void processResetGenId(ResetGenerationIdMsg msg) |
| | | { |
| | | if (replicationServerDomain!=null) |
| | | replicationServerDomain.resetGenerationId(this, msg); |