From b0420c460bca595f5cf0cb779184a1f23108195a Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 14 Jan 2015 15:53:18 +0000
Subject: [PATCH] OPENDJ-1724 (CR-5789) Persistit: add support for verify-indexes
---
opendj3-server-dev/src/server/org/opends/server/api/Backend.java | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/api/Backend.java b/opendj3-server-dev/src/server/org/opends/server/api/Backend.java
index e732e5d..7734659 100644
--- a/opendj3-server-dev/src/server/org/opends/server/api/Backend.java
+++ b/opendj3-server-dev/src/server/org/opends/server/api/Backend.java
@@ -26,6 +26,8 @@
*/
package org.opends.server.api;
+import static org.opends.messages.BackendMessages.*;
+
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
@@ -36,8 +38,10 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.opendj.config.server.ConfigException;
import org.forgerock.opendj.ldap.ConditionResult;
+import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.schema.MatchingRule;
import org.opends.server.admin.Configuration;
+import org.opends.server.backends.pluggable.VerifyConfig;
import org.opends.server.core.AddOperation;
import org.opends.server.core.DeleteOperation;
import org.opends.server.core.DirectoryServer;
@@ -648,6 +652,37 @@
throws DirectoryException;
/**
+ * Indicates whether this backend supports indexing attributes to speed up searches.
+ *
+ * @return {@code true} if this backend supports indexing attributes, {@code false} otherwise
+ */
+ public boolean supportsIndexing()
+ {
+ return false;
+ }
+
+ /**
+ * Verify the integrity of the backend instance.
+ *
+ * @param verifyConfig
+ * The verify configuration.
+ * @return The results of the operation.
+ * @throws ConfigException
+ * If an unrecoverable problem arises during initialization.
+ * @throws InitializationException
+ * If a problem occurs during initialization that is not related to the server
+ * configuration.
+ * @throws DirectoryException
+ * If a Directory Server error occurs.
+ */
+ public long verifyBackend(VerifyConfig verifyConfig)
+ throws InitializationException, ConfigException, DirectoryException
+ {
+ throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM,
+ ERR_INDEXES_NOT_SUPPORTED.get(getBackendID()));
+ }
+
+ /**
* Indicates whether this backend provides a backup mechanism of any
* kind. This method is used by the backup process when backing up
* all backends to determine whether this backend is one that should
--
Gitblit v1.10.0