| | |
| | | package org.opends.server.synchronization.plugin; |
| | | |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | | import static org.opends.server.util.TimeThread.getTime; |
| | | import static org.opends.server.synchronization.common.LogMessages.*; |
| | | import static org.opends.server.synchronization.plugin.Historical.*; |
| | | import static org.opends.server.synchronization.protocol.OperationContext.*; |
| | |
| | | monitor = new SynchronizationMonitor(this); |
| | | DirectoryServer.registerMonitorProvider(monitor); |
| | | |
| | | // TODO : read RUV from database an make sure we don't |
| | | // generate changeNumber smaller than ChangeNumbers in the RUV |
| | | long startingChangeNumber = getTime(); |
| | | changeNumberGenerator = new ChangeNumberGenerator(serverId, |
| | | startingChangeNumber); |
| | | changeNumberGenerator = new ChangeNumberGenerator(serverId, state); |
| | | /* |
| | | * create the broker object used to publish and receive changes |
| | | */ |
| | |
| | | { |
| | | synchronized (pendingChanges) |
| | | { |
| | | pendingChanges.remove(changeNumber); |
| | | PendingChange change = pendingChanges.get(changeNumber); |
| | | change.setCommitted(true); |
| | | pushCommittedChanges(); |
| | | } |
| | | } |
| | |
| | | |
| | | while ((firstChange != null) && firstChange.isCommitted()) |
| | | { |
| | | if (firstChange.getOp().isSynchronizationOperation() == false) |
| | | if ((firstChange.getOp() != null ) && |
| | | (firstChange.getOp().isSynchronizationOperation() == false)) |
| | | { |
| | | numSentUpdates++; |
| | | broker.publish(firstChange.getMsg()); |