directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r922271 - /directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
Date Fri, 12 Mar 2010 14:27:12 GMT
Author: kayyagari
Date: Fri Mar 12 14:27:11 2010
New Revision: 922271

URL: http://svn.apache.org/viewvc?rev=922271&view=rev
Log:
o fixed an issue of repeated invocation of abandon() after sending a AbandonRequest
o removed an unused variable
o removed the call to clearMaps() from abandonInternal() method (this shouldn't be called
from this method)

Modified:
    directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java?rev=922271&r1=922270&r2=922271&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
Fri Mar 12 14:27:11 2010
@@ -30,7 +30,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
@@ -192,10 +191,6 @@ public class LdapConnection extends IoHa
     /** a map to hold the ResponseFutures for all operations */
     private Map<Integer, ResponseFuture<? extends Response>> futureMap = new
ConcurrentHashMap<Integer, ResponseFuture<? extends Response>>();
 
-    /** a map to hold the response queues related to the operations */
-    private Map<Integer, BlockingQueue<? extends Response>> respQueueMap = 
-        new ConcurrentHashMap<Integer, BlockingQueue<? extends Response>>();
-
     /** list of controls supported by the server */
     private List<String> supportedControls;
 
@@ -288,7 +283,12 @@ public class LdapConnection extends IoHa
     private ResponseFuture<? extends Response> peekFromFutureMap( int messageId )
     {
         ResponseFuture<? extends Response> future = futureMap.get( messageId );
-        LOG.debug( "Getting <" + messageId + ", " + future.getClass().getName() + ">"
);
+        
+        // future can be null if there was a abandon operation on that messageId
+        if( future != null )
+        {
+            LOG.debug( "Getting <" + messageId + ", " + future.getClass().getName() +
">" );
+        }
         
         return future;
     }
@@ -937,15 +937,14 @@ public class LdapConnection extends IoHa
 
         ResponseFuture rf = getFromFutureMap( abandonId );
 
-        clearMaps();
-        
         // if the listener is not null, this is a async operation and no need to
         // send cancel signal on future, sending so will leave a dangling poision object
in the corresponding queue
         // this is a sync operation send cancel signal to the corresponding ResponseFuture
         if ( rf != null )
         {
-            LOG.debug( "sending cancel signal to future" );
-            rf.cancel( true );
+            // no need to call cancel on future cause the future inturn calls LdapConnection.abandon(
messageId )
+            //LOG.debug( "sending cancel signal to future" );
+            //rf.cancel( true );
         }
         else
         {



Mime
View raw message