From b68d5cc1a6352dddd67adf06b18c3690c683debe Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Mon, 07 Nov 2016 15:05:30 +0000
Subject: [PATCH] OPENDJ-3417 Move responsability of backends management to BackendConfigManager
---
opendj-server-legacy/src/main/java/org/opends/server/api/LocalBackend.java | 51 +++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 45 insertions(+), 6 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/api/LocalBackend.java b/opendj-server-legacy/src/main/java/org/opends/server/api/LocalBackend.java
index 8ac6bd3..9fc34f0 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/api/LocalBackend.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/api/LocalBackend.java
@@ -95,6 +95,15 @@
/** The set of persistent searches registered with this backend. */
private final ConcurrentLinkedQueue<PersistentSearch> persistentSearches = new ConcurrentLinkedQueue<>();
+ /**
+ * Returns the provided backend instance as a LocalBackend.
+ *
+ * @param backend
+ * A backend
+ * @return a local backend
+ * @throws IllegalArgumentException
+ * If the provided backend is not a LocalBackend
+ */
public static LocalBackend<?> asLocalBackend(Backend<?> backend)
{
if (backend instanceof LocalBackend)
@@ -712,7 +721,8 @@
return persistentSearches;
}
- public Set<PasswordStorageScheme<?>> getPasswordStorageSchemes() {
+ @Override
+ public Set<PasswordStorageScheme<?>> getSupportedPasswordStorageSchemes() {
return new HashSet<PasswordStorageScheme<?>>(DirectoryServer.getPasswordStorageSchemes());
}
@@ -725,25 +735,47 @@
*/
public abstract long getEntryCount();
- @Override
+ /**
+ * Retrieves the parent backend for this backend.
+ *
+ * @return The parent backend for this backend, or {@code null} if
+ * there is none.
+ */
public final LocalBackend<?> getParentBackend()
{
return parentBackend;
}
- @Override
+ /**
+ * Specifies the parent backend for this backend.
+ *
+ * @param parentBackend The parent backend for this backend.
+ */
public final synchronized void setParentBackend(Backend<?> parentBackend)
{
this.parentBackend = (LocalBackend<?>) parentBackend;
}
- @Override
+ /**
+ * Retrieves the set of subordinate backends for this backend.
+ *
+ * @return The set of subordinate backends for this backend, or an
+ * empty array if none exist.
+ */
public final LocalBackend<?>[] getSubordinateBackends()
{
return subordinateBackends;
}
- @Override
+
+ /**
+ * Adds the provided backend to the set of subordinate backends for
+ * this backend.
+ *
+ * @param subordinateBackend The backend to add to the set of
+ * subordinate backends for this
+ * backend.
+ */
public final synchronized void addSubordinateBackend(Backend<?> subordinateBackend)
{
LinkedHashSet<LocalBackend<?>> backendSet = new LinkedHashSet<>();
@@ -755,7 +787,14 @@
}
}
- @Override
+ /**
+ * Removes the provided backend from the set of subordinate backends
+ * for this backend.
+ *
+ * @param subordinateBackend The backend to remove from the set of
+ * subordinate backends for this
+ * backend.
+ */
public final synchronized void removeSubordinateBackend(Backend<?> subordinateBackend)
{
ArrayList<LocalBackend<?>> backendList = new ArrayList<>(subordinateBackends.length);
--
Gitblit v1.10.0