From e73561d3b0db47696c578736a50489a454ad6f9c Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 17 Mar 2015 13:08:57 +0000
Subject: [PATCH] OPENDJ-1708 Persistit: no rebuild-index support
---
opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java
index ef68ce8..4e66b49 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java
@@ -27,13 +27,10 @@
import static com.persistit.Transaction.CommitPolicy.*;
import static java.util.Arrays.*;
-import static org.opends.messages.ConfigMessages.ERR_CONFIG_BACKEND_INSANE_MODE;
-import static org.opends.messages.ConfigMessages.ERR_CONFIG_BACKEND_MODE_INVALID;
+
+import static org.opends.messages.ConfigMessages.*;
import static org.opends.messages.JebMessages.*;
-import static org.opends.server.util.ServerConstants.ALERT_DESCRIPTION_DISK_FULL;
-import static org.opends.server.util.ServerConstants.ALERT_DESCRIPTION_DISK_SPACE_LOW;
-import static org.opends.server.util.ServerConstants.ALERT_TYPE_DISK_FULL;
-import static org.opends.server.util.ServerConstants.ALERT_TYPE_DISK_SPACE_LOW;
+import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
import java.io.File;
@@ -482,7 +479,8 @@
return exchange;
}
- private void release()
+ @Override
+ public void close()
{
for (final Exchange ex : exchanges.values())
{
@@ -632,7 +630,7 @@
}
finally
{
- storageImpl.release();
+ storageImpl.close();
}
}
catch (final RollbackException e)
@@ -704,7 +702,7 @@
}
finally
{
- storageImpl.release();
+ storageImpl.close();
}
}
catch (final RollbackException e)
@@ -724,6 +722,12 @@
}
@Override
+ public WriteableStorage getWriteableStorage()
+ {
+ return new StorageImpl();
+ }
+
+ @Override
public boolean supportsBackupAndRestore()
{
return true;
@@ -962,7 +966,7 @@
setDBDirPermissions(config, backendDirectory);
}
- /** {@inheritDoc} */
+ @Override
public void removeStorageFiles() throws StorageRuntimeException
{
if (!backendDirectory.isDirectory())
--
Gitblit v1.10.0