From 5d07ec161328a94de355aa4bf93918a2da5a8602 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 30 Apr 2015 14:20:06 +0000
Subject: [PATCH] OPENDJ-1801 (CR-6815) Revise usage of storage.open() and startImport()
---
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Importer.java | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 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 a31a73a..95e72fc 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
@@ -28,6 +28,7 @@
import java.io.Closeable;
import org.forgerock.opendj.ldap.ByteSequence;
+import org.forgerock.opendj.ldap.ByteString;
/**
* Allows to run an import. For performance reasons, imports are run without transactions.
@@ -54,6 +55,28 @@
*/
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
+ * the tree name
+ * @param key
+ * the record's key
+ * @return the record's value, or {@code null} if none exists
+ */
+ ByteString read(TreeName treeName, ByteSequence key);
+
/** {@inheritDoc} */
@Override
void close();
--
Gitblit v1.10.0