From c96af91cdd11f79c11e56d6c7fe33d0edc653ea3 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 15 Apr 2013 12:08:55 +0000
Subject: [PATCH] OPENDJ-832 (CR-1545) Leverage the work queue for processing requests received on the HTTP connection handler
---
opends/src/server/org/opends/server/api/ClientConnection.java | 50 ++++++++++++++++++++++++++++++++++----------------
1 files changed, 34 insertions(+), 16 deletions(-)
diff --git a/opends/src/server/org/opends/server/api/ClientConnection.java b/opends/src/server/org/opends/server/api/ClientConnection.java
index 3ce44cd..cbc65f4 100644
--- a/opends/src/server/org/opends/server/api/ClientConnection.java
+++ b/opends/src/server/org/opends/server/api/ClientConnection.java
@@ -23,7 +23,7 @@
*
*
* Copyright 2006-2009 Sun Microsystems, Inc.
- * Portions copyright 2011-2012 ForgeRock AS
+ * Portions copyright 2011-2013 ForgeRock AS
*/
package org.opends.server.api;
@@ -109,41 +109,47 @@
*/
protected AtomicBoolean bindOrStartTLSInProgress;
- // Indicates whether any necessary finalization work has been done
- // for this client connection.
+ /**
+ * Indicates whether any necessary finalization work has been done for this
+ * client connection.
+ */
private boolean finalized;
- // The set of privileges assigned to this client connection.
+ /** The set of privileges assigned to this client connection. */
private HashSet<Privilege> privileges;
- // The size limit for use with this client connection.
+ /** The size limit for use with this client connection. */
private int sizeLimit;
- // The time limit for use with this client connection.
+ /** The time limit for use with this client connection. */
private int timeLimit;
- // The lookthrough limit for use with this client connection.
+ /** The lookthrough limit for use with this client connection. */
private int lookthroughLimit;
- // The time that this client connection was established.
+ /** The time that this client connection was established. */
private final long connectTime;
- // The idle time limit for this client connection.
+ /** The idle time limit for this client connection. */
private long idleTimeLimit;
- // The opaque information used for storing intermediate state
- // information needed across multi-stage SASL binds.
+ /**
+ * The opaque information used for storing intermediate state information
+ * needed across multi-stage SASL binds.
+ */
private Object saslAuthState;
- // A string representation of the time that this client connection
- // was established.
+ /**
+ * A string representation of the time that this client connection was
+ * established.
+ */
private final String connectTimeString;
- // A set of persistent searches registered for this client.
+ /** A set of persistent searches registered for this client. */
private final CopyOnWriteArrayList<PersistentSearch>
persistentSearches;
- // The network group to which the connection belongs to.
+ /** The network group to which the connection belongs to. */
private NetworkGroup networkGroup;
/** Need to evaluate the network group for the first operation. */
@@ -1767,5 +1773,17 @@
{
saslBindInProgress.set(false);
}
-}
+ /**
+ * Returns whether this connection is used for inner work not directly
+ * requested by an external client.
+ *
+ * @return {@code true} if this is an inner connection, {@code false}
+ * otherwise
+ */
+ public boolean isInnerConnection()
+ {
+ return getConnectionID() < 0;
+ }
+
+}
--
Gitblit v1.10.0