From 4fe1767665733394131391080c5c101738a6651c Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Tue, 03 Mar 2015 23:18:53 +0000
Subject: [PATCH] Minor pluggable backend code cleanup:
---
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Storage.java | 47 ++++++++++++++++++++++++++++-------------------
1 files changed, 28 insertions(+), 19 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Storage.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Storage.java
index 084fe89..0603289 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Storage.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Storage.java
@@ -26,10 +26,9 @@
package org.opends.server.backends.pluggable.spi;
import java.io.Closeable;
+import java.io.File;
import java.io.FilenameFilter;
-import org.opends.server.admin.std.server.PluggableBackendCfg;
-
/**
* This interface abstracts the underlying storage engine,
* isolating the pluggable backend generic code from a particular storage engine implementation.
@@ -37,17 +36,6 @@
public interface Storage extends Closeable
{
/**
- * Initializes the storage engine before opening it.
- *
- * @param cfg
- * the configuration object
- * @throws Exception
- * if a problem occurs with the underlying storage engine
- * @see #open() to open the storage engine
- */
- void initialize(PluggableBackendCfg cfg) throws Exception;
-
- /**
* Starts the import operation.
*
* @return a new Importer object which must be closed to release all resources
@@ -99,12 +87,6 @@
*/
void closeTree(TreeName treeName);
- /**
- * Returns a filename filter which selects the files to be included in a backup.
- * @return a filename filter which selects the files to be included in a backup
- */
- FilenameFilter getFilesToBackupFilter();
-
/** {@inheritDoc} */
@Override
void close();
@@ -122,4 +104,31 @@
* @return the current status of the storage
*/
StorageStatus getStorageStatus();
+
+ /**
+ * Returns {@code true} if this storage supports backup and restore.
+ *
+ * @return {@code true} if this storage supports backup and restore.
+ */
+ boolean supportsBackupAndRestore();
+
+ /**
+ * Returns the file system directory in which any database files are located. This method is
+ * called when performing backup and restore operations.
+ *
+ * @return The file system directory in which any database files are located.
+ * @throws UnsupportedOperationException
+ * If backup and restore is not supported by this storage.
+ */
+ File getDirectory();
+
+ /**
+ * Returns a filename filter which selects the files to be included in a backup. This method is
+ * called when performing backup operations.
+ *
+ * @return A filename filter which selects the files to be included in a backup.
+ * @throws UnsupportedOperationException
+ * If backup and restore is not supported by this storage.
+ */
+ FilenameFilter getFilesToBackupFilter();
}
--
Gitblit v1.10.0