From d04fb0f282e0fd9a4bc80d3f9d5ee15506a3b83b Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Mon, 08 Dec 2008 08:03:33 +0000
Subject: [PATCH] Merge the replication-service branch with the OpenDS trunk
---
opends/src/server/org/opends/server/replication/common/ServerStatus.java | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/common/ServerStatus.java b/opends/src/server/org/opends/server/replication/common/ServerStatus.java
index d46ab82..563c4b9 100644
--- a/opends/src/server/org/opends/server/replication/common/ServerStatus.java
+++ b/opends/src/server/org/opends/server/replication/common/ServerStatus.java
@@ -131,4 +131,31 @@
{
return value;
}
+
+ /**
+ * Get a user readable string representing this status (User friendly string
+ * for monitoring purpose).
+ * @return A user readable string representing this status.
+ */
+ public String toString()
+ {
+ switch (value)
+ {
+ case -1:
+ return "Invalid";
+ case 0:
+ return "Not connected";
+ case 1:
+ return "Normal";
+ case 2:
+ return "Degraded";
+ case 3:
+ return "Full update";
+ case 4:
+ return "Bad generation id";
+ default:
+ throw new IllegalArgumentException("Wrong status numeric value: " +
+ value);
+ }
+ }
}
--
Gitblit v1.10.0