From 3f27a7ede5ca9df06137254aa32d41d023ac105d Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Tue, 16 Sep 2014 15:05:25 +0000
Subject: [PATCH] OPENDJ-1444 CR-4537 Remove previous cookie from storage of ChangeNumberIndexDB
---
opends/src/server/org/opends/server/replication/server/changelog/file/LogFile.java | 61 ------------------------------
1 files changed, 0 insertions(+), 61 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/changelog/file/LogFile.java b/opends/src/server/org/opends/server/replication/server/changelog/file/LogFile.java
index afc5af2..2769928 100644
--- a/opends/src/server/org/opends/server/replication/server/changelog/file/LogFile.java
+++ b/opends/src/server/org/opends/server/replication/server/changelog/file/LogFile.java
@@ -30,7 +30,6 @@
import static org.opends.messages.ReplicationMessages.*;
import static org.opends.server.loggers.ErrorLogger.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
-import static org.opends.server.replication.server.changelog.api.DBCursor.PositionStrategy.*;
import java.io.BufferedWriter;
import java.io.Closeable;
@@ -43,8 +42,6 @@
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.replication.server.changelog.api.ChangelogException;
import org.opends.server.replication.server.changelog.api.DBCursor;
-import org.opends.server.replication.server.changelog.api.DBCursor.KeyMatchingStrategy;
-import org.opends.server.replication.server.changelog.api.DBCursor.PositionStrategy;
import org.opends.server.replication.server.changelog.file.Log.RepositionableCursor;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.util.StaticUtils;
@@ -327,64 +324,6 @@
}
/**
- * Returns a cursor that allows to retrieve the records from this log,
- * starting at the position defined by the provided key.
- *
- * @param key
- * Key to use as a start position for the cursor. If key is
- * {@code null}, cursor will point at the first record of the log.
- * @return a cursor on the log records, which is never {@code null}
- * @throws ChangelogException
- * If the cursor can't be created.
- */
- LogFileCursor<K, V> getCursor(final K key) throws ChangelogException
- {
- return getCursor(key, KeyMatchingStrategy.EQUAL_TO_KEY, PositionStrategy.ON_MATCHING_KEY);
- }
-
- /**
- * Returns a cursor that allows to retrieve the records from this log,
- * starting at the position defined by the smallest key that is higher than
- * the provided key.
- *
- * @param key
- * Key to use as a start position for the cursor. If key is
- * {@code null}, cursor will point at the first record of the log.
- * @return a cursor on the log records, which is never {@code null}
- * @throws ChangelogException
- * If the cursor can't be created.
- */
- LogFileCursor<K, V> getNearestCursor(final K key) throws ChangelogException
- {
- return getCursor(key, KeyMatchingStrategy.GREATER_THAN_OR_EQUAL_TO_KEY, AFTER_MATCHING_KEY);
- }
-
- /** Returns a cursor starting from a key, using the strategy corresponding to provided indicator. */
- private LogFileCursor<K, V> getCursor(
- final K key,
- final KeyMatchingStrategy matchingStrategy,
- final PositionStrategy positionStrategy)
- throws ChangelogException
- {
- if (key == null)
- {
- return getCursor();
- }
- LogFileCursor<K, V> cursor = null;
- try
- {
- cursor = new LogFileCursor<K, V>(this);
- cursor.positionTo(key, matchingStrategy, positionStrategy);
- // if target is not found, cursor is positioned at end of stream
- return cursor;
- }
- catch (ChangelogException e) {
- StaticUtils.close(cursor);
- throw e;
- }
- }
-
- /**
* Returns a cursor initialised to the provided record and position in file.
*
* @param record
--
Gitblit v1.10.0