qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject qpid-broker-j git commit: QPID-7889: Make use of generics for MessageInstanceConsumer fps/rvs within MessageInstance uniform. No functional change.
Date Wed, 16 Aug 2017 10:02:36 GMT
Repository: qpid-broker-j
Updated Branches:
  refs/heads/master 764d9b16d -> 1c26b4543


QPID-7889: Make use of generics for MessageInstanceConsumer fps/rvs within MessageInstance
uniform. No functional change.


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/1c26b454
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/1c26b454
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/1c26b454

Branch: refs/heads/master
Commit: 1c26b4543ff8c2df4da444f847fbbbfcbccd900c
Parents: 764d9b1
Author: Keith Wall <kwall@apache.org>
Authored: Wed Aug 16 11:00:53 2017 +0100
Committer: Keith Wall <kwall@apache.org>
Committed: Wed Aug 16 11:01:39 2017 +0100

----------------------------------------------------------------------
 .../apache/qpid/server/message/MessageInstance.java   | 12 ++++++------
 .../apache/qpid/server/queue/LastValueQueueList.java  |  2 +-
 .../org/apache/qpid/server/queue/QueueEntryImpl.java  | 14 +++++++-------
 .../virtualhost/AbstractSystemMessageSource.java      | 12 ++++++------
 .../apache/qpid/server/queue/MockMessageInstance.java | 12 ++++++------
 .../apache/qpid/server/queue/StandardQueueTest.java   |  6 +++---
 .../qpid/server/management/amqp/ManagementNode.java   | 12 ++++++------
 .../server/management/amqp/ManagementResponse.java    | 12 ++++++------
 8 files changed, 41 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c26b454/broker-core/src/main/java/org/apache/qpid/server/message/MessageInstance.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/message/MessageInstance.java
b/broker-core/src/main/java/org/apache/qpid/server/message/MessageInstance.java
index 45e5807..d077d0c 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/message/MessageInstance.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/message/MessageInstance.java
@@ -49,9 +49,9 @@ public interface MessageInstance
 
     boolean acquiredByConsumer();
 
-    boolean isAcquiredBy(MessageInstanceConsumer consumer);
+    boolean isAcquiredBy(MessageInstanceConsumer<?> consumer);
 
-    boolean removeAcquisitionFromConsumer(MessageInstanceConsumer consumer);
+    boolean removeAcquisitionFromConsumer(MessageInstanceConsumer<?> consumer);
 
     void setRedelivered();
 
@@ -59,15 +59,15 @@ public interface MessageInstance
 
     void reject(final MessageInstanceConsumer<?> consumer);
 
-    boolean isRejectedBy(MessageInstanceConsumer consumer);
+    boolean isRejectedBy(MessageInstanceConsumer<?> consumer);
 
     boolean getDeliveredToConsumer();
 
     boolean expired();
 
-    boolean acquire(MessageInstanceConsumer sub);
+    boolean acquire(MessageInstanceConsumer<?> consumer);
 
-    boolean makeAcquisitionUnstealable(final MessageInstanceConsumer consumer);
+    boolean makeAcquisitionUnstealable(final MessageInstanceConsumer<?> consumer);
 
     boolean makeAcquisitionStealable();
 
@@ -251,7 +251,7 @@ public interface MessageInstance
 
     void release();
 
-    void release(MessageInstanceConsumer release);
+    void release(MessageInstanceConsumer<?> consumer);
 
     void delete();
 

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c26b454/broker-core/src/main/java/org/apache/qpid/server/queue/LastValueQueueList.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/queue/LastValueQueueList.java
b/broker-core/src/main/java/org/apache/qpid/server/queue/LastValueQueueList.java
index 39ab89c..1fb2adb 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/queue/LastValueQueueList.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/queue/LastValueQueueList.java
@@ -226,7 +226,7 @@ public class LastValueQueueList extends OrderedQueueEntryList
         }
 
         @Override
-        public void release(MessageInstanceConsumer consumer)
+        public void release(MessageInstanceConsumer<?> consumer)
         {
             super.release(consumer);
 

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c26b454/broker-core/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java b/broker-core/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java
index a2b43a9..a125078 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java
@@ -327,9 +327,9 @@ public abstract class QueueEntryImpl implements QueueEntry
     }
 
     @Override
-    public boolean acquire(MessageInstanceConsumer sub)
+    public boolean acquire(MessageInstanceConsumer<?> consumer)
     {
-        final boolean acquired = acquire(((QueueConsumer<?,?>) sub).getOwningState().getUnstealableState());
+        final boolean acquired = acquire(((QueueConsumer<?,?>) consumer).getOwningState().getUnstealableState());
         if(acquired)
         {
             _deliveryCountUpdater.compareAndSet(this,-1,0);
@@ -338,7 +338,7 @@ public abstract class QueueEntryImpl implements QueueEntry
     }
 
     @Override
-    public boolean makeAcquisitionUnstealable(final MessageInstanceConsumer consumer)
+    public boolean makeAcquisitionUnstealable(final MessageInstanceConsumer<?> consumer)
     {
         EntryState state = _state;
         if(state instanceof StealableConsumerAcquiredState
@@ -396,14 +396,14 @@ public abstract class QueueEntryImpl implements QueueEntry
     }
 
     @Override
-    public boolean isAcquiredBy(MessageInstanceConsumer consumer)
+    public boolean isAcquiredBy(MessageInstanceConsumer<?> consumer)
     {
         EntryState state = _state;
         return (state instanceof ConsumerAcquiredState && ((ConsumerAcquiredState)state).getConsumer()
== consumer);
     }
 
     @Override
-    public boolean removeAcquisitionFromConsumer(MessageInstanceConsumer consumer)
+    public boolean removeAcquisitionFromConsumer(MessageInstanceConsumer<?> consumer)
     {
         EntryState state = _state;
         if(state instanceof StealableConsumerAcquiredState
@@ -434,7 +434,7 @@ public abstract class QueueEntryImpl implements QueueEntry
     }
 
     @Override
-    public void release(MessageInstanceConsumer consumer)
+    public void release(MessageInstanceConsumer<?> consumer)
     {
         EntryState state = _state;
         if(isAcquiredBy(consumer) && _stateUpdater.compareAndSet(this, state, AVAILABLE_STATE))
@@ -509,7 +509,7 @@ public abstract class QueueEntryImpl implements QueueEntry
     }
 
     @Override
-    public boolean isRejectedBy(MessageInstanceConsumer consumer)
+    public boolean isRejectedBy(MessageInstanceConsumer<?> consumer)
     {
         return _rejectedBy != null && _rejectedBy.contains(consumer.getIdentifier());
     }

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c26b454/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractSystemMessageSource.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractSystemMessageSource.java
b/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractSystemMessageSource.java
index e9b53be..24e19f5 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractSystemMessageSource.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractSystemMessageSource.java
@@ -272,13 +272,13 @@ public abstract class AbstractSystemMessageSource implements MessageSource
         }
 
         @Override
-        public boolean isAcquiredBy(final MessageInstanceConsumer consumer)
+        public boolean isAcquiredBy(final MessageInstanceConsumer<?> consumer)
         {
             return consumer == _consumer && !isDeleted();
         }
 
         @Override
-        public boolean removeAcquisitionFromConsumer(final MessageInstanceConsumer consumer)
+        public boolean removeAcquisitionFromConsumer(final MessageInstanceConsumer<?>
consumer)
         {
             return consumer == _consumer;
         }
@@ -302,7 +302,7 @@ public abstract class AbstractSystemMessageSource implements MessageSource
         }
 
         @Override
-        public boolean isRejectedBy(final MessageInstanceConsumer consumer)
+        public boolean isRejectedBy(final MessageInstanceConsumer<?> consumer)
         {
             return false;
         }
@@ -320,13 +320,13 @@ public abstract class AbstractSystemMessageSource implements MessageSource
         }
 
         @Override
-        public boolean acquire(final MessageInstanceConsumer sub)
+        public boolean acquire(final MessageInstanceConsumer<?> consumer)
         {
             return false;
         }
 
         @Override
-        public boolean makeAcquisitionUnstealable(final MessageInstanceConsumer consumer)
+        public boolean makeAcquisitionUnstealable(final MessageInstanceConsumer<?>
consumer)
         {
             return false;
         }
@@ -382,7 +382,7 @@ public abstract class AbstractSystemMessageSource implements MessageSource
         }
 
         @Override
-        public void release(MessageInstanceConsumer consumer)
+        public void release(MessageInstanceConsumer<?> consumer)
         {
             release();
         }

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c26b454/broker-core/src/test/java/org/apache/qpid/server/queue/MockMessageInstance.java
----------------------------------------------------------------------
diff --git a/broker-core/src/test/java/org/apache/qpid/server/queue/MockMessageInstance.java
b/broker-core/src/test/java/org/apache/qpid/server/queue/MockMessageInstance.java
index 57c1d12..4b8f537 100644
--- a/broker-core/src/test/java/org/apache/qpid/server/queue/MockMessageInstance.java
+++ b/broker-core/src/test/java/org/apache/qpid/server/queue/MockMessageInstance.java
@@ -75,13 +75,13 @@ public class MockMessageInstance implements MessageInstance
     }
 
     @Override
-    public boolean isAcquiredBy(final MessageInstanceConsumer consumer)
+    public boolean isAcquiredBy(final MessageInstanceConsumer<?> consumer)
     {
         return false;
     }
 
     @Override
-    public boolean removeAcquisitionFromConsumer(final MessageInstanceConsumer consumer)
+    public boolean removeAcquisitionFromConsumer(final MessageInstanceConsumer<?> consumer)
     {
         return false;
     }
@@ -99,13 +99,13 @@ public class MockMessageInstance implements MessageInstance
     }
 
     @Override
-    public boolean acquire(final MessageInstanceConsumer sub)
+    public boolean acquire(final MessageInstanceConsumer<?> consumer)
     {
         return false;
     }
 
     @Override
-    public boolean makeAcquisitionUnstealable(final MessageInstanceConsumer consumer)
+    public boolean makeAcquisitionUnstealable(final MessageInstanceConsumer<?> consumer)
     {
         return false;
     }
@@ -151,7 +151,7 @@ public class MockMessageInstance implements MessageInstance
     }
 
     @Override
-    public boolean isRejectedBy(final MessageInstanceConsumer consumer)
+    public boolean isRejectedBy(final MessageInstanceConsumer<?> consumer)
     {
         return false;
     }
@@ -163,7 +163,7 @@ public class MockMessageInstance implements MessageInstance
     }
 
     @Override
-    public void release(final MessageInstanceConsumer release)
+    public void release(final MessageInstanceConsumer<?> consumer)
     {
     }
 

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c26b454/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueTest.java
----------------------------------------------------------------------
diff --git a/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueTest.java
b/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueTest.java
index 3e850ac..625bc50 100644
--- a/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueTest.java
+++ b/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueTest.java
@@ -279,7 +279,7 @@ public class StandardQueueTest extends AbstractQueueTestBase
         }
 
         @Override
-        public boolean acquire(MessageInstanceConsumer sub)
+        public boolean acquire(MessageInstanceConsumer<?> consumer)
         {
             if(_message.getMessageNumber() % 2 == 0)
             {
@@ -287,12 +287,12 @@ public class StandardQueueTest extends AbstractQueueTestBase
             }
             else
             {
-                return super.acquire(sub);
+                return super.acquire(consumer);
             }
         }
 
         @Override
-        public boolean makeAcquisitionUnstealable(final MessageInstanceConsumer consumer)
+        public boolean makeAcquisitionUnstealable(final MessageInstanceConsumer<?>
consumer)
         {
             return true;
         }

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c26b454/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNode.java
----------------------------------------------------------------------
diff --git a/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNode.java
b/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNode.java
index 0c2b456..f4e7b34 100644
--- a/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNode.java
+++ b/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNode.java
@@ -1660,13 +1660,13 @@ class ManagementNode implements MessageSource, MessageDestination,
BaseQueue
         }
 
         @Override
-        public boolean isAcquiredBy(final MessageInstanceConsumer consumer)
+        public boolean isAcquiredBy(final MessageInstanceConsumer<?> consumer)
         {
             return false;
         }
 
         @Override
-        public boolean removeAcquisitionFromConsumer(final MessageInstanceConsumer consumer)
+        public boolean removeAcquisitionFromConsumer(final MessageInstanceConsumer<?>
consumer)
         {
             return false;
         }
@@ -1690,7 +1690,7 @@ class ManagementNode implements MessageSource, MessageDestination, BaseQueue
         }
 
         @Override
-        public boolean isRejectedBy(final MessageInstanceConsumer consumer)
+        public boolean isRejectedBy(final MessageInstanceConsumer<?> consumer)
         {
             return false;
         }
@@ -1708,13 +1708,13 @@ class ManagementNode implements MessageSource, MessageDestination,
BaseQueue
         }
 
         @Override
-        public boolean acquire(final MessageInstanceConsumer sub)
+        public boolean acquire(final MessageInstanceConsumer<?> consumer)
         {
             return false;
         }
 
         @Override
-        public boolean makeAcquisitionUnstealable(final MessageInstanceConsumer consumer)
+        public boolean makeAcquisitionUnstealable(final MessageInstanceConsumer<?>
consumer)
         {
             return false;
         }
@@ -1770,7 +1770,7 @@ class ManagementNode implements MessageSource, MessageDestination, BaseQueue
         }
 
         @Override
-        public void release(final MessageInstanceConsumer release)
+        public void release(final MessageInstanceConsumer<?> consumer)
         {
 
         }

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c26b454/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementResponse.java
----------------------------------------------------------------------
diff --git a/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementResponse.java
b/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementResponse.java
index 9d06ed0..ad830ba 100644
--- a/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementResponse.java
+++ b/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementResponse.java
@@ -101,13 +101,13 @@ class ManagementResponse implements MessageInstance
     }
 
     @Override
-    public boolean isAcquiredBy(final MessageInstanceConsumer consumer)
+    public boolean isAcquiredBy(final MessageInstanceConsumer<?> consumer)
     {
         return consumer == _consumer && !isDeleted();
     }
 
     @Override
-    public boolean removeAcquisitionFromConsumer(final MessageInstanceConsumer consumer)
+    public boolean removeAcquisitionFromConsumer(final MessageInstanceConsumer<?> consumer)
     {
         return consumer == _consumer;
     }
@@ -131,7 +131,7 @@ class ManagementResponse implements MessageInstance
     }
 
     @Override
-    public boolean isRejectedBy(final MessageInstanceConsumer consumer)
+    public boolean isRejectedBy(final MessageInstanceConsumer<?> consumer)
     {
         return false;
     }
@@ -149,13 +149,13 @@ class ManagementResponse implements MessageInstance
     }
 
     @Override
-    public boolean acquire(final MessageInstanceConsumer sub)
+    public boolean acquire(final MessageInstanceConsumer<?> consumer)
     {
         return false;
     }
 
     @Override
-    public boolean makeAcquisitionUnstealable(final MessageInstanceConsumer consumer)
+    public boolean makeAcquisitionUnstealable(final MessageInstanceConsumer<?> consumer)
     {
         return false;
     }
@@ -211,7 +211,7 @@ class ManagementResponse implements MessageInstance
     }
 
     @Override
-    public void release(final MessageInstanceConsumer release)
+    public void release(final MessageInstanceConsumer<?> consumer)
     {
         release();
     }


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


Mime
View raw message