From 641e89ef0e15c9edde69f3b8cf82c7dd5f68687a Mon Sep 17 00:00:00 2001
From: Yannick Lecaillez <ylecaillez@forgerock.com>
Date: Wed, 30 Sep 2015 14:28:07 +0000
Subject: [PATCH] OPENDJ-2016: New on disk merge import strategy based on storage engine.
---
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Importer.java | 35 ++++++++++++++++++-----------------
1 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Importer.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Importer.java
index 95e72fc..d1ba206 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Importer.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Importer.java
@@ -36,15 +36,17 @@
public interface Importer extends Closeable
{
/**
- * Creates a new tree identified by the provided name.
+ * Clear the tree whose name is provided. Ensure that an empty tree with the given name exists. If the tree already
+ * exists, all the data it contains will be deleted. If not, an empty tree will be created.
*
- * @param name
- * the tree name
+ * @param treeName name of the tree to clear
*/
- void createTree(TreeName name);
+ void clearTree(TreeName treeName);
/**
- * Creates a record with the provided key and value in the tree identified by the provided name.
+ * Creates a record with the provided key and value in the tree identified by the provided name. At the end of this
+ * method, the record is visible by {@link read(TreeName, ByteSequence)} and {@link openCursor(TreeName)} methods of
+ * this instance. The record is guaranteed to be persisted only after {@link #close()}.
*
* @param treeName
* the tree name
@@ -56,17 +58,6 @@
void put(TreeName treeName, ByteSequence key, ByteSequence value);
/**
- * Deletes the record with the provided key, in the tree whose name is provided.
- *
- * @param treeName
- * the tree name
- * @param key
- * the key of the record to delete
- * @return {@code true} if the record could be deleted, {@code false} otherwise
- */
- boolean delete(TreeName treeName, ByteSequence key);
-
- /**
* Reads the record's value associated to the provided key, in the tree whose name is provided.
*
* @param treeName
@@ -77,7 +68,17 @@
*/
ByteString read(TreeName treeName, ByteSequence key);
- /** {@inheritDoc} */
+ /**
+ * Opens a cursor on the tree whose name is provided. Cursors are predictable only if there is no pending
+ * {@link put(TreeName, ByteSequence, ByteSequence)} operations. Indeed, once opened, cursors might not reflect
+ * changes.
+ *
+ * @param treeName
+ * the tree name
+ * @return a new cursor
+ */
+ SequentialCursor<ByteString, ByteString> openCursor(TreeName treeName);
+
@Override
void close();
}
\ No newline at end of file
--
Gitblit v1.10.0