From 86ad6a08499797f9b3204896caee947abb03394f Mon Sep 17 00:00:00 2001
From: Yannick Lecaillez <yannick.lecaillez@forgerock.com>
Date: Mon, 07 Nov 2016 13:59:40 +0000
Subject: [PATCH] OPENDJ-3179: Migrate LDAP Connection Handler to SDK Grizzly transport
---
opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPStatistics.java | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPStatistics.java b/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPStatistics.java
index c14290e..d8f3470 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPStatistics.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPStatistics.java
@@ -407,14 +407,14 @@
* Updates the appropriate set of counters based on the provided
* message that has been written to the client.
*
- * @param message
- * The message that was written to the client.
+ * @param messageType
+ * The message type that was written to the client.
+ * @param messageId
+ * The message id that was written to the client
*/
- public void updateMessageWritten(LDAPMessage message)
- {
+ public void updateMessageWritten(byte messageType, int messageId) {
messagesWritten.getAndIncrement();
-
- switch (message.getProtocolOp().getType())
+ switch (messageType)
{
case OP_TYPE_ADD_RESPONSE:
addResponses.getAndIncrement();
@@ -437,7 +437,7 @@
// We don't want to include unsolicited notifications as
// "completed" operations.
- if (message.getMessageID() > 0)
+ if (messageId > 0)
{
operationsCompleted.getAndIncrement();
}
@@ -464,6 +464,18 @@
}
/**
+ * Updates the appropriate set of counters based on the provided
+ * message that has been written to the client.
+ *
+ * @param message
+ * The message that was written to the client.
+ */
+ public void updateMessageWritten(LDAPMessage message)
+ {
+ updateMessageWritten(message.getProtocolOp().getType(), message.getMessageID());
+ }
+
+ /**
* Updates the appropriate set of counters to indicate that an
* operation was abandoned without sending a response to the client.
*/
--
Gitblit v1.10.0