From faeb1a70138ab10bdd2007d319258692e7d84818 Mon Sep 17 00:00:00 2001 From: Neil Wilson Date: Thu, 25 Jan 2024 18:40:09 -0600 Subject: [PATCH] Update the replica monitor entry Updated support for the replica monitor entry in the Ping Identity Directory Server to include support for a number of additional attributes. --- docs/release-notes.html | 6 + messages/unboundid-ldapsdk-monitor.properties | 169 ++ .../monitors/ReplicaMonitorEntry.java | 1901 ++++++++++++++++- .../monitors/ReplicaMonitorEntryTestCase.java | 468 +++- 4 files changed, 2445 insertions(+), 99 deletions(-) diff --git a/docs/release-notes.html b/docs/release-notes.html index 635efd01d..0b2e389d7 100644 --- a/docs/release-notes.html +++ b/docs/release-notes.html @@ -117,6 +117,12 @@

Version 7.0.0



+
  • + Updated support for the replica monitor entry in the Ping Identity Directory + Server to include support for a number of additional attributes. +

    +
  • +
  • Updated the CryptoHelper class to add convenience methods for generating cryptographic message digests from byte arrays, strings, and files. Specific diff --git a/messages/unboundid-ldapsdk-monitor.properties b/messages/unboundid-ldapsdk-monitor.properties index 025790f24..e7d51a856 100644 --- a/messages/unboundid-ldapsdk-monitor.properties +++ b/messages/unboundid-ldapsdk-monitor.properties @@ -926,12 +926,21 @@ INFO_REPLICA_DESC_USE_SSL=Indicates whether the replica should use SSL to \ INFO_REPLICA_DISPNAME_LOST_CONNECTIONS=Lost Connections INFO_REPLICA_DESC_LOST_CONNECTIONS=The number of times a connection to a \ replication server has been lost. +INFO_REPLICA_DISPNAME_TOTAL_UPDATE_COUNT=Total Update Count +INFO_REPLICA_DESC_TOTAL_UPDATE_COUNT=The total number of replicated \ + operations processed since the server started. INFO_REPLICA_DISPNAME_RECEIVED_UPDATES=Received Updates INFO_REPLICA_DESC_RECEIVED_UPDATES=The total number of updates received from \ the replication server. INFO_REPLICA_DISPNAME_SENT_UPDATES=Sent Updates INFO_REPLICA_DESC_SENT_UPDATES=The total number of updates sent to the \ replication server. +INFO_REPLICA_DISPNAME_RECEIVED_ACKS=Received Acknowledgments +INFO_REPLICA_DESC_RECEIVED_ACKS=The number of acknowledgments that this \ + replica has received from other servers. +INFO_REPLICA_DISPNAME_SENT_ACKS=Sent Acknowledgments +INFO_REPLICA_DESC_SENT_ACKS=The number of acknowledgments that this replica \ + has sent to other servers. INFO_REPLICA_DISPNAME_PENDING_UPDATES=Pending Updates INFO_REPLICA_DESC_PENDING_UPDATES=The number of updates in progress in the \ Directory Server that have not yet been sent to the replication server. @@ -941,6 +950,9 @@ INFO_REPLICA_DESC_TOTAL_REPLAYED=The total number of updates from the \ INFO_REPLICA_DISPNAME_SUCCESSFUL_REPLAYED=Updates Successfully Replayed INFO_REPLICA_DESC_SUCCESSFUL_REPLAYED=The number of updates for this replica \ that have been successfully replayed with no conflicts. +INFO_REPLICA_DISPNAME_FAILED_REPLAYED=Updates Not Successfully Replayed +INFO_REPLICA_DESC_FAILED_REPLAYED=The number of failures that have occurred \ + while attempting to replay changes. INFO_REPLICA_DISPNAME_RESOLVED_MODIFY_CONFLICTS=Updates Replayed after \ Resolving Modify Conflicts INFO_REPLICA_DESC_RESOLVED_MODIFY_CONFLICTS=The number of updates for this \ @@ -955,6 +967,9 @@ INFO_REPLICA_DISPNAME_UNRESOLVED_NAMING_CONFLICTS=Unresolved Naming Conflicts INFO_REPLICA_DESC_UNRESOLVED_NAMING_CONFLICTS=The number of updates for this \ replica that could not be replayed due to a naming conflict that could not \ be automatically resolved. +INFO_REPLICA_DISPNAME_CONFLICT_ENTRY_COUNT=Conflict Entry Count +INFO_REPLICA_DESC_CONFLICT_ENTRY_COUNT=The number of conflict entries that \ + currently exist in the associated backend. INFO_REPLICA_DISPNAME_CURRENT_RECEIVE_WINDOW_SIZE=Current Receive Window Size INFO_REPLICA_DESC_CURRENT_RECEIVE_WINDOW_SIZE=The current receive window size \ for this replica. @@ -967,6 +982,160 @@ INFO_REPLICA_DESC_MAX_RECEIVE_WINDOW_SIZE=The maximum receive window size for \ INFO_REPLICA_DISPNAME_MAX_SEND_WINDOW_SIZE=Maximum Send Window Size INFO_REPLICA_DESC_MAX_SEND_WINDOW_SIZE=The maximum send window size for this \ replica. +INFO_REPLICA_DISPNAME_REPLICATION_BACKLOG=Replication Backlog +INFO_REPLICA_DESC_REPLICATION_BACKLOG=The number of changes that have been \ + applied in one or more other servers but have not yet been applied in the \ + local server. +INFO_REPLICA_DISPNAME_OLDEST_BACKLOG_CHANGE_TIME=Oldest Backlog Change Time +INFO_REPLICA_DESC_OLDEST_BACKLOG_CHANGE_TIME=The completion time for the \ + oldest change that has been applied in one or more other replicas but has \ + not yet been applied in the local server. +INFO_REPLICA_DISPNAME_PENDING_CHANGES_UNCOMMITTED_SIZE=Pending Changes \ + Current Uncommitted Size +INFO_REPLICA_DESC_PENDING_CHANGES_UNCOMMITTED_SIZE=The number of changes in \ + the pending changes queue that have not yet been committed to the local \ + database. +INFO_REPLICA_DISPNAME_AGE_OF_OLDEST_PENDING_UPDATE=Age of the Oldest Pending \ + Update (ms) +INFO_REPLICA_DESC_AGE_OF_OLDEST_PENDING_UPDATE=The age, in milliseconds, of \ + the oldest operation in the pending changes queue. +INFO_REPLICA_DISPNAME_PENDING_CHANGES_MAX_CAPACITY=Pending Changes Queue \ + Maximum Capacity +INFO_REPLICA_DESC_PENDING_CHANGES_MAX_CAPACITY=The maximum number of \ + operations that may be held in the pending changes queue. +INFO_REPLICA_DISPNAME_PENDING_CHANGES_LARGEST_SIZE=Pending Changes Queue \ + Largest Size Reached +INFO_REPLICA_DESC_PENDING_CHANGES_LARGEST_SIZE=The largest number of \ + operations that have been in the pending changes queue at any time. +INFO_REPLICA_DISPNAME_PENDING_CHANGES_ADD_TO_FULL=Pending Changes Number of \ + Times Added to a Full Queue +INFO_REPLICA_DESC_PENDING_CHANGES_ADD_TO_FULL=The number of times that the \ + server attempted to add a change to the pending changes queue when it was \ + already full. +INFO_REPLICA_DISPNAME_PENDING_CHANGES_STALL_LOGGED=Pending Changes Number of \ + Stalled Operations Logged +INFO_REPLICA_DESC_PENDING_CHANGES_STALL_LOGGED=The number of times that the \ + server has logged that an operation in the pending changes queue has stalled. +INFO_REPLICA_DISPNAME_LAST_UPDATE_LATENCY=Last Update Latency (ms) +INFO_REPLICA_DESC_LAST_UPDATE_LATENCY=The latency, in milliseconds, of the \ + last update that was successfully replayed. +INFO_REPLICA_DISPNAME_RECENT_AVERAGE_LATENCY=Recent Average Latency (ms) +INFO_REPLICA_DESC_RECENT_AVERAGE_LATENCY=The average replication latency, in \ + milliseconds, for operations processed over a recent interval. +INFO_REPLICA_DISPNAME_RECENT_MAX_LATENCY=Recent Maximum Latency (ms) +INFO_REPLICA_DESC_RECENT_MAX_LATENCY=The maximum replication latency, in \ + milliseconds, for any operation processed over a recent interval. +INFO_REPLICA_DISPNAME_RECENT_MIN_LATENCY=Recent Minimum Latency (ms) +INFO_REPLICA_DESC_RECENT_MIN_LATENCY=The minimum replication latency, in \ + milliseconds, for any operation processed over a recent interval. +INFO_REPLICA_DISPNAME_RECENT_NEGATIVE_LATENCY=Recent Negative Latency Update \ + Count +INFO_REPLICA_DESC_RECENT_NEGATIVE_LATENCY=The number of negative replication \ + latencies (which indicates clock inconsistencies between replicas) \ + encountered over a recent interval. +INFO_REPLICA_DISPNAME_RECENT_SUM_LATENCY=Sum of Recent Replication Latencies \ + (ms) +INFO_REPLICA_DESC_RECENT_SUM_LATENCY=The sum of the replication latencies, in \ + milliseconds, for operations processed over a recent interval. +INFO_REPLICA_DISPNAME_RECENT_UPDATE_COUNT=Recent Update Count +INFO_REPLICA_DESC_RECENT_UPDATE_COUNT=The number of operations processed over \ + a recent interval. +INFO_REPLICA_DISPNAME_TOTAL_AVERAGE_LATENCY=Overall Average Latency (ms) +INFO_REPLICA_DESC_TOTAL_AVERAGE_LATENCY=The average replication latency, in \ + milliseconds, for operations processed since the server was started. +INFO_REPLICA_DISPNAME_TOTAL_MAX_LATENCY=Overall Maximum Latency (ms) +INFO_REPLICA_DESC_TOTAL_MAX_LATENCY=The maximum replication latency, in \ + milliseconds, for any operation processed since the server was started. +INFO_REPLICA_DISPNAME_TOTAL_MIN_LATENCY=Overall Minimum Latency (ms) +INFO_REPLICA_DESC_TOTAL_MIN_LATENCY=The minimum replication latency, in \ + milliseconds, for any operation processed since the server was started. +INFO_REPLICA_DISPNAME_TOTAL_NEGATIVE_LATENCY=Overall Negative Latency Update \ + Count +INFO_REPLICA_DESC_TOTAL_NEGATIVE_LATENCY=The number of negative replication \ + latencies (which indicates clock inconsistencies between replicas) \ + encountered since the server was started. +INFO_REPLICA_DISPNAME_TOTAL_SUM_LATENCY=Sum of All Replication Latencies (ms) +INFO_REPLICA_DESC_TOTAL_SUM_LATENCY=The sum of the replication latencies, in \ + milliseconds, for operations processed since the server was started. +INFO_REPLICA_DISPNAME_REPL_ASSURANCE_SUBMITTED_OPS=Assured Replication \ + Operations Submitted +INFO_REPLICA_DESC_REPL_ASSURANCE_SUBMITTED_OPS=The number of changes that \ + have begun processing for which assured replication was enabled. +INFO_REPLICA_DISPNAME_REPL_ASSURANCE_COMPLETED_NORMALLY=Assured Replication \ + Operations Completed Normally +INFO_REPLICA_DESC_REPL_ASSURANCE_COMPLETED_NORMALLY=The number of changes \ + for which assured replication was enabled that successfully satisfied the \ + assurance constraints. +INFO_REPLICA_DISPNAME_REPL_ASSURANCE_COMPLETED_ABNORMALLY=Assured Replication \ + Operations Completed Abnormally +INFO_REPLICA_DESC_REPL_ASSURANCE_COMPLETED_ABNORMALLY=The number of changes \ + for which assured replication was enabled that were unable to satisfy the \ + assurance constraints. +INFO_REPLICA_DISPNAME_REPL_ASSURANCE_COMPLETED_WITH_TIMEOUT=Assured \ + Replication Timeouts Encountered +INFO_REPLICA_DESC_REPL_ASSURANCE_COMPLETED_WITH_TIMEOUT=The number of changes \ + for which assured replication was enabled that encountered a timeout before \ + the assurance constraints could be satisfied. +INFO_REPLICA_DISPNAME_REPL_ASSURANCE_COMPLETED_WITH_SHUTDOWN=Assured \ + Replication Operations Interrupted by Shutdown +INFO_REPLICA_DESC_REPL_ASSURANCE_COMPLETED_WITH_SHUTDOWN=The number of \ + changes for which assured replication was enabled that were interrupted by \ + a server shutdown before the assurance constraints could be satisfied. +INFO_REPLICA_DISPNAME_RETRY_OP_SUCCESS_COUNT=Retried Operation Success Count +INFO_REPLICA_DESC_RETRY_OP_SUCCESS_COUNT=The number of operations of any type \ + that could not be successfully replayed on their initial attempt, but that \ + were requeued and successfully replayed on a subsequent attempt. +INFO_REPLICA_DISPNAME_RETRY_OP_FAILED_COUNT=Retried Operation Failure Count +INFO_REPLICA_DESC_RETRY_OP_FAILED_COUNT=The number of operations of any type \ + that could not be successfully replayed on their initial attempt, and that \ + also failed on a subsequent attempt after being requeued. +INFO_REPLICA_DISPNAME_RETRY_ADD_SUCCESS_COUNT=Retried Add Success Count +INFO_REPLICA_DESC_RETRY_ADD_SUCCESS_COUNT=The number of add operations that \ + could not be successfully replayed on their initial attempt, but that were \ + requeued and successfully replayed on a subsequent attempt. +INFO_REPLICA_DISPNAME_RETRY_ADD_FAILED_COUNT=Retried Add Failure Count +INFO_REPLICA_DESC_RETRY_ADD_FAILED_COUNT=The number of add operations that \ + could not be successfully replayed on their initial attempt, and that also \ + failed on a subsequent attempt after being requeued. +INFO_REPLICA_DISPNAME_RETRY_DELETE_SUCCESS_COUNT=Retried Delete Success Count +INFO_REPLICA_DESC_RETRY_DELETE_SUCCESS_COUNT=The number of delete operations \ + that could not be successfully replayed on their initial attempt, but that \ + were requeued and successfully replayed on a subsequent attempt. +INFO_REPLICA_DISPNAME_RETRY_DELETE_FAILED_COUNT=Retried Delete Failure Count +INFO_REPLICA_DESC_RETRY_DELETE_FAILED_COUNT=The number of delete operations \ + that could not be successfully replayed on their initial attempt, and that \ + also failed on a subsequent attempt after being requeued. +INFO_REPLICA_DISPNAME_RETRY_MODIFY_SUCCESS_COUNT=Retried Modify Success Count +INFO_REPLICA_DESC_RETRY_MODIFY_SUCCESS_COUNT=The number of modify operations \ + that could not be successfully replayed on their initial attempt, but that \ + were requeued and successfully replayed on a subsequent attempt. +INFO_REPLICA_DISPNAME_RETRY_MODIFY_FAILED_COUNT=Retried Modify Failure Count +INFO_REPLICA_DESC_RETRY_MODIFY_FAILED_COUNT=The number of modify operations \ + that could not be successfully replayed on their initial attempt, and that \ + also failed on a subsequent attempt after being requeued. +INFO_REPLICA_DISPNAME_RETRY_MODIFY_DN_SUCCESS_COUNT=Retried Modify DN Success \ + Count +INFO_REPLICA_DESC_RETRY_MODIFY_DN_SUCCESS_COUNT=The number of modify DM \ + operations that could not be successfully replayed on their initial \ + attempt, but that were requeued and successfully replayed on a subsequent \ + attempt. +INFO_REPLICA_DISPNAME_RETRY_MODIFY_DN_FAILED_COUNT=Retried Modify DN Failure \ + Count +INFO_REPLICA_DESC_RETRY_MODIFY_DN_FAILED_COUNT=The number of modify DN \ + operations that could not be successfully replayed on their initial \ + attempt, and that also failed on a subsequent attempt after being requeued. +INFO_REPLICA_DISPNAME_RETRY_AVERAGE_DURATION=Retry Operation Average Duration \ + (ms) +INFO_REPLICA_DESC_RETRY_AVERAGE_DURATION=The average length of time, im \ + milliseconds, required to successfully replay operations on a retry \ + attempt after an initial failure. +INFO_REPLICA_DISPNAME_RETRY_MAX_DURATION=Retry Operation Maximum Duration (ms) +INFO_REPLICA_DESC_RETRY_MAX_DURATION=The maximum length of time, im \ + milliseconds, required to successfully replay operations on a retry \ + attempt after an initial failure. +INFO_REPLICA_DISPNAME_RETRY_TOTAL_DURATION=Total Retry Operation Duration (ms) +INFO_REPLICA_DESC_RETRY_TOTAL_DURATION=The total length of time, in \ + milliseconds, required to process all successful retry attempts. INFO_LDAP_EXT_SERVER_MONITOR_DISPNAME=LDAP External Server INFO_LDAP_EXT_SERVER_MONITOR_DESC=Information about an LDAP external \ server used by a load-balancing algorithm. diff --git a/src/com/unboundid/ldap/sdk/unboundidds/monitors/ReplicaMonitorEntry.java b/src/com/unboundid/ldap/sdk/unboundidds/monitors/ReplicaMonitorEntry.java index 27027b2ab..8969a9c3d 100644 --- a/src/com/unboundid/ldap/sdk/unboundidds/monitors/ReplicaMonitorEntry.java +++ b/src/com/unboundid/ldap/sdk/unboundidds/monitors/ReplicaMonitorEntry.java @@ -38,6 +38,7 @@ import java.util.Collections; +import java.util.Date; import java.util.LinkedHashMap; import java.util.Map; @@ -90,6 +91,16 @@ public final class ReplicaMonitorEntry + /** + * The name of the attribute that holds the age, in milliseconds, of the + * oldest operation in the pending changes queue. + */ + @NotNull private static final String + ATTR_AGE_OF_OLDEST_PENDING_UPDATE_MILLIS = + "age-of-oldest-pending-update"; + + + /** * The name of the attribute that contains the base DNs for the replicated * data. @@ -98,6 +109,15 @@ public final class ReplicaMonitorEntry + /** + * The name of the attribute that contains the number of conflict entries + * that currently exist in the associated backend. + */ + @NotNull private static final String ATTR_CONFLICT_ENTRY_COUNT = + "conflict-entry-count"; + + + /** * The name of the attribute that contains the address and port of the * replication server to which the replica is connected. @@ -125,6 +145,15 @@ public final class ReplicaMonitorEntry + /** + * The name of the attribute that contains the number of failures that + * occurred while attempting to replay changes. + */ + @NotNull private static final String ATTR_FAILED_REPLAYED = + "replayed-updates-failed"; + + + /** * The name of the attribute that provides the generation ID for the replica. */ @@ -132,6 +161,15 @@ public final class ReplicaMonitorEntry + /** + * The name of the attribute that holds the latency, in milliseconds, of the + * last update that was successfully replayed. + */ + @NotNull private static final String ATTR_LAST_UPDATE_LATENCY_MILLIS = + "last-update-latency-millis"; + + + /** * The name of the attribute that provides information about the number of * times the connection to the replication server has been lost. @@ -160,23 +198,147 @@ public final class ReplicaMonitorEntry /** - * The name of the attribute that provides information about the number of - * pending updates which are currently being processed by the Directory Server - * and have not yet been sent to the replication server. + * The name of the attribute that holds a generalized time representation of + * the time that the oldest change was applied in another server but has not + * yet replicated to the local server. + */ + @NotNull private static final String ATTR_OLDEST_BACKLOG_CHANGE_TIME = + "age-of-oldest-backlog-change"; + + + + /** + * The name of the attribute that contains the number of changes in the + * pending change queue that have not yet been committed to the database. + */ + @NotNull private static final String + ATTR_PENDING_CHANGES_CURRENT_UNCOMMITTED_SIZE = + "pending-changes-current-uncommitted-size"; + + + + /** + * The name of the attribute that contains the maximum number of changes that + * have been in the pending changes queue at any time. + */ + @NotNull private static final String + ATTR_PENDING_CHANGES_LARGEST_SIZE_REACHED = + "pending-changes-largest-size-reached"; + + + + /** + * The name of the attribute that contains the maximum allowed size of the + * pending changes queue. + */ + @NotNull private static final String ATTR_PENDING_CHANGES_MAX_CAPACITY = + "pending-changes-max-capacity"; + + + + /** + * The name of the attribute that contains the number of times that the server + * has attempted to add a change to the pending changes queue when it was + * already full. + */ + @NotNull private static final String + ATTR_PENDING_CHANGES_NUM_TIMES_ADDED_TO_FULL_QUEUE = + "pending-changes-num-times-added-to-full-queue"; + + + + /** + * The name of the attribute that contains the number of times that the server + * has logged that an operation in the pending changes queue has stalled. + */ + @NotNull private static final String + ATTR_PENDING_CHANGES_NUM_TIMES_STALL_LOGGED = + "pending-changes-num-times-stall-logged"; + + + + /** + * The name of the attribute that contains the number of pending updates which + * are currently being processed by the Directory Server and have not yet been + * sent to the replication server. */ @NotNull private static final String ATTR_PENDING_UPDATES = "pending-updates"; /** - * The name of the attribute that provides information about the number of - * updates received from the replication server for this replica. + * The name of the attribute that contains the number of acknowledgements + * received from the replication server for this replica. + */ + @NotNull private static final String ATTR_RECEIVED_ACKS = "received-acks"; + + + + /** + * The name of the attribute that contains the number of updates received from + * the replication server for this replica. */ @NotNull private static final String ATTR_RECEIVED_UPDATES = "received-updates"; + /** + * The name of the attribute that contains the average replication latency, in + * milliseconds, for operations processed over a recent interval. + */ + @NotNull private static final String ATTR_RECENT_AVERAGE_LATENCY_MILLIS = + "recent-average-latency-millis"; + + + + /** + * The name of the attribute that contains the maximum replication latency, in + * milliseconds, for any operation processed over a recent interval. + */ + @NotNull private static final String ATTR_RECENT_MAXIMUM_LATENCY_MILLIS = + "recent-maximum-latency-millis"; + + + + /** + * The name of the attribute that contains the minimum replication latency, in + * milliseconds, for any operation processed over a recent interval. + */ + @NotNull private static final String ATTR_RECENT_MINIMUM_LATENCY_MILLIS = + "recent-minimum-latency-millis"; + + + + /** + * The name of the attribute that contains the number of negative replication + * latencies encountered over a recent interval. + */ + @NotNull private static final String + ATTR_RECENT_NEGATIVE_LATENCY_UPDATE_COUNT = + "recent-negative-latency-update-count"; + + + + /** + * The name of the attribute that contains the sum of the replication + * latencies, in milliseconds, for operations processed over a recent + * interval. + */ + @NotNull private static final String ATTR_RECENT_SUM_LATENCY_MILLIS = + "recent-sum-latency-millis"; + + + + /** + * The name of the attribute that contains the number of operations processed + * over a recent interval. + */ + @NotNull private static final String ATTR_RECENT_UPDATE_COUNT = + "recent-update-count"; + + + /** * The name of the attribute that provides the replica ID for this replica. */ @@ -184,6 +346,195 @@ public final class ReplicaMonitorEntry + /** + * The name of the attribute that contains the number of changes that were + * processed with replication assurance but for which assurance could not be + * guaranteed for some reason. + */ + @NotNull private static final String + ATTR_REPLICATION_ASSURANCE_COMPLETED_ABNORMALLY = + "replication-assurance-completed-abnormally"; + + + + /** + * The name of the attribute that contains the number of changes that were + * processed with replication assurance and completed successfully within the + * assurance constraints. + */ + @NotNull private static final String + ATTR_REPLICATION_ASSURANCE_COMPLETED_NORMALLY = + "replication-assurance-completed-normally"; + + + + /** + * The name of the attribute that contains the number of changes that were + * processed with replication assurance, but one of the target servers was + * shut down before assurance could be guaranteed. + */ + @NotNull private static final String + ATTR_REPLICATION_ASSURANCE_COMPLETED_WITH_SHUTDOWN = + "replication-assurance-completed-with-shutdown"; + + + + /** + * The name of the attribute that contains the number of changes that were + * processed with replication assurance, but a timeout was encountered before + * assurance could be guaranteed. + */ + @NotNull private static final String + ATTR_REPLICATION_ASSURANCE_COMPLETED_WITH_TIMEOUT = + "replication-assurance-completed-with-timeout"; + + + + /** + * The name of the attribute that contains the number of changes that have + * begun processing with replication assurance enabled. + */ + @NotNull private static final String + ATTR_REPLICATION_ASSURANCE_SUBMITTED_OPERATIONS = + "replication-assurance-submitted-operations"; + + + + /** + * The name of the attribute that contains the number of changes that have + * been applied in other servers but have not yet been replicated to the + * local server. + */ + @NotNull private static final String ATTR_REPLICATION_BACKLOG = + "replication-backlog"; + + + + /** + * The name of the attribute that contains number of requeued add operations + * that failed on a retry attempt. + */ + @NotNull private static final String ATTR_REQUEUE_RETRY_ADD_FAILED_COUNT = + "requeue-retry-add-failed-count"; + + + + /** + * The name of the attribute that contains number of requeued add operations + * that succeeded on a retry attempt. + */ + @NotNull private static final String ATTR_REQUEUE_RETRY_ADD_SUCCESS_COUNT = + "requeue-retry-add-success-count"; + + + + /** + * The name of the attribute that contains number of requeued delete + * operations that failed on a retry attempt. + */ + @NotNull private static final String ATTR_REQUEUE_RETRY_DELETE_FAILED_COUNT = + "requeue-retry-delete-failed-count"; + + + + /** + * The name of the attribute that contains number of requeued delete + * operations that succeeded on a retry attempt. + */ + @NotNull private static final String ATTR_REQUEUE_RETRY_DELETE_SUCCESS_COUNT = + "requeue-retry-delete-success-count"; + + + + /** + * The name of the attribute that contains number of requeued modify DN + * operations that failed on a retry attempt. + */ + @NotNull private static final String + ATTR_REQUEUE_RETRY_MODIFY_DN_FAILED_COUNT = + "requeue-retry-modify-dn-failed-count"; + + + + /** + * The name of the attribute that contains number of requeued modify DN + * operations that succeeded on a retry attempt. + */ + @NotNull private static final String + ATTR_REQUEUE_RETRY_MODIFY_DN_SUCCESS_COUNT = + "requeue-retry-modify-dn-success-count"; + + + + /** + * The name of the attribute that contains number of requeued modify + * operations that failed on a retry attempt. + */ + @NotNull private static final String ATTR_REQUEUE_RETRY_MODIFY_FAILED_COUNT = + "requeue-retry-modify-failed-count"; + + + + /** + * The name of the attribute that contains number of requeued modify + * operations that succeeded on a retry attempt. + */ + @NotNull private static final String ATTR_REQUEUE_RETRY_MODIFY_SUCCESS_COUNT = + "requeue-retry-modify-success-count"; + + + + /** + * The name of the attribute that contains number of requeued operations that + * failed on a retry attempt. + */ + @NotNull private static final String ATTR_REQUEUE_RETRY_OP_FAILED_COUNT = + "requeue-retry-op-failed-count"; + + + + /** + * The name of the attribute that contains number of requeued operations that + * succeeded on a retry attempt. + */ + @NotNull private static final String ATTR_REQUEUE_RETRY_OP_SUCCESS_COUNT = + "requeue-retry-op-success-count"; + + + + /** + * The name of the attribute that contains average length of time in + * milliseconds required to successfully retry operations that had been + * requeued. + */ + @NotNull private static final String + ATTR_REQUEUE_RETRY_OP_SUCCESS_AVERAGE_DURATION_MILLIS = + "requeue-retry-op-success-average-duration-millis"; + + + + /** + * The name of the attribute that contains maximum length of time in + * milliseconds required to successfully retry any operation that had been + * requeued. + */ + @NotNull private static final String + ATTR_REQUEUE_RETRY_OP_SUCCESS_MAXIMUM_DURATION_MILLIS = + "requeue-retry-op-success-maximum-duration-millis"; + + + + /** + * The name of the attribute that contains total length of time in + * milliseconds required to successfully retry operations that had been + * requeued. + */ + @NotNull private static final String + ATTR_REQUEUE_RETRY_OP_SUCCESS_TOTAL_DURATION_MILLIS = + "requeue-retry-op-success-total-millis"; + + + /** * The name of the attribute that provides information about the number of * updates that were replayed after resolving a modify conflict. @@ -202,6 +553,14 @@ public final class ReplicaMonitorEntry + /** + * The name of the attribute that contains the number of acknowledgements sent + * from the replication server from this replica. + */ + @NotNull private static final String ATTR_SENT_ACKS = "sent-acks"; + + + /** * The name of the attribute that provides information about the number of * updates sent to the replication server from this replica. @@ -227,6 +586,43 @@ public final class ReplicaMonitorEntry + /** + * The name of the attribute that contains the average replication latency, in + * milliseconds, for operations processed since the server started. + */ + @NotNull private static final String ATTR_TOTAL_AVERAGE_LATENCY_MILLIS = + "total-average-latency-millis"; + + + + /** + * The name of the attribute that contains the maximum replication latency, in + * milliseconds, for any operation since the server started. + */ + @NotNull private static final String ATTR_TOTAL_MAXIMUM_LATENCY_MILLIS = + "total-maximum-latency-millis"; + + + + /** + * The name of the attribute that contains the minimum replication latency, in + * milliseconds, for any operation since the server started. + */ + @NotNull private static final String ATTR_TOTAL_MINIMUM_LATENCY_MILLIS = + "total-minimum-latency-millis"; + + + + /** + * The name of the attribute that contains the number of negative replication + * latencies encountered since the server stared. + */ + @NotNull private static final String + ATTR_TOTAL_NEGATIVE_LATENCY_UPDATE_COUNT = + "total-negative-latency-update-count"; + + + /** * The name of the attribute that provides information about the total number * of updates that have been replayed in some form. @@ -235,6 +631,24 @@ public final class ReplicaMonitorEntry + /** + * The name of the attribute that contains the sum of replication latencies, + * in milliseconds, for operations processed since the server started. + */ + @NotNull private static final String ATTR_TOTAL_SUM_LATENCY_MILLIS = + "total-sum-latency-millis"; + + + + /** + * The name of the attribute that contains the total number of replicated + * operations processed since the server stared. + */ + @NotNull private static final String ATTR_TOTAL_UPDATE_COUNT = + "total-update-count"; + + + /** * The name of the attribute that provides information about the number of * updates that could not be replayed because of an unresolved naming @@ -248,7 +662,7 @@ public final class ReplicaMonitorEntry /** * The serial version UID for this serializable class. */ - private static final long serialVersionUID = -9164207693317460579L; + private static final long serialVersionUID = -2327746532075017532L; @@ -256,12 +670,35 @@ public final class ReplicaMonitorEntry // replication server. @Nullable private final Boolean useSSL; + // The time that the oldest backlog change was originally processed. + @Nullable private final Date oldestBacklogChangeTime; + + // The average duration, in milliseconds, required to process an operation on + // a successful retry attempt. + @Nullable private final Double requeueRetrySuccessAverageDurationMillis; + + // The maximum duration, in milliseconds, required to process an operation on + // a successful retry attempt. + @Nullable private final Double requeueRetrySuccessMaximumDurationMillis; + + // The age of the oldest pending update, in milliseconds. + @Nullable private final Long ageOfOldestPendingUpdateMillis; + + // The number of conflict entries currently in the associated backend. + @Nullable private final Long conflictEntryCount; + // The current receive window size. @Nullable private final Long currentReceiveWindowSize; // The current send window size. @Nullable private final Long currentSendWindowSize; + // The number of updates that could not be replayed successfully. + @Nullable private final Long failedReplayed; + + // The last update latency, in milliseconds. + @Nullable private final Long lastUpdateLatencyMillis; + // The number of lost connections. @Nullable private final Long lostConnections; @@ -271,30 +708,146 @@ public final class ReplicaMonitorEntry // The maximum send window size. @Nullable private final Long maxSendWindowSize; + // The number of pending changes that have not yet been committed. + @Nullable private final Long pendingChangesCurrentUncommittedSize; + + // The largest size of the pending changes queue. + @Nullable private final Long pendingChangesLargestSizeReached; + + // The maximum capacity of the pending changes queue. + @Nullable private final Long pendingChangesMaxCapacity; + + // The number of attempts to add to a full pending changes queue. + @Nullable private final Long pendingChangesNumTimesAddedToFullQueue; + + // The number of times the server logged that an operation in the pending + // changes queue has stalled. + @Nullable private final Long pendingChangesNumTimesStallLogged; + // The number of pending updates that haven't been sent to the replication // server. @Nullable private final Long pendingUpdates; + // The number of acknowledgements received from the replication server. + @Nullable private final Long receivedAcks; + // The number of updates received from the replication server. @Nullable private final Long receivedUpdates; + // The recent average replication latency, in milliseconds. + @Nullable private final Long recentAverageLatencyMillis; + + // The recent maximum replication latency, in milliseconds. + @Nullable private final Long recentMaximumLatencyMillis; + + // The recent minimum replication latency, in milliseconds. + @Nullable private final Long recentMinimumLatencyMillis; + + // The recent negative replication latency count. + @Nullable private final Long recentNegativeLatencyUpdateCount; + + // The sum of replication latencies for recent updates applied. + @Nullable private final Long recentSumLatencyMillis; + + // The number of replication updates applied over a recent interval. + @Nullable private final Long recentUpdateCount; + // The number of updates replayed after resolving a modify conflict. @Nullable private final Long replayedAfterModifyConflict; // The number of updates replayed after resolving a naming conflict. @Nullable private final Long replayedAfterNamingConflict; + // The number of changes for which requested replication assurance could not + // be guaranteed. + @Nullable private final Long replicationAssuranceCompletedAbnormally; + + // The number of changes for which requested replication assurance was + // achieved. + @Nullable private final Long replicationAssuranceCompletedNormally; + + // The number of changes for which requested replication assurance could not + // be guarnateed because it was interrupted by a server shutdown. + @Nullable private final Long replicationAssuranceCompletedWithShutdown; + + // The number of changes for which requested replication assurance could not + // be guarnateed because a timeout was encountered. + @Nullable private final Long replicationAssuranceCompletedWithTimeout; + + // The number of changes for which requested replication assurance has been + // requested. + @Nullable private final Long replicationAssuranceSubmittedOperations; + + // The number of changes that have been applied in other servers but have not + // yet been replicated to the local server. + @Nullable private final Long replicationBacklog; + // The port number of the replication server. @Nullable private final Long replicationServerPort; + // The number of add operations that failed after being retried. + @Nullable private final Long requeueRetryAddFailedCount; + + // The number of add operations that succeeded after being retried. + @Nullable private final Long requeueRetryAddSuccessCount; + + // The number of delete operations that failed after being retried. + @Nullable private final Long requeueRetryDeleteFailedCount; + + // The number of delete operations that succeeded after being retried. + @Nullable private final Long requeueRetryDeleteSuccessCount; + + // The number of modify DN operations that failed after being retried. + @Nullable private final Long requeueRetryModifyDNFailedCount; + + // The number of modify DN operations that succeeded after being retried. + @Nullable private final Long requeueRetryModifyDNSuccessCount; + + // The number of modify operations that failed after being retried. + @Nullable private final Long requeueRetryModifyFailedCount; + + // The number of modify operations that succeeded after being retried. + @Nullable private final Long requeueRetryModifySuccessCount; + + // The total number of operations that failed after being retried. + @Nullable private final Long requeueRetryOpFailedCount; + + // The total number of operations that succeeded after being retried. + @Nullable private final Long requeueRetryOpSuccessCount; + + // The total length of time in milliseconds required to successfully process + // retried operations. + @Nullable private final Long requeueRetrySuccessTotalDurationMillis; + + // The number of acknowledgements sent to the replication server. + @Nullable private final Long sentAcks; + // The number of updates sent to the replication server. @Nullable private final Long sentUpdates; // The number of updates replayed successfully. @Nullable private final Long successfullyReplayed; - // The total number of updates replayed. - @Nullable private final Long totalReplayed; + // The overall average latency for replicated operations. + @Nullable private final Long totalAverageLatencyMillis; + + // The maximum latency for any replicated operations. + @Nullable private final Long totalMaximumLatencyMillis; + + // The minimum latency for any replicated operations. + @Nullable private final Long totalMinimumLatencyMillis; + + // The total number of negative replication latencies encountered. + @Nullable private final Long totalNegativeLatencyUpdateCount; + + // The total number of updates replayed. + @Nullable private final Long totalReplayed; + + // The total duration of all replication latencies, in milliseconds. + @Nullable private final Long totalSumLatencyMillis; + + // The total number of updates applied via replication. + @Nullable private final Long totalUpdateCount; // The number of unresolved naming conflicts that could not be successfully // replayed. @@ -324,23 +877,87 @@ public ReplicaMonitorEntry(@NotNull final Entry entry) { super(entry); - useSSL = getBoolean(ATTR_SSL_ENCRYPTION); - lostConnections = getLong(ATTR_LOST_CONNECTIONS); - receivedUpdates = getLong(ATTR_RECEIVED_UPDATES); - sentUpdates = getLong(ATTR_SENT_UPDATES); - pendingUpdates = getLong(ATTR_PENDING_UPDATES); - totalReplayed = getLong(ATTR_TOTAL_REPLAYED); - successfullyReplayed = getLong(ATTR_SUCCESSFUL_REPLAYED); + useSSL = getBoolean(ATTR_SSL_ENCRYPTION); + oldestBacklogChangeTime = getDate(ATTR_OLDEST_BACKLOG_CHANGE_TIME); + requeueRetrySuccessAverageDurationMillis = + getDouble(ATTR_REQUEUE_RETRY_OP_SUCCESS_AVERAGE_DURATION_MILLIS); + requeueRetrySuccessMaximumDurationMillis = + getDouble(ATTR_REQUEUE_RETRY_OP_SUCCESS_MAXIMUM_DURATION_MILLIS); + ageOfOldestPendingUpdateMillis = + getLong(ATTR_AGE_OF_OLDEST_PENDING_UPDATE_MILLIS); + conflictEntryCount = getLong(ATTR_CONFLICT_ENTRY_COUNT); + currentReceiveWindowSize = getLong(ATTR_CURRENT_RECEIVE_WINDOW_SIZE); + currentSendWindowSize = getLong(ATTR_CURRENT_SEND_WINDOW_SIZE); + failedReplayed = getLong(ATTR_FAILED_REPLAYED); + lastUpdateLatencyMillis = getLong(ATTR_LAST_UPDATE_LATENCY_MILLIS); + lostConnections = getLong(ATTR_LOST_CONNECTIONS); + maxReceiveWindowSize = getLong(ATTR_MAX_RECEIVE_WINDOW_SIZE); + maxSendWindowSize = getLong(ATTR_MAX_SEND_WINDOW_SIZE); + pendingChangesCurrentUncommittedSize = + getLong(ATTR_PENDING_CHANGES_CURRENT_UNCOMMITTED_SIZE); + pendingChangesLargestSizeReached = + getLong(ATTR_PENDING_CHANGES_LARGEST_SIZE_REACHED); + pendingChangesMaxCapacity = getLong(ATTR_PENDING_CHANGES_MAX_CAPACITY); + pendingChangesNumTimesAddedToFullQueue = + getLong(ATTR_PENDING_CHANGES_NUM_TIMES_ADDED_TO_FULL_QUEUE); + pendingChangesNumTimesStallLogged = + getLong(ATTR_PENDING_CHANGES_NUM_TIMES_STALL_LOGGED); + pendingUpdates = getLong(ATTR_PENDING_UPDATES); + receivedAcks = getLong(ATTR_RECEIVED_ACKS); + receivedUpdates = getLong(ATTR_RECEIVED_UPDATES); + recentAverageLatencyMillis = getLong(ATTR_RECENT_AVERAGE_LATENCY_MILLIS); + recentMaximumLatencyMillis = getLong(ATTR_RECENT_MAXIMUM_LATENCY_MILLIS); + recentMinimumLatencyMillis = getLong(ATTR_RECENT_MINIMUM_LATENCY_MILLIS); + recentNegativeLatencyUpdateCount = + getLong(ATTR_RECENT_NEGATIVE_LATENCY_UPDATE_COUNT); + recentSumLatencyMillis = getLong(ATTR_RECENT_SUM_LATENCY_MILLIS); + recentUpdateCount = getLong(ATTR_RECENT_UPDATE_COUNT); replayedAfterModifyConflict = getLong(ATTR_RESOLVED_MODIFY_CONFLICTS); replayedAfterNamingConflict = getLong(ATTR_RESOLVED_NAMING_CONFLICTS); - unresolvedNamingConflicts = getLong(ATTR_UNRESOLVED_NAMING_CONFLICTS); - currentReceiveWindowSize = getLong(ATTR_CURRENT_RECEIVE_WINDOW_SIZE); - currentSendWindowSize = getLong(ATTR_CURRENT_SEND_WINDOW_SIZE); - maxReceiveWindowSize = getLong(ATTR_MAX_RECEIVE_WINDOW_SIZE); - maxSendWindowSize = getLong(ATTR_MAX_SEND_WINDOW_SIZE); - baseDN = getString(ATTR_BASE_DN); - generationID = getString(ATTR_GENERATION_ID); - replicaID = getString(ATTR_REPLICA_ID); + replicationAssuranceCompletedAbnormally = + getLong(ATTR_REPLICATION_ASSURANCE_COMPLETED_ABNORMALLY); + replicationAssuranceCompletedNormally = + getLong(ATTR_REPLICATION_ASSURANCE_COMPLETED_NORMALLY); + replicationAssuranceCompletedWithShutdown = + getLong(ATTR_REPLICATION_ASSURANCE_COMPLETED_WITH_SHUTDOWN); + replicationAssuranceCompletedWithTimeout = + getLong(ATTR_REPLICATION_ASSURANCE_COMPLETED_WITH_TIMEOUT); + replicationAssuranceSubmittedOperations = + getLong(ATTR_REPLICATION_ASSURANCE_SUBMITTED_OPERATIONS); + replicationBacklog = getLong(ATTR_REPLICATION_BACKLOG); + requeueRetryAddFailedCount = getLong(ATTR_REQUEUE_RETRY_ADD_FAILED_COUNT); + requeueRetryAddSuccessCount = getLong(ATTR_REQUEUE_RETRY_ADD_SUCCESS_COUNT); + requeueRetryDeleteFailedCount = + getLong(ATTR_REQUEUE_RETRY_DELETE_FAILED_COUNT); + requeueRetryDeleteSuccessCount = + getLong(ATTR_REQUEUE_RETRY_DELETE_SUCCESS_COUNT); + requeueRetryModifyFailedCount = + getLong(ATTR_REQUEUE_RETRY_MODIFY_FAILED_COUNT); + requeueRetryModifySuccessCount = + getLong(ATTR_REQUEUE_RETRY_MODIFY_SUCCESS_COUNT); + requeueRetryModifyDNFailedCount = + getLong(ATTR_REQUEUE_RETRY_MODIFY_DN_FAILED_COUNT); + requeueRetryModifyDNSuccessCount = + getLong(ATTR_REQUEUE_RETRY_MODIFY_DN_SUCCESS_COUNT); + requeueRetryOpFailedCount = getLong(ATTR_REQUEUE_RETRY_OP_FAILED_COUNT); + requeueRetryOpSuccessCount = getLong(ATTR_REQUEUE_RETRY_OP_SUCCESS_COUNT); + requeueRetrySuccessTotalDurationMillis = + getLong(ATTR_REQUEUE_RETRY_OP_SUCCESS_TOTAL_DURATION_MILLIS); + sentAcks = getLong(ATTR_SENT_ACKS); + sentUpdates = getLong(ATTR_SENT_UPDATES); + successfullyReplayed = getLong(ATTR_SUCCESSFUL_REPLAYED); + totalAverageLatencyMillis = getLong(ATTR_TOTAL_AVERAGE_LATENCY_MILLIS); + totalMaximumLatencyMillis = getLong(ATTR_TOTAL_MAXIMUM_LATENCY_MILLIS); + totalMinimumLatencyMillis = getLong(ATTR_TOTAL_MINIMUM_LATENCY_MILLIS); + totalNegativeLatencyUpdateCount = + getLong(ATTR_TOTAL_NEGATIVE_LATENCY_UPDATE_COUNT); + totalReplayed = getLong(ATTR_TOTAL_REPLAYED); + totalSumLatencyMillis = getLong(ATTR_TOTAL_SUM_LATENCY_MILLIS); + totalUpdateCount = getLong(ATTR_TOTAL_UPDATE_COUNT); + unresolvedNamingConflicts = getLong(ATTR_UNRESOLVED_NAMING_CONFLICTS); + baseDN = getString(ATTR_BASE_DN); + generationID = getString(ATTR_GENERATION_ID); + replicaID = getString(ATTR_REPLICA_ID); String addr = null; Long port = null; @@ -477,187 +1094,890 @@ public Long getLostConnections() + /** + * Retrieves the total number of replicated operations processed since the + * server started. + * + * @return The total number of replicated operations processed since the + * server started, or {@code null} if it was not included in the + * monitor entry. + */ + @Nullable() + public Long getTotalUpdateCount() + { + return totalUpdateCount; + } + + + /** * Retrieves the number of updates that this replica has received from the * replication server. * - * @return The number of updates that this replica has received from the - * replication server, or {@code null} if it was not included in the - * monitor entry. + * @return The number of updates that this replica has received from the + * replication server, or {@code null} if it was not included in the + * monitor entry. + */ + @Nullable() + public Long getReceivedUpdates() + { + return receivedUpdates; + } + + + + /** + * Retrieves the number of updates that this replica has sent to the + * replication server. + * + * @return The number of updates that this replica has sent to the + * replication server, or {@code null} if it was not included in the + * monitor entry. + */ + @Nullable() + public Long getSentUpdates() + { + return sentUpdates; + } + + + + /** + * Retrieves the number of acknowledgements that this replica has received + * from other servers. + * + * @return The number of acknowledgements that this replica has received + * from other servers, or {@code null} if it was not included in the + * monitor entry. + */ + @Nullable() + public Long getReceivedAcks() + { + return receivedAcks; + } + + + + /** + * Retrieves the number of acknowledgements that this replica has sent to + * other servers. + * + * @return The number of acknowledgements that this replica has sent to + * other servers, or {@code null} if it was not included in the + * monitor entry. + */ + @Nullable() + public Long getSentAcks() + { + return sentAcks; + } + + + + /** + * Retrieves the number of updates that are currently in progress in the + * Directory Server and have not yet been sent to the replication server. + * + * @return The number of updates that are currently in progress in the + * Directory Server and have not yet been sent to the replication + * server, or {@code null} if it was not included in the monitor + * entry. + */ + @Nullable() + public Long getPendingUpdates() + { + return pendingUpdates; + } + + + + /** + * Retrieves the total number of updates that have been replayed in this + * replica. + * + * @return The total number of updates that have been replayed in this + * replica, or {@code null} if it was not included in the monitor + * entry. + */ + @Nullable() + public Long getTotalUpdatesReplayed() + { + return totalReplayed; + } + + + + /** + * Retrieves the number of updates that have been successfully replayed in + * this replica without conflicts. + * + * @return The number of updates that have been successfully replayed in this + * replica without conflicts, or {@code null} if it was not included + * in the monitor entry. + */ + @Nullable() + public Long getUpdatesSuccessfullyReplayed() + { + return successfullyReplayed; + } + + + + /** + * Retrieves the number of failures that have occurred while attempting to + * replay changes. + * + * @return The number of failures that have occurred while attempting to + * replay changes, or {@code null} if it was not included in the + * monitor entry. + */ + @Nullable() + public Long getUpdateReplayFailures() + { + return failedReplayed; + } + + + + /** + * Retrieves the number of updates that have been replayed in this replica + * after automatically resolving a modify conflict. + * + * @return The number of updates that have been replayed in this replica + * after automatically resolving a modify conflict, or {@code null} + * if it was not included in the monitor entry. + */ + @Nullable() + public Long getUpdatesReplayedAfterModifyConflict() + { + return replayedAfterModifyConflict; + } + + + + /** + * Retrieves the number of updates that have been replayed in this replica + * after automatically resolving a naming conflict. + * + * @return The number of updates that have been replayed in this replica + * after automatically resolving a naming conflict, or {@code null} + * if it was not included in the monitor entry. + */ + @Nullable() + public Long getUpdatesReplayedAfterNamingConflict() + { + return replayedAfterNamingConflict; + } + + + + /** + * Retrieves the number of updates that could not be replayed as a result of a + * naming conflict that could not be automatically resolved. + * + * @return The number of updates that could not be replayed as a result of a + * naming conflict that could not be automatically resolved, or + * {@code null} if it was not included in the monitor entry. + */ + @Nullable() + public Long getUnresolvedNamingConflicts() + { + return unresolvedNamingConflicts; + } + + + + /** + * Retrieves the number of conflict entries that currently exist in the + * associated backend. + * + * @return The number of conflict entries that currently exist in the + * associated backend, or {@code null} if it was not included in the + * monitor entry. + * + * + * The name of the attribute that contains the number of conflict entries + * that currently exist in the associated backend. + */ + @Nullable() + public Long getConflictEntryCount() + { + return conflictEntryCount; + } + + + + /** + * Retrieves the current receive window size for this replica. + * + * @return The current receive window size for this replica, or {@code null} + * if it was not included in the monitor entry. + */ + @Nullable() + public Long getCurrentReceiveWindowSize() + { + return currentReceiveWindowSize; + } + + + + /** + * Retrieves the current send window size for this replica. + * + * @return The current send window size for this replica, or {@code null} if + * it was not included in the monitor entry. + */ + @Nullable() + public Long getCurrentSendWindowSize() + { + return currentSendWindowSize; + } + + + + /** + * Retrieves the maximum receive window size for this replica. + * + * @return The maximum receive window size for this replica, or {@code null} + * if it was not included in the monitor entry. + */ + @Nullable() + public Long getMaximumReceiveWindowSize() + { + return maxReceiveWindowSize; + } + + + + /** + * Retrieves the maximum send window size for this replica. + * + * @return The maximum send window size for this replica, or {@code null} if + * it was not included in the monitor entry. + */ + @Nullable() + public Long getMaximumSendWindowSize() + { + return maxSendWindowSize; + } + + + + /** + * Retrieves the number of changes that have been applied in one or more other + * replicas but have not yet been applied in the local server. + * + * @return The number of changes that have been applied in one or more other + * replicas but have not yet been applied in the local server, or + * {@code null} if it was not included in the monitor entry. + */ + @Nullable() + public Long getReplicationBacklog() + { + return replicationBacklog; + } + + + + /** + * Retrieves the completion time for the oldest change that has been applied + * in one or other replicas but has not yet been applied in the local server. + * + * @return The completion time for the oldest change that has been applied in + * one or more other replicas but has not yet been applied in the + * local server, or {@code null} if it was not included in the + * monitor entry. + */ + @Nullable() + public Date getOldestBacklogChangeTime() + { + return oldestBacklogChangeTime; + } + + + + /** + * Retrieves the number of changes in the pending changes queue that have not + * yet been committed to the local database. + * + * @return The number of changes in the pending changes queue that have not + * yet been committed to the local database, or {@code null} if it + * was not included in the monitor entry. + */ + @Nullable() + public Long getPendingChangesCurrentUncommittedSize() + { + return pendingChangesCurrentUncommittedSize; + } + + + + /** + * Retrieves the age, in milliseconds, of the oldest operation in the + * pending changes queue. + * + * @return The age, in milliseconds, of the oldest operation in the pending + * changes queue, or {@code null} if it was not included in the + * monitor entry. + */ + @Nullable() + public Long getAgeOfOldestPendingUpdateMillis() + { + return ageOfOldestPendingUpdateMillis; + } + + + + /** + * Retrieves the maximum number of operations that may be held in the + * pending changes queue. + * + * @return The maximum number of operations that may be held in the pending + * changes queue, or {@code null} if it was not included in the + * monitor entry. + */ + @Nullable() + public Long getPendingChangesMaxCapacity() + { + return pendingChangesMaxCapacity; + } + + + + /** + * Retrieves the largest number of operations that have been in the pending + * changes queue at any time. + * + * @return The largest number of operations that have been in the pending + * changes queue at any time, or {@code null} if it was not included + * in the monitor entry. + */ + @Nullable() + public Long getPendingChangesLargestSizeReached() + { + return pendingChangesLargestSizeReached; + } + + + + /** + * Retrieves the number of times that the server attempted to add a change to + * the pending changes queue when it was already full. + * + * @return The number of times that the server attempted to add a change to + * the pending changes queue when it was already full, or + * {@code null} if it was not included in the monitor entry. + */ + @Nullable() + public Long getPendingChangesNumTimesAddedToFullQueue() + { + return pendingChangesNumTimesAddedToFullQueue; + } + + + + /** + * Retrieves the number of times that the server has logged that an operation + * in the pending changes queue has stalled. + * + * @return The number of times that the server has logged that an operation + * in the pending changes queue has stalled, or {@code null} if it + * was not included in the monitor entry. + */ + @Nullable() + public Long getPendingChangesNumTimesStallLogged() + { + return pendingChangesNumTimesStallLogged; + } + + + + /** + * Retrieves the latency, in milliseconds, of the last update that was + * successfully replayed. + * + * @return The latency, in milliseconds, of the last update that was + * successfully replayed, or {@code null} if it was not included in + * the monitor entry. + */ + @Nullable() + public Long getLastUpdateLatencyMillis() + { + return lastUpdateLatencyMillis; + } + + + + /** + * Retrieves the average replication latency, in milliseconds, for operations + * processed over a recent interval. + * + * @return The average replication latency, in milliseconds, for operations + * processed over a recent interval, or {@code null} if it was not + * included in the monitor entry. + */ + @Nullable() + public Long getRecentAverageLatencyMillis() + { + return recentAverageLatencyMillis; + } + + + + /** + * Retrieves the maximum replication latency, in milliseconds, for any + * operation processed over a recent interval. + * + * @return The maximum replication latency, in milliseconds, for any + * operation processed over a recent interval, or {@code null} if it + * was not included in the monitor entry. + */ + @Nullable() + public Long getRecentMaximumLatencyMillis() + { + return recentMaximumLatencyMillis; + } + + + + /** + * Retrieves the minimum replication latency, in milliseconds, for any + * operation processed over a recent interval. + * + * @return The minimum replication latency, in milliseconds, for any + * operation processed over a recent interval, or {@code null} if it + * was not included in the monitor entry. + */ + @Nullable() + public Long getRecentMinimumLatencyMillis() + { + return recentMinimumLatencyMillis; + } + + + + /** + * Retrieves the number of negative replication latencies encountered over a + * recent interval. + * + * @return The number of negative replication latencies encountered over a + * recent interval, or {@code null} if it was not included in the + * monitor entry. + */ + @Nullable() + public Long getRecentNegativeLatencyUpdateCount() + { + return recentNegativeLatencyUpdateCount; + } + + + + /** + * Retrieves the sum of latencies, in milliseconds, for operations processed + * over a recent interval. + * + * @return The sum of latencies, in milliseconds, for operations processed + * over a recent interval, or {@code null} if it was not included in + * the monitor entry. + */ + @Nullable() + public Long getRecentSumLatencyMillis() + { + return recentSumLatencyMillis; + } + + + + /** + * Retrieves the number of operations processed over the recent interval used + * for recent replication latency calculations. + * + * @return The number of operations processed over the recent interval, or + * {@code null} if it was not included in the monitor entry. + */ + @Nullable() + public Long getRecentUpdateCount() + { + return recentUpdateCount; + } + + + + /** + * Retrieves the average replication latency, in milliseconds, for operations + * processed since the server was started. + * + * @return The average replication latency, in milliseconds, for operations + * processed since the server was started, or {@code null} if it was + * not included in the monitor entry. + */ + @Nullable() + public Long getTotalAverageLatencyMillis() + { + return totalAverageLatencyMillis; + } + + + + /** + * Retrieves the maximum replication latency, in milliseconds, for any + * operation processed since the server was started. + * + * @return The maximum replication latency, in milliseconds, for any + * operation processed since the server was started, or {@code null} + * if it was not included in the monitor entry. + */ + @Nullable() + public Long getTotalMaximumLatencyMillis() + { + return totalMaximumLatencyMillis; + } + + + + /** + * Retrieves the minimum replication latency, in milliseconds, for any + * operation processed since the server was started. + * + * @return The minimum replication latency, in milliseconds, for any + * operation processed since the server was started, or {@code null} + * if it was not included in the monitor entry. + */ + @Nullable() + public Long getTotalMinimumLatencyMillis() + { + return totalMinimumLatencyMillis; + } + + + + /** + * Retrieves the number of negative replication latencies encountered since + * the server was started. + * + * @return The number of negative replication latencies encountered since the + * server was started, or {@code null} if it was not included in the + * monitor entry. + */ + @Nullable() + public Long getTotalNegativeLatencyUpdateCount() + { + return totalNegativeLatencyUpdateCount; + } + + + + /** + * Retrieves the sum of latencies, in milliseconds, for operations processed + * since the server was started. + * + * @return The sum of latencies, in milliseconds, for operations processed + * since the server was started. + */ + @Nullable() + public Long getTotalSumLatencyMillis() + { + return totalSumLatencyMillis; + } + + + + /** + * Retrieves the number of changes that have begun processing with replication + * assurance enabled. + * + * @return The number of changes that have begun processing with replication + * assurance enabled, or {@code null} if it was not included in the + * monitor entry. + */ + @Nullable() + public Long getReplicationAssuranceSubmittedOperations() + { + return replicationAssuranceSubmittedOperations; + } + + + + /** + * Retrieves the number of changes that were processed with replication + * assurance and completed successfully within the assurance constraints. + * + * @return The number of changes that were processed with replication + * assurance and completed successfully within the assurance + * constraints, or {@code null} if it was not included in the monitor + * entry. + */ + @Nullable() + public Long getReplicationAssuranceCompletedNormally() + { + return replicationAssuranceCompletedNormally; + } + + + + /** + * Retrieves the number of changes that were processed with replication + * assurance but could not be completed successfully within the assurance + * constraints. + * + * @return The number of changes that were processed with replication + * assurance but could not be completed successfully within the + * assurance constraints, or {@code null} if it was not included in + * the monitor entry. + */ + @Nullable() + public Long getReplicationAssuranceCompletedAbnormally() + { + return replicationAssuranceCompletedAbnormally; + } + + + + /** + * Retrieves the number of changes that were processed with replication + * assurance but could not be completed successfully within the assurance + * constraints because a timeout was encountered. + * + * @return The number of changes that were processed with replication + * assurance but could not be completed successfully within the + * assurance constraints because a timeout was encountered, or + * {@code null} if it was not included in the monitor entry. + */ + @Nullable() + public Long getReplicationAssuranceCompletedWithTimeout() + { + return replicationAssuranceCompletedWithTimeout; + } + + + + /** + * Retrieves the number of changes that were processed with replication + * assurance but could not be completed successfully within the assurance + * constraints because of a server shutdown. + * + * @return The number of changes that were processed with replication + * assurance but could not be completed successfully within the + * assurance constraints because of a server shutdown, or + * {@code null} if it was not included in the monitor entry. + */ + @Nullable() + public Long getReplicationAssuranceCompletedWithShutdown() + { + return replicationAssuranceCompletedWithShutdown; + } + + + + /** + * Retrieves the number of operations of any type that failed on their initial + * attempt, but that were requeued and succeeded on a retry. + * + * @return The number of operations of any type that failed on their initial + * attempt, but that were requeued and succeeded on a retry, or + * {@code null} if it was not included in the monitor entry. + */ + @Nullable() + public Long getRequeueRetryOpSuccessCount() + { + return requeueRetryOpSuccessCount; + } + + + + /** + * Retrieves the number of operations of any type that failed on their initial + * attempt, were requeued, and failed again on a retry. + * + * @return The number of operations of any type that failed on their initial + * attempt, were requeued, and failed again on a retry, or + * {@code null} if it was not included in the monitor entry. */ @Nullable() - public Long getReceivedUpdates() + public Long getRequeueRetryOpFailedCount() { - return receivedUpdates; + return requeueRetryOpFailedCount; } /** - * Retrieves the number of updates that this replica has sent to the - * replication server. + * Retrieves the number of add operations that failed on their initial + * attempt, but that were requeued and succeeded on a retry. * - * @return The number of updates that this replica has sent to the - * replication server, or {@code null} if it was not included in the - * monitor entry. + * @return The number of add operations that failed on their initial attempt, + * but that were requeued and succeeded on a retry, or {@code null} + * if it was not included in the monitor entry. */ @Nullable() - public Long getSentUpdates() + public Long getRequeueRetryAddSuccessCount() { - return sentUpdates; + return requeueRetryAddSuccessCount; } /** - * Retrieves the number of updates that are currently in progress in the - * Directory Server and have not yet been sent to the replication server. + * Retrieves the number of add operations that failed on their initial + * attempt, were requeued, and failed again on a retry. * - * @return The number of updates that are currently in progress in the - * Directory Server and have not yet been sent to the replication - * server, or {@code null} if it was not included in the monitor - * entry. + * @return The number of add operations that failed on their initial attempt, + * were requeued, and failed again on a retry, or {@code null} if it + * was not included in the monitor entry. */ @Nullable() - public Long getPendingUpdates() + public Long getRequeueRetryAddFailedCount() { - return pendingUpdates; + return requeueRetryAddFailedCount; } /** - * Retrieves the total number of updates that have been replayed in this - * replica. + * Retrieves the number of delete operations that failed on their initial + * attempt, but that were requeued and succeeded on a retry. * - * @return The total number of updates that have been replayed in this - * replica, or {@code null} if it was not included in the monitor - * entry. + * @return The number of delete operations that failed on their initial + * attempt, but that were requeued and succeeded on a retry, or + * {@code null} if it was not included in the monitor entry. */ @Nullable() - public Long getTotalUpdatesReplayed() + public Long getRequeueRetryDeleteSuccessCount() { - return totalReplayed; + return requeueRetryDeleteSuccessCount; } /** - * Retrieves the number of updates that have been successfully replayed in - * this replica without conflicts. + * Retrieves the number of delete operations that failed on their initial + * attempt, were requeued, and failed again on a retry. * - * @return The number of updates that have been successfully replayed in this - * replica without conflicts, or {@code null} if it was not included - * in the monitor entry. + * @return The number of delete operations that failed on their initial + * attempt, were requeued, and failed again on a retry, or + * {@code null} if it was not included in the monitor entry. */ @Nullable() - public Long getUpdatesSuccessfullyReplayed() + public Long getRequeueRetryDeleteFailedCount() { - return successfullyReplayed; + return requeueRetryDeleteFailedCount; } /** - * Retrieves the number of updates that have been replayed in this replica - * after automatically resolving a modify conflict. + * Retrieves the number of modify operations that failed on their initial + * attempt, but that were requeued and succeeded on a retry. * - * @return The number of updates that have been replayed in this replica - * after automatically resolving a modify conflict, or {@code null} - * if it was not included in the monitor entry. + * @return The number of modify operations that failed on their initial + * attempt, but that were requeued and succeeded on a retry, or + * {@code null} if it was not included in the monitor entry. */ @Nullable() - public Long getUpdatesReplayedAfterModifyConflict() + public Long getRequeueRetryModifySuccessCount() { - return replayedAfterModifyConflict; + return requeueRetryModifySuccessCount; } /** - * Retrieves the number of updates that have been replayed in this replica - * after automatically resolving a naming conflict. + * Retrieves the number of modify operations that failed on their initial + * attempt, were requeued, and failed again on a retry. * - * @return The number of updates that have been replayed in this replica - * after automatically resolving a naming conflict, or {@code null} - * if it was not included in the monitor entry. + * @return The number of modify operations that failed on their initial + * attempt, were requeued, and failed again on a retry, or + * {@code null} if it was not included in the monitor entry. */ @Nullable() - public Long getUpdatesReplayedAfterNamingConflict() + public Long getRequeueRetryModifyFailedCount() { - return replayedAfterNamingConflict; + return requeueRetryModifyFailedCount; } /** - * Retrieves the number of updates that could not be replayed as a result of a - * naming conflict that could not be automatically resolved. + * Retrieves the number of modify DN operations that failed on their initial + * attempt, but that were requeued and succeeded on a retry. * - * @return The number of updates that could not be replayed as a result of a - * naming conflict that could not be automatically resolved, or + * @return The number of modify DN operations that failed on their initial + * attempt, but that were requeued and succeeded on a retry, or * {@code null} if it was not included in the monitor entry. */ @Nullable() - public Long getUnresolvedNamingConflicts() + public Long getRequeueRetryModifyDNSuccessCount() { - return unresolvedNamingConflicts; + return requeueRetryModifyDNSuccessCount; } /** - * Retrieves the current receive window size for this replica. + * Retrieves the number of modify DN operations that failed on their initial + * attempt, were requeued, and failed again on a retry. * - * @return The current receive window size for this replica, or {@code null} - * if it was not included in the monitor entry. + * @return The number of modify DN operations that failed on their initial + * attempt, were requeued, and failed again on a retry, or + * {@code null} if it was not included in the monitor entry. */ @Nullable() - public Long getCurrentReceiveWindowSize() + public Long getRequeueRetryModifyDNFailedCount() { - return currentReceiveWindowSize; + return requeueRetryModifyDNFailedCount; } /** - * Retrieves the current send window size for this replica. + * Retrieves the average length of time, in milliseconds, required to + * successfully process operations on a retry attempt after the initial + * failure. * - * @return The current send window size for this replica, or {@code null} if - * it was not included in the monitor entry. + * @return The average length of time, in milliseconds, required to + * successfully process operations on a retry attempt after the + * initial failure, or {@code null} if it was not included in the + * monitor entry. */ @Nullable() - public Long getCurrentSendWindowSize() + public Double getRequeueRetrySuccessAverageDurationMillis() { - return currentSendWindowSize; + return requeueRetrySuccessAverageDurationMillis; } /** - * Retrieves the maximum receive window size for this replica. + * Retrieves the maximum length of time, in milliseconds, required to + * successfully process an operation on a retry attempt after the initial + * failure. * - * @return The maximum receive window size for this replica, or {@code null} - * if it was not included in the monitor entry. + * @return The maximum length of time, in milliseconds, required to + * successfully process an operation on a retry attempt after the + * initial failure, or {@code null} if it was not included in the + * monitor entry. */ @Nullable() - public Long getMaximumReceiveWindowSize() + public Double getRequeueRetrySuccessMaximumDurationMillis() { - return maxReceiveWindowSize; + return requeueRetrySuccessMaximumDurationMillis; } /** - * Retrieves the maximum send window size for this replica. + * Retrieves the total length of time, in milliseconds, required to process + * operations that succeeded on a retry attempt after an initial failure. * - * @return The maximum send window size for this replica, or {@code null} if - * it was not included in the monitor entry. + * @return The total length of time, in milliseconds, required to process + * operations that succeeded on a retry attempt after an initial + * failure, or {@code null} if it was not included in the monitor + * entry. */ @Nullable() - public Long getMaximumSendWindowSize() + public Long getRequeueRetrySuccessTotalDurationMillis() { - return maxSendWindowSize; + return requeueRetrySuccessTotalDurationMillis; } @@ -750,6 +2070,15 @@ public Map getMonitorAttributes() lostConnections); } + if (totalUpdateCount != null) + { + addMonitorAttribute(attrs, + ATTR_TOTAL_UPDATE_COUNT, + INFO_REPLICA_DISPNAME_TOTAL_UPDATE_COUNT.get(), + INFO_REPLICA_DESC_TOTAL_UPDATE_COUNT.get(), + totalUpdateCount); + } + if (receivedUpdates != null) { addMonitorAttribute(attrs, @@ -768,6 +2097,24 @@ public Map getMonitorAttributes() sentUpdates); } + if (receivedAcks != null) + { + addMonitorAttribute(attrs, + ATTR_RECEIVED_ACKS, + INFO_REPLICA_DISPNAME_RECEIVED_ACKS.get(), + INFO_REPLICA_DESC_RECEIVED_ACKS.get(), + receivedAcks); + } + + if (sentAcks != null) + { + addMonitorAttribute(attrs, + ATTR_SENT_ACKS, + INFO_REPLICA_DISPNAME_SENT_ACKS.get(), + INFO_REPLICA_DESC_SENT_ACKS.get(), + sentAcks); + } + if (pendingUpdates != null) { addMonitorAttribute(attrs, @@ -795,6 +2142,15 @@ public Map getMonitorAttributes() successfullyReplayed); } + if (failedReplayed != null) + { + addMonitorAttribute(attrs, + ATTR_FAILED_REPLAYED, + INFO_REPLICA_DISPNAME_FAILED_REPLAYED.get(), + INFO_REPLICA_DESC_FAILED_REPLAYED.get(), + failedReplayed); + } + if (replayedAfterModifyConflict != null) { addMonitorAttribute(attrs, @@ -822,6 +2178,15 @@ public Map getMonitorAttributes() unresolvedNamingConflicts); } + if (conflictEntryCount != null) + { + addMonitorAttribute(attrs, + ATTR_CONFLICT_ENTRY_COUNT, + INFO_REPLICA_DISPNAME_CONFLICT_ENTRY_COUNT.get(), + INFO_REPLICA_DESC_CONFLICT_ENTRY_COUNT.get(), + conflictEntryCount); + } + if (currentReceiveWindowSize != null) { addMonitorAttribute(attrs, @@ -858,6 +2223,348 @@ public Map getMonitorAttributes() maxSendWindowSize); } + if (replicationBacklog != null) + { + addMonitorAttribute(attrs, + ATTR_REPLICATION_BACKLOG, + INFO_REPLICA_DISPNAME_REPLICATION_BACKLOG.get(), + INFO_REPLICA_DESC_REPLICATION_BACKLOG.get(), + replicationBacklog); + } + + if (oldestBacklogChangeTime != null) + { + addMonitorAttribute(attrs, + ATTR_OLDEST_BACKLOG_CHANGE_TIME, + INFO_REPLICA_DISPNAME_OLDEST_BACKLOG_CHANGE_TIME.get(), + INFO_REPLICA_DESC_OLDEST_BACKLOG_CHANGE_TIME.get(), + oldestBacklogChangeTime); + } + + if (pendingChangesCurrentUncommittedSize != null) + { + addMonitorAttribute(attrs, + ATTR_PENDING_CHANGES_CURRENT_UNCOMMITTED_SIZE, + INFO_REPLICA_DISPNAME_PENDING_CHANGES_UNCOMMITTED_SIZE.get(), + INFO_REPLICA_DESC_PENDING_CHANGES_UNCOMMITTED_SIZE.get(), + pendingChangesCurrentUncommittedSize); + } + + if (ageOfOldestPendingUpdateMillis != null) + { + addMonitorAttribute(attrs, + ATTR_AGE_OF_OLDEST_PENDING_UPDATE_MILLIS, + INFO_REPLICA_DISPNAME_AGE_OF_OLDEST_PENDING_UPDATE.get(), + INFO_REPLICA_DESC_AGE_OF_OLDEST_PENDING_UPDATE.get(), + ageOfOldestPendingUpdateMillis); + } + + if (pendingChangesMaxCapacity != null) + { + addMonitorAttribute(attrs, + ATTR_PENDING_CHANGES_MAX_CAPACITY, + INFO_REPLICA_DISPNAME_PENDING_CHANGES_MAX_CAPACITY.get(), + INFO_REPLICA_DESC_PENDING_CHANGES_MAX_CAPACITY.get(), + pendingChangesMaxCapacity); + } + + if (pendingChangesLargestSizeReached != null) + { + addMonitorAttribute(attrs, + ATTR_PENDING_CHANGES_LARGEST_SIZE_REACHED, + INFO_REPLICA_DISPNAME_PENDING_CHANGES_LARGEST_SIZE.get(), + INFO_REPLICA_DESC_PENDING_CHANGES_LARGEST_SIZE.get(), + pendingChangesLargestSizeReached); + } + + if (pendingChangesNumTimesAddedToFullQueue != null) + { + addMonitorAttribute(attrs, + ATTR_PENDING_CHANGES_NUM_TIMES_ADDED_TO_FULL_QUEUE, + INFO_REPLICA_DISPNAME_PENDING_CHANGES_ADD_TO_FULL.get(), + INFO_REPLICA_DESC_PENDING_CHANGES_ADD_TO_FULL.get(), + pendingChangesNumTimesAddedToFullQueue); + } + + if (pendingChangesNumTimesStallLogged != null) + { + addMonitorAttribute(attrs, + ATTR_PENDING_CHANGES_NUM_TIMES_STALL_LOGGED, + INFO_REPLICA_DISPNAME_PENDING_CHANGES_STALL_LOGGED.get(), + INFO_REPLICA_DESC_PENDING_CHANGES_STALL_LOGGED.get(), + pendingChangesNumTimesStallLogged); + } + + if (lastUpdateLatencyMillis != null) + { + addMonitorAttribute(attrs, + ATTR_LAST_UPDATE_LATENCY_MILLIS, + INFO_REPLICA_DISPNAME_LAST_UPDATE_LATENCY.get(), + INFO_REPLICA_DESC_LAST_UPDATE_LATENCY.get(), + lastUpdateLatencyMillis); + } + + if (recentAverageLatencyMillis != null) + { + addMonitorAttribute(attrs, + ATTR_RECENT_AVERAGE_LATENCY_MILLIS, + INFO_REPLICA_DISPNAME_RECENT_AVERAGE_LATENCY.get(), + INFO_REPLICA_DESC_RECENT_AVERAGE_LATENCY.get(), + recentAverageLatencyMillis); + } + + if (recentMaximumLatencyMillis != null) + { + addMonitorAttribute(attrs, + ATTR_RECENT_MAXIMUM_LATENCY_MILLIS, + INFO_REPLICA_DISPNAME_RECENT_MAX_LATENCY.get(), + INFO_REPLICA_DESC_RECENT_MAX_LATENCY.get(), + recentMaximumLatencyMillis); + } + + if (recentMinimumLatencyMillis != null) + { + addMonitorAttribute(attrs, + ATTR_RECENT_MINIMUM_LATENCY_MILLIS, + INFO_REPLICA_DISPNAME_RECENT_MIN_LATENCY.get(), + INFO_REPLICA_DESC_RECENT_MIN_LATENCY.get(), + recentMinimumLatencyMillis); + } + + if (recentNegativeLatencyUpdateCount != null) + { + addMonitorAttribute(attrs, + ATTR_RECENT_NEGATIVE_LATENCY_UPDATE_COUNT, + INFO_REPLICA_DISPNAME_RECENT_NEGATIVE_LATENCY.get(), + INFO_REPLICA_DESC_RECENT_NEGATIVE_LATENCY.get(), + recentNegativeLatencyUpdateCount); + } + + if (recentSumLatencyMillis != null) + { + addMonitorAttribute(attrs, + ATTR_RECENT_SUM_LATENCY_MILLIS, + INFO_REPLICA_DISPNAME_RECENT_SUM_LATENCY.get(), + INFO_REPLICA_DESC_RECENT_SUM_LATENCY.get(), + recentSumLatencyMillis); + } + + if (recentUpdateCount != null) + { + addMonitorAttribute(attrs, + ATTR_RECENT_UPDATE_COUNT, + INFO_REPLICA_DISPNAME_RECENT_UPDATE_COUNT.get(), + INFO_REPLICA_DESC_RECENT_UPDATE_COUNT.get(), + recentUpdateCount); + } + + if (totalAverageLatencyMillis != null) + { + addMonitorAttribute(attrs, + ATTR_TOTAL_AVERAGE_LATENCY_MILLIS, + INFO_REPLICA_DISPNAME_TOTAL_AVERAGE_LATENCY.get(), + INFO_REPLICA_DESC_TOTAL_AVERAGE_LATENCY.get(), + totalAverageLatencyMillis); + } + + if (totalMaximumLatencyMillis != null) + { + addMonitorAttribute(attrs, + ATTR_TOTAL_MAXIMUM_LATENCY_MILLIS, + INFO_REPLICA_DISPNAME_TOTAL_MAX_LATENCY.get(), + INFO_REPLICA_DESC_TOTAL_MAX_LATENCY.get(), + totalMaximumLatencyMillis); + } + + if (totalMinimumLatencyMillis != null) + { + addMonitorAttribute(attrs, + ATTR_TOTAL_MINIMUM_LATENCY_MILLIS, + INFO_REPLICA_DISPNAME_TOTAL_MIN_LATENCY.get(), + INFO_REPLICA_DESC_TOTAL_MIN_LATENCY.get(), + totalMinimumLatencyMillis); + } + + if (totalNegativeLatencyUpdateCount != null) + { + addMonitorAttribute(attrs, + ATTR_TOTAL_NEGATIVE_LATENCY_UPDATE_COUNT, + INFO_REPLICA_DISPNAME_TOTAL_NEGATIVE_LATENCY.get(), + INFO_REPLICA_DESC_TOTAL_NEGATIVE_LATENCY.get(), + totalNegativeLatencyUpdateCount); + } + + if (totalSumLatencyMillis != null) + { + addMonitorAttribute(attrs, + ATTR_TOTAL_SUM_LATENCY_MILLIS, + INFO_REPLICA_DISPNAME_TOTAL_SUM_LATENCY.get(), + INFO_REPLICA_DESC_TOTAL_SUM_LATENCY.get(), + totalSumLatencyMillis); + } + + if (replicationAssuranceSubmittedOperations != null) + { + addMonitorAttribute(attrs, + ATTR_REPLICATION_ASSURANCE_SUBMITTED_OPERATIONS, + INFO_REPLICA_DISPNAME_REPL_ASSURANCE_SUBMITTED_OPS.get(), + INFO_REPLICA_DESC_REPL_ASSURANCE_SUBMITTED_OPS.get(), + replicationAssuranceSubmittedOperations); + } + + if (replicationAssuranceCompletedNormally != null) + { + addMonitorAttribute(attrs, + ATTR_REPLICATION_ASSURANCE_COMPLETED_NORMALLY, + INFO_REPLICA_DISPNAME_REPL_ASSURANCE_COMPLETED_NORMALLY.get(), + INFO_REPLICA_DESC_REPL_ASSURANCE_COMPLETED_NORMALLY.get(), + replicationAssuranceCompletedNormally); + } + + if (replicationAssuranceCompletedAbnormally != null) + { + addMonitorAttribute(attrs, + ATTR_REPLICATION_ASSURANCE_COMPLETED_ABNORMALLY, + INFO_REPLICA_DISPNAME_REPL_ASSURANCE_COMPLETED_ABNORMALLY.get(), + INFO_REPLICA_DESC_REPL_ASSURANCE_COMPLETED_ABNORMALLY.get(), + replicationAssuranceCompletedAbnormally); + } + + if (replicationAssuranceCompletedWithTimeout != null) + { + addMonitorAttribute(attrs, + ATTR_REPLICATION_ASSURANCE_COMPLETED_WITH_TIMEOUT, + INFO_REPLICA_DISPNAME_REPL_ASSURANCE_COMPLETED_WITH_TIMEOUT.get(), + INFO_REPLICA_DESC_REPL_ASSURANCE_COMPLETED_WITH_TIMEOUT.get(), + replicationAssuranceCompletedWithTimeout); + } + + if (replicationAssuranceCompletedWithShutdown != null) + { + addMonitorAttribute(attrs, + ATTR_REPLICATION_ASSURANCE_COMPLETED_WITH_SHUTDOWN, + INFO_REPLICA_DISPNAME_REPL_ASSURANCE_COMPLETED_WITH_SHUTDOWN.get(), + INFO_REPLICA_DESC_REPL_ASSURANCE_COMPLETED_WITH_SHUTDOWN.get(), + replicationAssuranceCompletedWithShutdown); + } + + if (requeueRetryOpSuccessCount != null) + { + addMonitorAttribute(attrs, + ATTR_REQUEUE_RETRY_OP_SUCCESS_COUNT, + INFO_REPLICA_DISPNAME_RETRY_OP_SUCCESS_COUNT.get(), + INFO_REPLICA_DESC_RETRY_OP_SUCCESS_COUNT.get(), + requeueRetryOpSuccessCount); + } + + if (requeueRetryOpFailedCount != null) + { + addMonitorAttribute(attrs, + ATTR_REQUEUE_RETRY_OP_FAILED_COUNT, + INFO_REPLICA_DISPNAME_RETRY_OP_FAILED_COUNT.get(), + INFO_REPLICA_DESC_RETRY_OP_FAILED_COUNT.get(), + requeueRetryOpFailedCount); + } + + if (requeueRetryAddSuccessCount != null) + { + addMonitorAttribute(attrs, + ATTR_REQUEUE_RETRY_ADD_SUCCESS_COUNT, + INFO_REPLICA_DISPNAME_RETRY_ADD_SUCCESS_COUNT.get(), + INFO_REPLICA_DESC_RETRY_ADD_SUCCESS_COUNT.get(), + requeueRetryAddSuccessCount); + } + + if (requeueRetryAddFailedCount != null) + { + addMonitorAttribute(attrs, + ATTR_REQUEUE_RETRY_ADD_FAILED_COUNT, + INFO_REPLICA_DISPNAME_RETRY_ADD_FAILED_COUNT.get(), + INFO_REPLICA_DESC_RETRY_ADD_FAILED_COUNT.get(), + requeueRetryAddFailedCount); + } + + if (requeueRetryDeleteSuccessCount != null) + { + addMonitorAttribute(attrs, + ATTR_REQUEUE_RETRY_DELETE_SUCCESS_COUNT, + INFO_REPLICA_DISPNAME_RETRY_DELETE_SUCCESS_COUNT.get(), + INFO_REPLICA_DESC_RETRY_DELETE_SUCCESS_COUNT.get(), + requeueRetryDeleteSuccessCount); + } + + if (requeueRetryDeleteFailedCount != null) + { + addMonitorAttribute(attrs, + ATTR_REQUEUE_RETRY_DELETE_FAILED_COUNT, + INFO_REPLICA_DISPNAME_RETRY_DELETE_FAILED_COUNT.get(), + INFO_REPLICA_DESC_RETRY_DELETE_FAILED_COUNT.get(), + requeueRetryDeleteFailedCount); + } + + if (requeueRetryModifySuccessCount != null) + { + addMonitorAttribute(attrs, + ATTR_REQUEUE_RETRY_MODIFY_SUCCESS_COUNT, + INFO_REPLICA_DISPNAME_RETRY_MODIFY_SUCCESS_COUNT.get(), + INFO_REPLICA_DESC_RETRY_MODIFY_SUCCESS_COUNT.get(), + requeueRetryModifySuccessCount); + } + + if (requeueRetryModifyFailedCount != null) + { + addMonitorAttribute(attrs, + ATTR_REQUEUE_RETRY_MODIFY_FAILED_COUNT, + INFO_REPLICA_DISPNAME_RETRY_MODIFY_FAILED_COUNT.get(), + INFO_REPLICA_DESC_RETRY_MODIFY_FAILED_COUNT.get(), + requeueRetryModifyFailedCount); + } + + if (requeueRetryModifyDNSuccessCount != null) + { + addMonitorAttribute(attrs, + ATTR_REQUEUE_RETRY_MODIFY_DN_SUCCESS_COUNT, + INFO_REPLICA_DISPNAME_RETRY_MODIFY_DN_SUCCESS_COUNT.get(), + INFO_REPLICA_DESC_RETRY_MODIFY_DN_SUCCESS_COUNT.get(), + requeueRetryModifyDNSuccessCount); + } + + if (requeueRetryModifyDNFailedCount != null) + { + addMonitorAttribute(attrs, + ATTR_REQUEUE_RETRY_MODIFY_DN_FAILED_COUNT, + INFO_REPLICA_DISPNAME_RETRY_MODIFY_DN_FAILED_COUNT.get(), + INFO_REPLICA_DESC_RETRY_MODIFY_DN_FAILED_COUNT.get(), + requeueRetryModifyDNFailedCount); + } + + if (requeueRetrySuccessAverageDurationMillis != null) + { + addMonitorAttribute(attrs, + ATTR_REQUEUE_RETRY_OP_SUCCESS_AVERAGE_DURATION_MILLIS, + INFO_REPLICA_DISPNAME_RETRY_AVERAGE_DURATION.get(), + INFO_REPLICA_DESC_RETRY_AVERAGE_DURATION.get(), + requeueRetrySuccessAverageDurationMillis); + } + + if (requeueRetrySuccessMaximumDurationMillis != null) + { + addMonitorAttribute(attrs, + ATTR_REQUEUE_RETRY_OP_SUCCESS_MAXIMUM_DURATION_MILLIS, + INFO_REPLICA_DISPNAME_RETRY_MAX_DURATION.get(), + INFO_REPLICA_DESC_RETRY_MAX_DURATION.get(), + requeueRetrySuccessMaximumDurationMillis); + } + + if (requeueRetrySuccessTotalDurationMillis != null) + { + addMonitorAttribute(attrs, + ATTR_REQUEUE_RETRY_OP_SUCCESS_TOTAL_DURATION_MILLIS, + INFO_REPLICA_DISPNAME_RETRY_TOTAL_DURATION.get(), + INFO_REPLICA_DESC_RETRY_TOTAL_DURATION.get(), + requeueRetrySuccessTotalDurationMillis); + } + return Collections.unmodifiableMap(attrs); } } diff --git a/tests/unit/src/com/unboundid/ldap/sdk/unboundidds/monitors/ReplicaMonitorEntryTestCase.java b/tests/unit/src/com/unboundid/ldap/sdk/unboundidds/monitors/ReplicaMonitorEntryTestCase.java index 4ff3a8d40..b375ba036 100644 --- a/tests/unit/src/com/unboundid/ldap/sdk/unboundidds/monitors/ReplicaMonitorEntryTestCase.java +++ b/tests/unit/src/com/unboundid/ldap/sdk/unboundidds/monitors/ReplicaMonitorEntryTestCase.java @@ -43,13 +43,14 @@ import com.unboundid.ldap.sdk.DN; import com.unboundid.ldap.sdk.Entry; import com.unboundid.ldap.sdk.LDAPSDKTestCase; +import com.unboundid.util.StaticUtils; /** * This class provides test coverage for the ReplicaMonitorEntry class. */ -public class ReplicaMonitorEntryTestCase + public class ReplicaMonitorEntryTestCase extends LDAPSDKTestCase { /** @@ -86,7 +87,50 @@ public void testConstructorAllValues() "max-send-window: 13", "current-send-window: 14", "ssl-encryption: false", - "generation-id: 15"); + "generation-id: 15", + "total-update-count: 16", + "received-acks: 17", + "sent-acks: 18", + "replayed-updates-failed: 19", + "conflict-entry-count: 20", + "replication-backlog: 21", + "age-of-oldest-backlog-change: 20240102010203.456Z", + "pending-changes-current-uncommitted-size: 22", + "age-of-oldest-pending-update: 23", + "pending-changes-max-capacity: 24", + "pending-changes-largest-size-reached: 25", + "pending-changes-num-times-added-to-full-queue: 26", + "pending-changes-num-times-stall-logged: 27", + "last-update-latency-millis: 28", + "recent-average-latency-millis: 29", + "recent-maximum-latency-millis: 30", + "recent-minimum-latency-millis: 31", + "recent-negative-latency-update-count: 32", + "recent-sum-latency-millis: 33", + "recent-update-count: 34", + "total-average-latency-millis: 35", + "total-maximum-latency-millis: 36", + "total-minimum-latency-millis: 37", + "total-negative-latency-update-count: 38", + "total-sum-latency-millis: 39", + "replication-assurance-submitted-operations: 40", + "replication-assurance-completed-normally: 41", + "replication-assurance-completed-abnormally: 42", + "replication-assurance-completed-with-timeout: 43", + "replication-assurance-completed-with-shutdown: 44", + "requeue-retry-op-success-count: 45", + "requeue-retry-op-failed-count: 46", + "requeue-retry-add-success-count: 47", + "requeue-retry-add-failed-count: 48", + "requeue-retry-delete-success-count: 49", + "requeue-retry-delete-failed-count: 50", + "requeue-retry-modify-success-count: 51", + "requeue-retry-modify-failed-count: 52", + "requeue-retry-modify-dn-success-count: 53", + "requeue-retry-modify-dn-failed-count: 54", + "requeue-retry-op-success-average-duration-millis: 55.5", + "requeue-retry-op-success-maximum-duration-millis: 56.5", + "requeue-retry-op-success-total-millis: 57"); ReplicaMonitorEntry me = new ReplicaMonitorEntry(e); assertNotNull(me.toString()); @@ -148,6 +192,146 @@ public void testConstructorAllValues() assertNotNull(me.getCurrentSendWindowSize()); assertEquals(me.getCurrentSendWindowSize(), Long.valueOf(14L)); + assertNotNull(me.getTotalUpdateCount()); + assertEquals(me.getTotalUpdateCount(), Long.valueOf(16L)); + + assertNotNull(me.getReceivedAcks()); + assertEquals(me.getReceivedAcks(), Long.valueOf(17L)); + + assertNotNull(me.getSentAcks()); + assertEquals(me.getSentAcks(), Long.valueOf(18L)); + + assertNotNull(me.getUpdateReplayFailures()); + assertEquals(me.getUpdateReplayFailures(), Long.valueOf(19L)); + + assertNotNull(me.getConflictEntryCount()); + assertEquals(me.getConflictEntryCount(), Long.valueOf(20L)); + + assertNotNull(me.getReplicationBacklog()); + assertEquals(me.getReplicationBacklog(), Long.valueOf(21L)); + + assertNotNull(me.getOldestBacklogChangeTime()); + assertEquals(me.getOldestBacklogChangeTime(), + StaticUtils.decodeGeneralizedTime("20240102010203.456Z")); + + assertNotNull(me.getPendingChangesCurrentUncommittedSize()); + assertEquals(me.getPendingChangesCurrentUncommittedSize(), + Long.valueOf(22L)); + + assertNotNull(me.getAgeOfOldestPendingUpdateMillis()); + assertEquals(me.getAgeOfOldestPendingUpdateMillis(), Long.valueOf(23L)); + + assertNotNull(me.getPendingChangesMaxCapacity()); + assertEquals(me.getPendingChangesMaxCapacity(), Long.valueOf(24L)); + + assertNotNull(me.getPendingChangesLargestSizeReached()); + assertEquals(me.getPendingChangesLargestSizeReached(), Long.valueOf(25L)); + + assertNotNull(me.getPendingChangesNumTimesAddedToFullQueue()); + assertEquals(me.getPendingChangesNumTimesAddedToFullQueue(), + Long.valueOf(26L)); + + assertNotNull(me.getPendingChangesNumTimesStallLogged()); + assertEquals(me.getPendingChangesNumTimesStallLogged(), Long.valueOf(27L)); + + assertNotNull(me.getLastUpdateLatencyMillis()); + assertEquals(me.getLastUpdateLatencyMillis(), Long.valueOf(28L)); + + assertNotNull(me.getRecentAverageLatencyMillis()); + assertEquals(me.getRecentAverageLatencyMillis(), Long.valueOf(29L)); + + assertNotNull(me.getRecentMaximumLatencyMillis()); + assertEquals(me.getRecentMaximumLatencyMillis(), Long.valueOf(30L)); + + assertNotNull(me.getRecentMinimumLatencyMillis()); + assertEquals(me.getRecentMinimumLatencyMillis(), Long.valueOf(31L)); + + assertNotNull(me.getRecentNegativeLatencyUpdateCount()); + assertEquals(me.getRecentNegativeLatencyUpdateCount(), Long.valueOf(32)); + + assertNotNull(me.getRecentSumLatencyMillis()); + assertEquals(me.getRecentSumLatencyMillis(), Long.valueOf(33L)); + + assertNotNull(me.getRecentUpdateCount()); + assertEquals(me.getRecentUpdateCount(), Long.valueOf(34L)); + + assertNotNull(me.getTotalAverageLatencyMillis()); + assertEquals(me.getTotalAverageLatencyMillis(), Long.valueOf(35L)); + + assertNotNull(me.getTotalMaximumLatencyMillis()); + assertEquals(me.getTotalMaximumLatencyMillis(), Long.valueOf(36L)); + + assertNotNull(me.getTotalMinimumLatencyMillis()); + assertEquals(me.getTotalMinimumLatencyMillis(), Long.valueOf(37L)); + + assertNotNull(me.getTotalNegativeLatencyUpdateCount()); + assertEquals(me.getTotalNegativeLatencyUpdateCount(), Long.valueOf(38L)); + + assertNotNull(me.getTotalSumLatencyMillis()); + assertEquals(me.getTotalSumLatencyMillis(), Long.valueOf(39L)); + + assertNotNull(me.getReplicationAssuranceSubmittedOperations()); + assertEquals(me.getReplicationAssuranceSubmittedOperations(), + Long.valueOf(40L)); + + assertNotNull(me.getReplicationAssuranceCompletedNormally()); + assertEquals(me.getReplicationAssuranceCompletedNormally(), + Long.valueOf(41L)); + + assertNotNull(me.getReplicationAssuranceCompletedAbnormally()); + assertEquals(me.getReplicationAssuranceCompletedAbnormally(), + Long.valueOf(42L)); + + assertNotNull(me.getReplicationAssuranceCompletedWithTimeout()); + assertEquals(me.getReplicationAssuranceCompletedWithTimeout(), + Long.valueOf(43L)); + + assertNotNull(me.getReplicationAssuranceCompletedWithShutdown()); + assertEquals(me.getReplicationAssuranceCompletedWithShutdown(), + Long.valueOf(44L)); + + assertNotNull(me.getRequeueRetryOpSuccessCount()); + assertEquals(me.getRequeueRetryOpSuccessCount(), Long.valueOf(45L)); + + assertNotNull(me.getRequeueRetryOpFailedCount()); + assertEquals(me.getRequeueRetryOpFailedCount(), Long.valueOf(46L)); + + assertNotNull(me.getRequeueRetryAddSuccessCount()); + assertEquals(me.getRequeueRetryAddSuccessCount(), Long.valueOf(47L)); + + assertNotNull(me.getRequeueRetryAddFailedCount()); + assertEquals(me.getRequeueRetryAddFailedCount(), Long.valueOf(48L)); + + assertNotNull(me.getRequeueRetryDeleteSuccessCount()); + assertEquals(me.getRequeueRetryDeleteSuccessCount(), Long.valueOf(49L)); + + assertNotNull(me.getRequeueRetryDeleteFailedCount()); + assertEquals(me.getRequeueRetryDeleteFailedCount(), Long.valueOf(50L)); + + assertNotNull(me.getRequeueRetryModifySuccessCount()); + assertEquals(me.getRequeueRetryModifySuccessCount(), Long.valueOf(51L)); + + assertNotNull(me.getRequeueRetryModifyFailedCount()); + assertEquals(me.getRequeueRetryModifyFailedCount(), Long.valueOf(52L)); + + assertNotNull(me.getRequeueRetryModifyDNSuccessCount()); + assertEquals(me.getRequeueRetryModifyDNSuccessCount(), Long.valueOf(53L)); + + assertNotNull(me.getRequeueRetryModifyDNFailedCount()); + assertEquals(me.getRequeueRetryModifyDNFailedCount(), Long.valueOf(54L)); + + assertNotNull(me.getRequeueRetrySuccessAverageDurationMillis()); + assertEquals(me.getRequeueRetrySuccessAverageDurationMillis(), + Double.valueOf(55.5d)); + + assertNotNull(me.getRequeueRetrySuccessMaximumDurationMillis()); + assertEquals(me.getRequeueRetrySuccessMaximumDurationMillis(), + Double.valueOf(56.5d)); + + assertNotNull(me.getRequeueRetrySuccessTotalDurationMillis()); + assertEquals(me.getRequeueRetrySuccessTotalDurationMillis(), + Long.valueOf(57L)); + assertNotNull(me.useSSL()); assertEquals(me.useSSL(), Boolean.FALSE); @@ -229,6 +413,200 @@ public void testConstructorAllValues() assertNotNull(attrs.get("generation-id")); assertEquals(attrs.get("generation-id").getStringValue(), "15"); + + assertNotNull(attrs.get("total-update-count")); + assertEquals(attrs.get("total-update-count").getLongValue(), + Long.valueOf(16L)); + + assertNotNull(attrs.get("received-acks")); + assertEquals(attrs.get("received-acks").getLongValue(), Long.valueOf(17L)); + + assertNotNull(attrs.get("sent-acks")); + assertEquals(attrs.get("sent-acks").getLongValue(), Long.valueOf(18L)); + + assertNotNull(attrs.get("replayed-updates-failed")); + assertEquals(attrs.get("replayed-updates-failed").getLongValue(), + Long.valueOf(19L)); + + assertNotNull(attrs.get("conflict-entry-count")); + assertEquals(attrs.get("conflict-entry-count").getLongValue(), + Long.valueOf(20L)); + + assertNotNull(attrs.get("replication-backlog")); + assertEquals(attrs.get("replication-backlog").getLongValue(), + Long.valueOf(21L)); + + assertNotNull(attrs.get("age-of-oldest-backlog-change")); + assertEquals( + attrs.get("age-of-oldest-backlog-change").getDateValue(), + StaticUtils.decodeGeneralizedTime("20240102010203.456Z")); + + assertNotNull(attrs.get("pending-changes-current-uncommitted-size")); + assertEquals( + attrs.get("pending-changes-current-uncommitted-size").getLongValue(), + Long.valueOf(22L)); + + assertNotNull(attrs.get("age-of-oldest-pending-update")); + assertEquals(attrs.get("age-of-oldest-pending-update").getLongValue(), + Long.valueOf(23L)); + + assertNotNull(attrs.get("pending-changes-max-capacity")); + assertEquals(attrs.get("pending-changes-max-capacity").getLongValue(), + Long.valueOf(24L)); + + assertNotNull(attrs.get("pending-changes-largest-size-reached")); + assertEquals( + attrs.get("pending-changes-largest-size-reached").getLongValue(), + Long.valueOf(25L)); + + assertNotNull(attrs.get("pending-changes-num-times-added-to-full-queue")); + assertEquals( + attrs.get("pending-changes-num-times-added-to-full-queue"). + getLongValue(), + Long.valueOf(26L)); + + assertNotNull(attrs.get("pending-changes-num-times-stall-logged")); + assertEquals( + attrs.get("pending-changes-num-times-stall-logged").getLongValue(), + Long.valueOf(27L)); + + assertNotNull(attrs.get("last-update-latency-millis")); + assertEquals(attrs.get("last-update-latency-millis").getLongValue(), + Long.valueOf(28L)); + + assertNotNull(attrs.get("recent-average-latency-millis")); + assertEquals(attrs.get("recent-average-latency-millis").getLongValue(), + Long.valueOf(29L)); + + assertNotNull(attrs.get("recent-maximum-latency-millis")); + assertEquals(attrs.get("recent-maximum-latency-millis").getLongValue(), + Long.valueOf(30L)); + + assertNotNull(attrs.get("recent-minimum-latency-millis")); + assertEquals(attrs.get("recent-minimum-latency-millis").getLongValue(), + Long.valueOf(31L)); + + assertNotNull(attrs.get("recent-negative-latency-update-count")); + assertEquals( + attrs.get("recent-negative-latency-update-count").getLongValue(), + Long.valueOf(32L)); + + assertNotNull(attrs.get("recent-sum-latency-millis")); + assertEquals(attrs.get("recent-sum-latency-millis").getLongValue(), + Long.valueOf(33L)); + + assertNotNull(attrs.get("recent-update-count")); + assertEquals(attrs.get("recent-update-count").getLongValue(), + Long.valueOf(34L)); + + assertNotNull(attrs.get("total-average-latency-millis")); + assertEquals(attrs.get("total-average-latency-millis").getLongValue(), + Long.valueOf(35L)); + + assertNotNull(attrs.get("total-maximum-latency-millis")); + assertEquals(attrs.get("total-maximum-latency-millis").getLongValue(), + Long.valueOf(36L)); + + assertNotNull(attrs.get("total-minimum-latency-millis")); + assertEquals(attrs.get("total-minimum-latency-millis").getLongValue(), + Long.valueOf(37L)); + + assertNotNull(attrs.get("total-negative-latency-update-count")); + assertEquals( + attrs.get("total-negative-latency-update-count").getLongValue(), + Long.valueOf(38L)); + + assertNotNull(attrs.get("total-sum-latency-millis")); + assertEquals(attrs.get("total-sum-latency-millis").getLongValue(), + Long.valueOf(39L)); + + assertNotNull(attrs.get("replication-assurance-submitted-operations")); + assertEquals( + attrs.get("replication-assurance-submitted-operations").getLongValue(), + Long.valueOf(40L)); + + assertNotNull(attrs.get("replication-assurance-completed-normally")); + assertEquals( + attrs.get("replication-assurance-completed-normally").getLongValue(), + Long.valueOf(41L)); + + assertNotNull(attrs.get("replication-assurance-completed-abnormally")); + assertEquals( + attrs.get("replication-assurance-completed-abnormally").getLongValue(), + Long.valueOf(42L)); + + assertNotNull(attrs.get("replication-assurance-completed-with-timeout")); + assertEquals( + attrs.get("replication-assurance-completed-with-timeout") + .getLongValue(), + Long.valueOf(43L)); + + assertNotNull(attrs.get("replication-assurance-completed-with-shutdown")); + assertEquals( + attrs.get("replication-assurance-completed-with-shutdown") + .getLongValue(), + Long.valueOf(44L)); + + assertNotNull(attrs.get("requeue-retry-op-success-count")); + assertEquals(attrs.get("requeue-retry-op-success-count").getLongValue(), + Long.valueOf(45L)); + + assertNotNull(attrs.get("requeue-retry-op-failed-count")); + assertEquals(attrs.get("requeue-retry-op-failed-count").getLongValue(), + Long.valueOf(46L)); + + assertNotNull(attrs.get("requeue-retry-add-success-count")); + assertEquals(attrs.get("requeue-retry-add-success-count").getLongValue(), + Long.valueOf(47L)); + + assertNotNull(attrs.get("requeue-retry-add-failed-count")); + assertEquals(attrs.get("requeue-retry-add-failed-count").getLongValue(), + Long.valueOf(48L)); + + assertNotNull(attrs.get("requeue-retry-delete-success-count")); + assertEquals(attrs.get("requeue-retry-delete-success-count").getLongValue(), + Long.valueOf(49L)); + + assertNotNull(attrs.get("requeue-retry-delete-failed-count")); + assertEquals(attrs.get("requeue-retry-delete-failed-count").getLongValue(), + Long.valueOf(50L)); + + assertNotNull(attrs.get("requeue-retry-modify-success-count")); + assertEquals(attrs.get("requeue-retry-modify-success-count").getLongValue(), + Long.valueOf(51L)); + + assertNotNull(attrs.get("requeue-retry-modify-failed-count")); + assertEquals(attrs.get("requeue-retry-modify-failed-count").getLongValue(), + Long.valueOf(52L)); + + assertNotNull(attrs.get("requeue-retry-modify-dn-success-count")); + assertEquals(attrs.get("requeue-retry-modify-dn-success-count"). + getLongValue(), + Long.valueOf(53L)); + + assertNotNull(attrs.get("requeue-retry-modify-dn-failed-count")); + assertEquals(attrs.get("requeue-retry-modify-dn-failed-count"). + getLongValue(), + Long.valueOf(54L)); + + assertNotNull( + attrs.get("requeue-retry-op-success-average-duration-millis")); + assertEquals( + attrs.get("requeue-retry-op-success-average-duration-millis"). + getDoubleValue(), + Double.valueOf(55.5d)); + + assertNotNull( + attrs.get("requeue-retry-op-success-maximum-duration-millis")); + assertEquals( + attrs.get("requeue-retry-op-success-maximum-duration-millis"). + getDoubleValue(), + Double.valueOf(56.5d)); + + assertNotNull(attrs.get("requeue-retry-op-success-total-millis")); + assertEquals( + attrs.get("requeue-retry-op-success-total-millis").getLongValue(), + Long.valueOf(57L)); } @@ -448,6 +826,92 @@ public void testConstructorNoValues() assertNull(me.getCurrentSendWindowSize()); + assertNull(me.getTotalUpdateCount()); + + assertNull(me.getReceivedAcks()); + + assertNull(me.getSentAcks()); + + assertNull(me.getUpdateReplayFailures()); + + assertNull(me.getConflictEntryCount()); + + assertNull(me.getReplicationBacklog()); + + assertNull(me.getOldestBacklogChangeTime()); + + assertNull(me.getPendingChangesCurrentUncommittedSize()); + + assertNull(me.getAgeOfOldestPendingUpdateMillis()); + + assertNull(me.getPendingChangesMaxCapacity()); + + assertNull(me.getPendingChangesLargestSizeReached()); + + assertNull(me.getPendingChangesNumTimesAddedToFullQueue()); + + assertNull(me.getPendingChangesNumTimesStallLogged()); + + assertNull(me.getLastUpdateLatencyMillis()); + + assertNull(me.getRecentAverageLatencyMillis()); + + assertNull(me.getRecentMaximumLatencyMillis()); + + assertNull(me.getRecentMinimumLatencyMillis()); + + assertNull(me.getRecentNegativeLatencyUpdateCount()); + + assertNull(me.getRecentSumLatencyMillis()); + + assertNull(me.getRecentUpdateCount()); + + assertNull(me.getTotalAverageLatencyMillis()); + + assertNull(me.getTotalMaximumLatencyMillis()); + + assertNull(me.getTotalMinimumLatencyMillis()); + + assertNull(me.getTotalNegativeLatencyUpdateCount()); + + assertNull(me.getTotalSumLatencyMillis()); + + assertNull(me.getReplicationAssuranceSubmittedOperations()); + + assertNull(me.getReplicationAssuranceCompletedNormally()); + + assertNull(me.getReplicationAssuranceCompletedAbnormally()); + + assertNull(me.getReplicationAssuranceCompletedWithTimeout()); + + assertNull(me.getReplicationAssuranceCompletedWithShutdown()); + + assertNull(me.getRequeueRetryOpSuccessCount()); + + assertNull(me.getRequeueRetryOpFailedCount()); + + assertNull(me.getRequeueRetryAddSuccessCount()); + + assertNull(me.getRequeueRetryAddFailedCount()); + + assertNull(me.getRequeueRetryDeleteSuccessCount()); + + assertNull(me.getRequeueRetryDeleteFailedCount()); + + assertNull(me.getRequeueRetryModifySuccessCount()); + + assertNull(me.getRequeueRetryModifyFailedCount()); + + assertNull(me.getRequeueRetryModifyDNSuccessCount()); + + assertNull(me.getRequeueRetryModifyDNFailedCount()); + + assertNull(me.getRequeueRetrySuccessAverageDurationMillis()); + + assertNull(me.getRequeueRetrySuccessMaximumDurationMillis()); + + assertNull(me.getRequeueRetrySuccessTotalDurationMillis()); + assertNull(me.useSSL()); assertNull(me.getGenerationID());