| | |
| | | import org.opends.server.replication.common.ChangeNumber; |
| | | import org.opends.server.replication.common.ServerState; |
| | | import org.opends.server.replication.protocol.UpdateMsg; |
| | | import org.opends.server.replication.server.changelog.api.*; |
| | | import org.opends.server.replication.server.changelog.api.ReplicationIterator; |
| | | import org.opends.server.replication.server.changelog.api.ReplicationIteratorComparator; |
| | | import org.opends.server.types.*; |
| | | |
| | | import static org.opends.messages.ReplicationMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | /** |
| | | * This class implements a buffering/producer/consumer mechanism of |
| | |
| | | } |
| | | finally |
| | | { |
| | | releaseAllIterators(iteratorSortedSet); |
| | | close(iteratorSortedSet); |
| | | } |
| | | |
| | | /* |
| | |
| | | } |
| | | else |
| | | { |
| | | iter.releaseCursor(); |
| | | close(iter); |
| | | } |
| | | } |
| | | |
| | |
| | | result = null; |
| | | } finally |
| | | { |
| | | releaseAllIterators(iteratorSortedSet); |
| | | close(iteratorSortedSet); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | iter.releaseCursor(); |
| | | close(iter); |
| | | } |
| | | } |
| | | } |
| | | return results; |
| | | } |
| | | |
| | | private void releaseAllIterators(SortedSet<ReplicationIterator> iterators) |
| | | { |
| | | if (iterators != null) |
| | | { |
| | | for (ReplicationIterator iter : iterators) |
| | | { |
| | | iter.releaseCursor(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Get the count of updates sent to this server. |
| | | * @return The count of update sent to this server. |