qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject [qpid-broker-j] 01/07: QPID-8318 : Queue.Purge does not return deleted count
Date Tue, 18 Jun 2019 09:16:54 GMT
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git

commit 81460187b6e4d969a380b6abdb5961d9a29f307f
Author: rgodfrey <rgodfrey@apache.org>
AuthorDate: Mon May 27 11:26:45 2019 +0200

    QPID-8318 : Queue.Purge does not return deleted count
    
    (cherry picked from commit 9ded8dbcc69cd3ae07d095c05ad29ee6db3dfbd5)
---
 .../main/java/org/apache/qpid/server/queue/AbstractQueue.java | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java b/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
index d0f2f30..375732b 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
@@ -1748,20 +1748,13 @@ public abstract class AbstractQueue<X extends AbstractQueue<X>>
         while (queueListIterator.advance())
         {
             final QueueEntry node = queueListIterator.getNode();
-            boolean acquired = node.acquireOrSteal(new Runnable()
-                                                    {
-                                                        @Override
-                                                        public void run()
-                                                        {
-                                                            dequeueEntry(node);
-                                                        }
-                                                    });
+            boolean acquired = node.acquireOrSteal(() -> dequeueEntry(node));
 
             if (acquired)
             {
                 dequeueEntry(node, txn);
+                count++;
             }
-
         }
 
         txn.commit();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message