From 218b40d6e175f5b58b89ff7e0b3050577d3aff2f Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Mon, 10 Nov 2008 13:41:49 +0000
Subject: [PATCH] This change fixes issue 3567:
---
opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java | 29 ++++++++++++++---------------
1 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
index 1586159..d7eee43 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
@@ -138,7 +138,7 @@
private byte[] elementValue;
// The set of all operations currently in progress on this connection.
- private ConcurrentHashMap<Integer,AbstractOperation> operationsInProgress;
+ private ConcurrentHashMap<Integer,Operation> operationsInProgress;
// The number of operations performed on this connection.
// Used to compare with the resource limits of the network group.
@@ -264,7 +264,7 @@
nextOperationID = new AtomicLong(0);
connectionValid = true;
disconnectRequested = false;
- operationsInProgress = new ConcurrentHashMap<Integer,AbstractOperation>();
+ operationsInProgress = new ConcurrentHashMap<Integer,Operation>();
operationsPerformed = 0;
operationsPerformedLock = new Object();
keepStats = connectionHandler.keepStats();
@@ -1136,7 +1136,7 @@
*
* @return The set of operations in progress for this client connection.
*/
- public Collection<AbstractOperation> getOperationsInProgress()
+ public Collection<Operation> getOperationsInProgress()
{
return operationsInProgress.values();
}
@@ -1151,7 +1151,7 @@
* @return The operation in progress with the specified message ID, or
* <CODE>null</CODE> if no such operation could be found.
*/
- public AbstractOperation getOperationInProgress(int messageID)
+ public Operation getOperationInProgress(int messageID)
{
return operationsInProgress.get(messageID);
}
@@ -1192,7 +1192,7 @@
// See if there is already an operation in progress with the same
// message ID. If so, then we can't allow it.
- AbstractOperation op = operationsInProgress.get(messageID);
+ Operation op = operationsInProgress.get(messageID);
if (op != null)
{
Message message =
@@ -1252,7 +1252,7 @@
*/
public boolean removeOperationInProgress(int messageID)
{
- AbstractOperation operation = operationsInProgress.remove(messageID);
+ Operation operation = operationsInProgress.remove(messageID);
if (operation == null)
{
return false;
@@ -1279,16 +1279,15 @@
public CancelResult cancelOperation(int messageID,
CancelRequest cancelRequest)
{
- AbstractOperation op = operationsInProgress.get(messageID);
+ Operation op = operationsInProgress.get(messageID);
if (op == null)
{
// See if the operation is in the list of persistent searches.
for (PersistentSearch ps : getPersistentSearches())
{
- if (ps.getSearchOperation().getMessageID() == messageID)
+ if (ps.getMessageID() == messageID)
{
- CancelResult cancelResult =
- ps.getSearchOperation().cancel(cancelRequest);
+ CancelResult cancelResult = ps.cancel();
if (keepStats && (cancelResult.getResultCode() ==
ResultCode.CANCELED))
@@ -1329,11 +1328,11 @@
{
try
{
- for (AbstractOperation o : operationsInProgress.values())
+ for (Operation o : operationsInProgress.values())
{
try
{
- o.abort(cancelRequest);
+ o.abort(cancelRequest);
// TODO: Assume its cancelled?
if (keepStats)
@@ -1361,7 +1360,7 @@
for (PersistentSearch persistentSearch : getPersistentSearches())
{
- DirectoryServer.deregisterPersistentSearch(persistentSearch);
+ persistentSearch.cancel();
}
}
catch (Exception e)
@@ -1400,7 +1399,7 @@
continue;
}
- AbstractOperation o = operationsInProgress.get(msgID);
+ Operation o = operationsInProgress.get(msgID);
if (o != null)
{
try
@@ -1429,7 +1428,7 @@
for (PersistentSearch persistentSearch : getPersistentSearches())
{
- DirectoryServer.deregisterPersistentSearch(persistentSearch);
+ persistentSearch.cancel();
lastCompletionTime.set(TimeThread.getTime());
}
}
--
Gitblit v1.10.0