summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorRobert Godfrey <rgodfrey@apache.org>2014-04-28 15:45:08 +0000
committerRobert Godfrey <rgodfrey@apache.org>2014-04-28 15:45:08 +0000
commit80fcc568bbf013690af4d54925b46892461832a2 (patch)
treed88c8a647b63df3ae30e07b0bf3ca8dd644a57b4 /qpid/java
parentad2f94b4caabb7e222d136bc15b1cee528a73e31 (diff)
downloadqpid-python-80fcc568bbf013690af4d54925b46892461832a2.tar.gz
QPID-5679 : Address review comments from Alex Rudyy
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1590686 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java3
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AMQQueue.java56
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java24
3 files changed, 15 insertions, 68 deletions
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
index 73fc59e057..3c2763575f 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
@@ -514,8 +514,7 @@ public abstract class AbstractConfiguredObject<X extends ConfiguredObject<X>> im
}
}
- public void
- validate()
+ public void validate()
{
}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AMQQueue.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
index f516013c2d..4b59a0d923 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
@@ -46,43 +46,24 @@ public interface AMQQueue<X extends AMQQueue<X>>
void removeBinding(BindingImpl binding);
+ @Override
Collection<BindingImpl> getBindings();
- int getBindingCount();
-
LogSubject getLogSubject();
- long getUnacknowledgedBytes();
-
- long getTotalDequeuedMessages();
-
- long getTotalEnqueuedMessages();
-
VirtualHostImpl getVirtualHost();
+ @Override
public Collection<QueueConsumer<?>> getConsumers();
- int getConsumerCount();
-
- int getConsumerCountWithCredit();
-
- boolean hasExclusiveConsumer();
-
boolean isUnused();
boolean isEmpty();
- int getQueueDepthMessages();
-
-
- long getQueueDepthBytes();
-
long getOldestMessageArrivalTime();
boolean isDeleted();
- int delete();
-
void requeue(QueueEntry entry);
void dequeue(QueueEntry entry);
@@ -110,8 +91,6 @@ public interface AMQQueue<X extends AMQQueue<X>>
*/
public List<? extends QueueEntry> getMessagesRangeOnTheQueue(final long fromPosition, final long toPosition);
- void visit(QueueEntryVisitor visitor);
-
long clearQueue();
/**
@@ -126,39 +105,8 @@ public interface AMQQueue<X extends AMQQueue<X>>
void stop();
Collection<String> getAvailableAttributes();
- Object getAttribute(String attrName);
-
- /**
- * Gets the maximum delivery count. If a message on this queue
- * is delivered more than maximumDeliveryCount, the message will be
- * routed to the {@link #getAlternateExchange()} (if set), or otherwise
- * discarded. 0 indicates that maximum deliver count should not be enforced.
- *
- * @return maximum delivery count
- */
- int getMaximumDeliveryAttempts();
-
- /**
- * Sets the maximum delivery count.
- *
- * @param maximumDeliveryCount maximum delivery count
- */
- public void setMaximumDeliveryAttempts(final int maximumDeliveryCount);
void setNotificationListener(QueueNotificationListener listener);
- long getPersistentDequeuedBytes();
-
- long getPersistentDequeuedMessages();
-
- long getPersistentEnqueuedBytes();
-
- long getPersistentEnqueuedMessages();
-
- long getTotalDequeuedBytes();
-
- long getTotalEnqueuedBytes();
-
- long getUnacknowledgedMessages();
}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
index 9e1a350d73..041db03a09 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
@@ -171,7 +171,7 @@ public abstract class AbstractQueue<X extends AbstractQueue<X>>
@ManagedAttributeField
private ExclusivityPolicy _exclusive;
- private Object _exclusiveOwner; // could be connection, session or Principal
+ private Object _exclusiveOwner; // could be connection, session, Principal or a String for the container name
private final Set<NotificationCheck> _notificationChecks =
Collections.synchronizedSet(EnumSet.noneOf(NotificationCheck.class));
@@ -245,6 +245,16 @@ public abstract class AbstractQueue<X extends AbstractQueue<X>>
}
}
+ @Override
+ public void validate()
+ {
+ super.validate();
+ if (_queueFlowResumeSizeBytes > _queueFlowControlSizeBytes)
+ {
+ throw new IllegalConfigurationException("Flow resume size can't be greater than flow control size");
+ }
+ }
+
protected void onOpen()
{
super.onOpen();
@@ -360,11 +370,6 @@ public abstract class AbstractQueue<X extends AbstractQueue<X>>
}
- if (_queueFlowResumeSizeBytes > _queueFlowControlSizeBytes)
- {
- throw new IllegalConfigurationException("Flow resume size can't be greater than flow control size");
- }
-
// Log the creation of this Queue.
// The priorities display is toggled on if we set priorities > 0
getEventLogger().message(_logSubject,
@@ -1256,7 +1261,7 @@ public abstract class AbstractQueue<X extends AbstractQueue<X>>
return _atomicQueueSize;
}
- public boolean hasExclusiveConsumer()
+ private boolean hasExclusiveConsumer()
{
return _exclusiveSubscriber != null;
}
@@ -2207,11 +2212,6 @@ public abstract class AbstractQueue<X extends AbstractQueue<X>>
return _maximumDeliveryAttempts;
}
- public void setMaximumDeliveryAttempts(final int maximumDeliveryAttempts)
- {
- _maximumDeliveryAttempts = maximumDeliveryAttempts;
- }
-
/**
* Checks if there is any notification to send to the listeners
*/