From e33ecc4dd66d4c514cd7ad52d348a0be63a7f1eb Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 08 Jan 2014 14:30:15 +0000
Subject: [PATCH] Increased encapsulation of ReplicationDomain.IEContext + moved more behaviour to it. Reduced members' visibilities in LDAPReplicationDomain + removed several methods.
---
opends/src/server/org/opends/server/replication/service/ReplicationMonitor.java | 25 ++++++++++---------------
1 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/service/ReplicationMonitor.java b/opends/src/server/org/opends/server/replication/service/ReplicationMonitor.java
index ab272c0..589f539 100644
--- a/opends/src/server/org/opends/server/replication/service/ReplicationMonitor.java
+++ b/opends/src/server/org/opends/server/replication/service/ReplicationMonitor.java
@@ -22,7 +22,7 @@
*
*
* Copyright 2006-2010 Sun Microsystems, Inc.
- * Portions copyright 2013 ForgeRock AS.
+ * Portions copyright 2013-2014 ForgeRock AS.
*/
package org.opends.server.replication.service;
@@ -34,6 +34,7 @@
import org.opends.server.admin.std.server.MonitorProviderCfg;
import org.opends.server.api.MonitorProvider;
import org.opends.server.core.DirectoryServer;
+import org.opends.server.replication.service.ReplicationDomain.IEContext;
import org.opends.server.types.*;
/**
@@ -130,21 +131,15 @@
String.valueOf(domain.getGenerationID())));
// Add import/export monitoring attributes
- if (domain.importInProgress())
+ final IEContext ieContext = domain.getImportExportContext();
+ if (ieContext != null)
{
- addMonitorData(attributes, "total-update", "import");
- addMonitorData(
- attributes, "total-update-entry-count", domain.getTotalEntryCount());
- addMonitorData(
- attributes, "total-update-entry-left", domain.getLeftEntryCount());
- }
- if (domain.exportInProgress())
- {
- addMonitorData(attributes, "total-update", "export");
- addMonitorData(
- attributes, "total-update-entry-count", domain.getTotalEntryCount());
- addMonitorData(
- attributes, "total-update-entry-left", domain.getLeftEntryCount());
+ addMonitorData(attributes, "total-update",
+ ieContext.importInProgress() ? "import" : "export");
+ addMonitorData(attributes, "total-update-entry-count",
+ ieContext.getTotalEntryCount());
+ addMonitorData(attributes, "total-update-entry-left",
+ ieContext.getLeftEntryCount());
}
--
Gitblit v1.10.0