| File was renamed from opendj-sdk/opends/src/server/org/opends/server/replication/changelog/ServerHandler.java |
| | |
| | | * |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.replication.changelog; |
| | | package org.opends.server.replication.server; |
| | | |
| | | import static org.opends.server.loggers.Error.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugInfo; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.messages.SynchronizationMessages.*; |
| | | import static org.opends.server.messages.ReplicationMessages.*; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | | |
| | | import java.io.IOException; |
| | |
| | | import org.opends.server.replication.protocol.ProtocolSession; |
| | | import org.opends.server.replication.protocol.RoutableMessage; |
| | | import org.opends.server.replication.protocol.ServerStartMessage; |
| | | import org.opends.server.replication.protocol.SynchronizationMessage; |
| | | import org.opends.server.replication.protocol.ReplicationMessage; |
| | | import org.opends.server.replication.protocol.UpdateMessage; |
| | | import org.opends.server.replication.protocol.WindowMessage; |
| | | import org.opends.server.types.Attribute; |
| | |
| | | private short changelogId; |
| | | |
| | | /** |
| | | * The time in milliseconds between heartbeats from the synchronization |
| | | * The time in milliseconds between heartbeats from the replication |
| | | * server. Zero means heartbeats are off. |
| | | */ |
| | | private long heartbeatInterval = 0; |
| | |
| | | session.publish(msg); |
| | | } |
| | | |
| | | SynchronizationMessage msg = session.receive(); |
| | | ReplicationMessage msg = session.receive(); |
| | | if (msg instanceof ServerStartMessage) |
| | | { |
| | | ServerStartMessage receivedMsg = (ServerStartMessage) msg; |
| | |
| | | // Create a thread to send heartbeat messages. |
| | | if (heartbeatInterval > 0) |
| | | { |
| | | heartbeatThread = new HeartbeatThread("Synchronization Heartbeat", |
| | | heartbeatThread = new HeartbeatThread("replication Heartbeat", |
| | | session, heartbeatInterval); |
| | | heartbeatThread.start(); |
| | | } |