From 4594bba26216d84018569a042f6517d966bf106f Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Mon, 10 Aug 2009 08:29:48 +0000
Subject: [PATCH] Fix for 4169 : Ability to disable generation of historical information and 4170 : Replication should not generate HistoricalCsnOrdering index for replayed operation

---
 opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java b/opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java
index 68031e7..5f78d8c 100644
--- a/opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java
+++ b/opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java
@@ -836,4 +836,20 @@
     return privateDNs;
   }
 
+  /**
+   * Checks if a given serverID is used by a local Replication Domain.
+   *
+   * @param serverId   The serverID that should be checked.
+   * @return           true if the serverID is local, false otherwise.
+   */
+  public static boolean isLocalServerId(Short serverId)
+  {
+    for (LDAPReplicationDomain domain : domains.values())
+    {
+      if (domain.getServerId() == serverId)
+        return true;
+    }
+    return false;
+  }
+
 }

--
Gitblit v1.10.0