From f73b655466092169abac34833fb628fce1fcdebe Mon Sep 17 00:00:00 2001
From: jcduff <jcduff@localhost>
Date: Thu, 23 Oct 2008 14:04:24 +0000
Subject: [PATCH] The commit will bring the following features :     - An updated version of the underlying database. BDB JE 3.3 is now used.     - Attribute API refactoring providing a better abstraction and offering improved performances.     - A new GUI called the Control-Panel to replace the Status-Panel: the specifications for this       GUI are available on OpenDS Wiki and contains a link to a mockup.        See <https://www.opends.org/wiki/page/ControlPanelUISpecification>.     - Some changes in the replication protocol to implement "Assured Replication Mode". The        specifications are on OpenDS Wiki at <https://www.opends.org/wiki/page/AssuredMode> and section 7       described some of the replication changes required to support this. Assured Replication is not finished,       but the main replication protocol changes to support it are done. As explained by Gilles on an email on       the Dev mailing list (http://markmail.org/message/46rgo3meq3vriy4a), with these changes the newer versions       of OpenDS may not be able to replicate with OpenDS 1.0 instances.     - Support for Service Tags on the platforms where the functionality is available and enabled. Specifications       are published at <https://www.opends.org/wiki/page/OpenDSServiceTagEnabled>. For more information on       Service Tags see <http://wikis.sun.com/display/ServiceTag/Sun+Service+Tag+FAQ>.     - The Admin Connector service. In order to provide agentry of the OpenDS server at any time, a new service       has been added, dedicated to the administration, configuration and monitoring of the server.       An overview of the Admin Connector service and it's use is available on the       OpenDS wiki <https://www.opends.org/wiki/page/ManagingAdministrationTrafficToTheServer>     - Updates to the various command line tools to support the Admin Connector service.     - Some internal re-architecting of the server to put the foundation of future developments such as virtual       directory services. The new NetworkGroups and WorkFlow internal services which have been specified in       <https://www.opends.org/wiki/page/BasicOperationRoutingThroughNetworkGroup> are now implemented.     - Many bug fixes...

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/DomainFakeCfg.java |   84 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 84 insertions(+), 0 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/DomainFakeCfg.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/DomainFakeCfg.java
index 54e5baa..07fd87f 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/DomainFakeCfg.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/DomainFakeCfg.java
@@ -28,9 +28,11 @@
 
 import java.util.SortedSet;
 
+import java.util.TreeSet;
 import org.opends.server.admin.Configuration;
 import org.opends.server.admin.server.ConfigurationChangeListener;
 import org.opends.server.admin.server.ServerManagedObject;
+import org.opends.server.admin.std.meta.ReplicationDomainCfgDefn.AssuredType;
 import org.opends.server.admin.std.meta.ReplicationDomainCfgDefn.IsolationPolicy;
 import org.opends.server.admin.std.server.ReplicationDomainCfg;
 import org.opends.server.types.DN;
@@ -47,9 +49,23 @@
   private SortedSet<String> replicationServers;
   private long heartbeatInterval = 1000;
   private IsolationPolicy policy = IsolationPolicy.REJECT_ALL_UPDATES;
+  
+  // Is assured mode enabled or not ?
+  private boolean assured = false;
+  // Assured sub mode (used when assured is true)
+  private AssuredType assuredType = AssuredType.NOT_ASSURED;
+  // Safe Data level (used when assuredType is safe data)
+  private int assuredSdLevel = 1;
+  // Timeout (in milliseconds) when waiting for acknowledgments
+  private long assuredTimeout = 1000;
+  // Group id
+  private int groupId = 1;
+  // Referrals urls to be published to other servers of the topology
+  SortedSet<String> refUrls = new TreeSet<String>();
 
   /**
    * Creates a new Domain with the provided information
+   * (assured mode disabled, default group id)
    */
   public DomainFakeCfg(DN baseDn, int serverId, SortedSet<String> replServers)
   {
@@ -57,6 +73,44 @@
     this.serverId = serverId;
     this.replicationServers = replServers;
   }
+  
+  /**
+   * Creates a new Domain with the provided information
+   * (assured mode disabled, group id provided)
+   */
+  public DomainFakeCfg(DN baseDn, int serverId, SortedSet<String> replServers,
+    int groupId)
+  {
+    this(baseDn, serverId, replServers);
+    this.groupId = groupId;
+  }
+  
+  /**
+   * Creates a new Domain with the provided information
+   * (assured mode info provided as well as group id)
+   */
+  public DomainFakeCfg(DN baseDn, int serverId, SortedSet<String> replServers,
+    AssuredType assuredType, int assuredSdLevel, int groupId,
+    long assuredTimeout, SortedSet<String> refUrls)
+  {
+    this(baseDn, serverId, replServers);
+    switch(assuredType)
+    {
+      case NOT_ASSURED:
+        assured = false;
+        break;
+      case SAFE_DATA:
+      case SAFE_READ:
+        assured = true;
+        this.assuredType = assuredType;
+        break;
+    }
+    this.assuredSdLevel = assuredSdLevel;
+    this.groupId = groupId;
+    this.assuredTimeout = assuredTimeout;
+    if (refUrls != null)
+      this.refUrls = refUrls;
+  }
 
   /**
    * {@inheritDoc}
@@ -203,4 +257,34 @@
   {
     this.policy = policy;
   }
+
+  public int getAssuredSdLevel()
+  {
+    return assuredSdLevel;
+  }
+
+  public int getGroupId()
+  {
+    return groupId;
+  }
+
+  public long getAssuredTimeout()
+  {
+    return assuredTimeout;
+  }
+
+  public AssuredType getAssuredType()
+  {
+    return assuredType;
+  }
+  
+  public boolean isAssured()
+  {
+    return assured;
+  }
+
+  public SortedSet<String> getReferralsUrl()
+  {
+    return refUrls;
+  }
 }

--
Gitblit v1.10.0