From b48ce50fdf4d73e8be3799e3a7c6c2bf9d1b2965 Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Sun, 02 Sep 2007 17:58:07 +0000
Subject: [PATCH] fix for #1733 & #845 - Initialization of replication
---
opends/src/server/org/opends/server/replication/plugin/PersistentServerState.java | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/plugin/PersistentServerState.java b/opends/src/server/org/opends/server/replication/plugin/PersistentServerState.java
index 34f508e..fe033d7 100644
--- a/opends/src/server/org/opends/server/replication/plugin/PersistentServerState.java
+++ b/opends/src/server/org/opends/server/replication/plugin/PersistentServerState.java
@@ -313,9 +313,6 @@
{
ArrayList<ASN1OctetString> values = this.toASN1ArrayList();
- if (values.size() == 0)
- return ResultCode.SUCCESS;
-
LDAPAttribute attr =
new LDAPAttribute(REPLICATION_STATE, values);
LDAPModification mod = new LDAPModification(ModificationType.REPLACE, attr);
@@ -343,4 +340,26 @@
}
return op.getResultCode();
}
+
+ /**
+ * Empty the ServerState.
+ * After this call the Server State will be in the same state
+ * as if it was just created.
+ */
+ public void clearInMemory()
+ {
+ super.clear();
+ this.savedStatus = false;
+ }
+
+ /**
+ * Empty the ServerState.
+ * After this call the Server State will be in the same state
+ * as if it was just created.
+ */
+ public void clear()
+ {
+ clearInMemory();
+ save();
+ }
}
--
Gitblit v1.10.0