public abstract class AbstractQueue<X extends AbstractQueue<X>> extends AbstractConfiguredObject<X> implements AMQQueue<X>, StateChangeListener<QueueConsumer<?>,State>, MessageGroupManager.ConsumerResetHelper
Modifier and Type | Class and Description |
---|---|
static class |
AbstractQueue.MessageContent |
static interface |
AbstractQueue.QueueEntryFilter |
AbstractConfiguredObject.CallableWithArgument<V,A>, AbstractConfiguredObject.ChainedListenableFuture<V>, AbstractConfiguredObject.ChainedSettableFuture<V>, AbstractConfiguredObject.DuplicateIdException, AbstractConfiguredObject.DuplicateNameException
MessageSource.ConsumerAccessRefused, MessageSource.ExistingConsumerPreventsExclusive, MessageSource.ExistingExclusiveConsumer
Modifier and Type | Field and Description |
---|---|
static String |
SHARED_MSG_GROUP_ARG_VALUE |
SECURED_STRING_VALUE
ALERT_REPEAT_GAP, ALERT_THRESHOLD_MESSAGE_AGE, ALERT_THRESHOLD_MESSAGE_SIZE, ALERT_THRESHOLD_QUEUE_DEPTH_BYTES, ALERT_THRESHOLD_QUEUE_DEPTH_MESSAGES, ALTERNATE_EXCHANGE, CLASS_DESCRIPTION, DEFAULT_ALERT_REPEAT_GAP, DEFAULT_ALERT_THRESHOLD_MESSAGE_AGE, DEFAULT_ALERT_THRESHOLD_MESSAGE_COUNT, DEFAULT_ALERT_THRESHOLD_MESSAGE_SIZE, DEFAULT_ALERT_THRESHOLD_QUEUE_DEPTH, DEFAULT_ESTIMATED_MESSAGE_MEMORY_OVERHEAD, DEFAULT_FILTERS, DEFAULT_FLOW_CONTROL_RESUME_SIZE_BYTES, DEFAULT_FLOW_CONTROL_SIZE_BYTES, DEFAULT_HOLD_ON_PUBLISH_ENABLED, DEFAULT_MAX_ASYNCHRONOUS_DELIVERIES, DEFAULT_MAXIMUM_DELIVERY_ATTEMPTS, DEFAULT_MAXIMUM_DISTINCT_GROUPS, DEFAULT_MINIMUM_ESTIMATED_MEMORY_FOOTPRINT, DEFAULT_SHARED_MESSAGE_GROUP, ENSURE_NONDESTRUCTIVE_CONSUMERS, EXCLUSIVE, HOLD_ON_PUBLISH_ENABLED, MAX_ASYNCHRONOUS_DELIVERIES, MAXIMUM_DELIVERY_ATTEMPTS, MAXIMUM_MESSAGE_TTL, MESSAGE_DURABILITY, MESSAGE_GROUP_DEFAULT_GROUP, MESSAGE_GROUP_KEY, MESSAGE_GROUP_SHARED_GROUPS, MINIMUM_MESSAGE_TTL, NO_LOCAL, OWNER, QUEUE_ESTIMATED_MESSAGE_MEMORY_OVERHEAD, QUEUE_FLOW_CONTROL_SIZE_BYTES, QUEUE_FLOW_RESUME_SIZE_BYTES, QUEUE_FLOW_STOPPED, QUEUE_MINIMUM_ESTIMATED_MEMORY_FOOTPRINT
CONTEXT, CREATED_BY, CREATED_TIME, DESCRIPTION, DESIRED_STATE, DURABLE, ID, LAST_UPDATED_BY, LAST_UPDATED_TIME, LIFETIME_POLICY, NAME, OVER_SIZED_ATTRIBUTE_ALTERNATIVE_TEXT, STATE, TYPE
Modifier | Constructor and Description |
---|---|
protected |
AbstractQueue(Map<String,Object> attributes,
VirtualHostImpl virtualHost) |
addChangeListener, applyToChildren, asObjectRecord, attainState, attributeSet, authoriseCreate, authoriseCreateChild, authoriseDelete, authoriseSetAttributes, changeAttributes, childAdded, childRemoved, close, closeAsync, closeChildren, create, createAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, deleted, doAfter, doAfter, doAfter, doAfter, doAfter, doAfter, doAfterAlways, doAfterAlways, doCreation, doOnConfigThread, doOpening, doResolution, doSync, doSync, doValidation, findConfiguredObject, forceUpdateAllSecureAttributes, getActualAttributes, getAttainedChildById, getAttainedChildByName, getAttribute, getAttributeNames, getCategoryClass, getChildById, getChildByName, getChildExecutor, getContext, getContextKeys, getContextValue, getContextValue, getCreatedBy, getCreatedTime, getDescription, getDesiredState, getId, getLastOpenedTime, getLastUpdatedBy, getLastUpdatedTime, getLifetimePolicy, getModel, getName, getObjectFactory, getParent, getSecurityManager, getState, getStatistics, getTaskExecutor, getType, getTypeClass, handleExceptionOnOpen, isDurable, managesChildStorage, notifyStateChanged, onExceptionInOpen, onResolve, open, openAsync, parentsMap, postResolve, postResolveChildren, registerWithParents, removeChangeListener, rethrowRuntimeExceptionsOnOpen, runTask, setAttribute, setAttributes, setAttributesAsync, setEncrypter, setState, start, startAsync, stop, validateOnCreate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addChangeListener, asObjectRecord, close, closeAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, findConfiguredObject, getActualAttributes, getAttainedChildById, getAttainedChildByName, getAttribute, getAttributeNames, getCategoryClass, getChildById, getChildByName, getChildExecutor, getContext, getContextKeys, getContextValue, getContextValue, getCreatedBy, getCreatedTime, getDescription, getDesiredState, getId, getLastOpenedTime, getLastUpdatedBy, getLastUpdatedTime, getLifetimePolicy, getModel, getName, getObjectFactory, getParent, getState, getStatistics, getTaskExecutor, getType, getTypeClass, isDurable, managesChildStorage, open, openAsync, removeChangeListener, setAttribute, setAttributes, setAttributesAsync
getId
getName
public static final String SHARED_MSG_GROUP_ARG_VALUE
protected AbstractQueue(Map<String,Object> attributes, VirtualHostImpl virtualHost)
protected void onCreate()
onCreate
in class AbstractConfiguredObject<X extends AbstractQueue<X>>
public void onValidate()
AbstractConfiguredObject
onValidate
in class AbstractConfiguredObject<X extends AbstractQueue<X>>
protected void onOpen()
onOpen
in class AbstractConfiguredObject<X extends AbstractQueue<X>>
protected LogMessage getCreatedLogMessage()
public void execute(String name, Runnable runnable, AccessControlContext context)
public boolean isExclusive()
isExclusive
in interface AMQQueue<X extends AbstractQueue<X>>
public Exchange<?> getAlternateExchange()
getAlternateExchange
in interface Queue<X extends AbstractQueue<X>>
public void setAlternateExchange(ExchangeImpl exchange)
public Map<String,Map<String,List<String>>> getDefaultFilters()
getDefaultFilters
in interface Queue<X extends AbstractQueue<X>>
public final MessageDurability getMessageDurability()
getMessageDurability
in interface Queue<X extends AbstractQueue<X>>
getMessageDurability
in interface TransactionLogResource
public long getMinimumMessageTtl()
getMinimumMessageTtl
in interface Queue<X extends AbstractQueue<X>>
public long getMaximumMessageTtl()
getMaximumMessageTtl
in interface Queue<X extends AbstractQueue<X>>
public boolean isEnsureNondestructiveConsumers()
isEnsureNondestructiveConsumers
in interface Queue<X extends AbstractQueue<X>>
public boolean isHoldOnPublishEnabled()
isHoldOnPublishEnabled
in interface Queue<X extends AbstractQueue<X>>
public Collection<String> getAvailableAttributes()
getAvailableAttributes
in interface AMQQueue<X extends AbstractQueue<X>>
public String getOwner()
getOwner
in interface Queue<X extends AbstractQueue<X>>
public VirtualHostImpl getVirtualHost()
getVirtualHost
in interface AMQQueue<X extends AbstractQueue<X>>
public org.apache.qpid.server.queue.QueueConsumerImpl addConsumer(ConsumerTarget target, FilterManager filters, Class<? extends ServerMessage> messageClass, String consumerName, EnumSet<ConsumerImpl.Option> optionSet) throws MessageSource.ExistingExclusiveConsumer, MessageSource.ExistingConsumerPreventsExclusive, MessageSource.ConsumerAccessRefused
addConsumer
in interface MessageSource
MessageSource.ExistingExclusiveConsumer
MessageSource.ExistingConsumerPreventsExclusive
MessageSource.ConsumerAccessRefused
protected com.google.common.util.concurrent.ListenableFuture<Void> beforeClose()
beforeClose
in class AbstractConfiguredObject<X extends AbstractQueue<X>>
public Collection<QueueConsumer<?>> getConsumers()
getConsumers
in interface MessageSource
getConsumers
in interface Queue<X extends AbstractQueue<X>>
getConsumers
in interface AMQQueue<X extends AbstractQueue<X>>
public void resetSubPointersForGroups(QueueConsumer<?> consumer)
public void resetSubPointersForGroups(QueueEntry entry)
resetSubPointersForGroups
in interface MessageGroupManager.ConsumerResetHelper
public void addBinding(BindingImpl binding)
addBinding
in interface AMQQueue<X extends AbstractQueue<X>>
public void removeBinding(BindingImpl binding)
removeBinding
in interface AMQQueue<X extends AbstractQueue<X>>
public Collection<BindingImpl> getBindings()
getBindings
in interface Queue<X extends AbstractQueue<X>>
getBindings
in interface AMQQueue<X extends AbstractQueue<X>>
public int getBindingCount()
getBindingCount
in interface Queue<X extends AbstractQueue<X>>
public LogSubject getLogSubject()
getLogSubject
in interface AMQQueue<X extends AbstractQueue<X>>
public final void enqueue(ServerMessage message, Action<? super MessageInstance> action, MessageEnqueueRecord enqueueRecord)
public final void recover(ServerMessage message, MessageEnqueueRecord enqueueRecord)
recover
in interface AMQQueue<X extends AbstractQueue<X>>
public final void completeRecovery()
completeRecovery
in interface AMQQueue<X extends AbstractQueue<X>>
protected void doEnqueue(ServerMessage message, Action<? super MessageInstance> action, MessageEnqueueRecord enqueueRecord)
protected void checkConsumersNotAheadOfDelivery(QueueEntry entry)
public void setTargetSize(long targetSize)
setTargetSize
in interface AMQQueue<X extends AbstractQueue<X>>
public long getTotalDequeuedMessages()
getTotalDequeuedMessages
in interface Queue<X extends AbstractQueue<X>>
public long getTotalEnqueuedMessages()
getTotalEnqueuedMessages
in interface Queue<X extends AbstractQueue<X>>
public void requeue(QueueEntry entry)
requeue
in interface AMQQueue<X extends AbstractQueue<X>>
public void dequeue(QueueEntry entry)
dequeue
in interface AMQQueue<X extends AbstractQueue<X>>
public boolean resend(QueueEntry entry, QueueConsumer<?> consumer)
resend
in interface AMQQueue<X extends AbstractQueue<X>>
public int getConsumerCount()
getConsumerCount
in interface Queue<X extends AbstractQueue<X>>
public int getConsumerCountWithCredit()
getConsumerCountWithCredit
in interface Queue<X extends AbstractQueue<X>>
public boolean isUnused()
isUnused
in interface AMQQueue<X extends AbstractQueue<X>>
public boolean isEmpty()
isEmpty
in interface AMQQueue<X extends AbstractQueue<X>>
public int getQueueDepthMessages()
getQueueDepthMessages
in interface Queue<X extends AbstractQueue<X>>
public long getQueueDepthBytes()
getQueueDepthBytes
in interface Queue<X extends AbstractQueue<X>>
public int getUndeliveredMessageCount()
public long getReceivedMessageCount()
public long getOldestMessageArrivalTime()
getOldestMessageArrivalTime
in interface AMQQueue<X extends AbstractQueue<X>>
public long getOldestMessageAge()
getOldestMessageAge
in interface Queue<X extends AbstractQueue<X>>
public boolean isDeleted()
public List<QueueEntry> getMessagesOnTheQueue()
getMessagesOnTheQueue
in interface AMQQueue<X extends AbstractQueue<X>>
public void stateChanged(QueueConsumer<?> sub, State oldState, State newState)
stateChanged
in interface StateChangeListener<QueueConsumer<?>,State>
public int compareTo(AMQQueue o)
compareTo
in interface Comparable<AMQQueue>
public AtomicInteger getAtomicQueueCount()
public AtomicLong getAtomicQueueSize()
protected org.apache.qpid.server.queue.QueueConsumerList getConsumerList()
public EventLogger getEventLogger()
public List<QueueEntry> getMessagesOnTheQueue(long fromMessageId, long toMessageId)
public QueueEntry getMessageOnTheQueue(long messageId)
getMessageOnTheQueue
in interface AMQQueue<X extends AbstractQueue<X>>
public List<QueueEntry> getMessagesOnTheQueue(AbstractQueue.QueueEntryFilter filter)
public void visit(QueueEntryVisitor visitor)
visit
in interface Queue<X extends AbstractQueue<X>>
public List<QueueEntry> getMessagesRangeOnTheQueue(long fromPosition, long toPosition)
getMessagesRangeOnTheQueue
in interface AMQQueue<X extends AbstractQueue<X>>
fromPosition
- first message positiontoPosition
- last message positionpublic long clearQueue()
clearQueue
in interface Queue<X extends AbstractQueue<X>>
clearQueue
in interface AMQQueue<X extends AbstractQueue<X>>
public void addDeleteTask(Action<? super AMQQueue> task)
addDeleteTask
in interface Deletable<AMQQueue>
public void removeDeleteTask(Action<? super AMQQueue> task)
removeDeleteTask
in interface Deletable<AMQQueue>
public com.google.common.util.concurrent.ListenableFuture<Integer> deleteAndReturnCount()
deleteAndReturnCount
in interface Queue<X extends AbstractQueue<X>>
protected void onClose()
onClose
in class AbstractConfiguredObject<X extends AbstractQueue<X>>
public void checkCapacity(AMQSessionModel channel)
checkCapacity
in interface CapacityChecker
public void deliverAsync()
deliverAsync
in interface AMQQueue<X extends AbstractQueue<X>>
protected void advanceAllConsumers()
public boolean isEntryAheadOfConsumer(QueueEntry entry, QueueConsumer<?> sub)
isEntryAheadOfConsumer
in interface MessageGroupManager.ConsumerResetHelper
public long processQueue(QueueRunner runner)
runner
- the Runner to schedulepublic void checkMessageStatus()
AMQQueue
checkMessageStatus
in interface AMQQueue<X extends AbstractQueue<X>>
public long getPotentialMemoryFootprint()
getPotentialMemoryFootprint
in interface AMQQueue<X extends AbstractQueue<X>>
public long getAlertRepeatGap()
getAlertRepeatGap
in interface Queue<X extends AbstractQueue<X>>
public long getAlertThresholdMessageAge()
getAlertThresholdMessageAge
in interface Queue<X extends AbstractQueue<X>>
public long getAlertThresholdQueueDepthMessages()
getAlertThresholdQueueDepthMessages
in interface Queue<X extends AbstractQueue<X>>
public long getAlertThresholdQueueDepthBytes()
getAlertThresholdQueueDepthBytes
in interface Queue<X extends AbstractQueue<X>>
public long getAlertThresholdMessageSize()
getAlertThresholdMessageSize
in interface Queue<X extends AbstractQueue<X>>
public long getQueueFlowControlSizeBytes()
getQueueFlowControlSizeBytes
in interface Queue<X extends AbstractQueue<X>>
public long getQueueFlowResumeSizeBytes()
getQueueFlowResumeSizeBytes
in interface Queue<X extends AbstractQueue<X>>
public Set<NotificationCheck> getNotificationChecks()
getNotificationChecks
in interface AMQQueue<X extends AbstractQueue<X>>
public List<Long> getMessagesOnTheQueue(int num)
getMessagesOnTheQueue
in interface AMQQueue<X extends AbstractQueue<X>>
public List<Long> getMessagesOnTheQueue(int num, int offset)
getMessagesOnTheQueue
in interface AMQQueue<X extends AbstractQueue<X>>
public long getTotalEnqueuedBytes()
getTotalEnqueuedBytes
in interface Queue<X extends AbstractQueue<X>>
public long getTotalDequeuedBytes()
getTotalDequeuedBytes
in interface Queue<X extends AbstractQueue<X>>
public long getPersistentEnqueuedBytes()
getPersistentEnqueuedBytes
in interface Queue<X extends AbstractQueue<X>>
public long getPersistentDequeuedBytes()
getPersistentDequeuedBytes
in interface Queue<X extends AbstractQueue<X>>
public long getPersistentEnqueuedMessages()
getPersistentEnqueuedMessages
in interface Queue<X extends AbstractQueue<X>>
public long getPersistentDequeuedMessages()
getPersistentDequeuedMessages
in interface Queue<X extends AbstractQueue<X>>
public boolean isHeld(QueueEntry queueEntry, long evaluationTime)
isHeld
in interface Queue<X extends AbstractQueue<X>>
public String toString()
toString
in class AbstractConfiguredObject<X extends AbstractQueue<X>>
public long getUnacknowledgedMessages()
getUnacknowledgedMessages
in interface Queue<X extends AbstractQueue<X>>
public long getUnacknowledgedBytes()
getUnacknowledgedBytes
in interface Queue<X extends AbstractQueue<X>>
public void decrementUnackedMsgCount(QueueEntry queueEntry)
decrementUnackedMsgCount
in interface AMQQueue<X extends AbstractQueue<X>>
public void incrementUnackedMsgCount(QueueEntry entry)
incrementUnackedMsgCount
in interface AMQQueue<X extends AbstractQueue<X>>
public int getMaximumDeliveryAttempts()
getMaximumDeliveryAttempts
in interface Queue<X extends AbstractQueue<X>>
public void setNotificationListener(QueueNotificationListener listener)
setNotificationListener
in interface Queue<X extends AbstractQueue<X>>
setNotificationListener
in interface AMQQueue<X extends AbstractQueue<X>>
public final <M extends ServerMessage<? extends StorableMessageMetaData>> int send(M message, String routingAddress, InstanceProperties instanceProperties, ServerTransaction txn, Action<? super MessageInstance> postEnqueueAction)
MessageDestination
send
in interface MessageDestination
message
- the message to be routedinstanceProperties
- the instance propertiestxn
- the transaction to enqueue withinpostEnqueueAction
- action to perform on the result of every enqueue (may be null)public boolean verifySessionAccess(AMQSessionModel<?> session)
verifySessionAccess
in interface MessageSource
public ExclusivityPolicy getExclusive()
getExclusive
in interface Queue<X extends AbstractQueue<X>>
public boolean isNoLocal()
isNoLocal
in interface Queue<X extends AbstractQueue<X>>
public String getMessageGroupKey()
getMessageGroupKey
in interface Queue<X extends AbstractQueue<X>>
public boolean isMessageGroupSharedGroups()
isMessageGroupSharedGroups
in interface Queue<X extends AbstractQueue<X>>
public String getMessageGroupDefaultGroup()
getMessageGroupDefaultGroup
in interface Queue<X extends AbstractQueue<X>>
public int getMaximumDistinctGroups()
getMaximumDistinctGroups
in interface Queue<X extends AbstractQueue<X>>
public boolean isQueueFlowStopped()
isQueueFlowStopped
in interface Queue<X extends AbstractQueue<X>>
public <C extends ConfiguredObject> Collection<C> getChildren(Class<C> clazz)
ConfiguredObject
getChildren
in interface ConfiguredObject<X extends AbstractQueue<X>>
getChildren
in class AbstractConfiguredObject<X extends AbstractQueue<X>>
clazz
- the class of the children to returnprotected <C extends ConfiguredObject> com.google.common.util.concurrent.ListenableFuture<C> addChildAsync(Class<C> childClass, Map<String,Object> attributes, ConfiguredObject... otherParents)
addChildAsync
in class AbstractConfiguredObject<X extends AbstractQueue<X>>
public boolean changeAttribute(String name, Object expected, Object desired) throws IllegalStateException, AccessControlException, IllegalArgumentException
changeAttribute
in class AbstractConfiguredObject<X extends AbstractQueue<X>>
IllegalStateException
AccessControlException
IllegalArgumentException
protected void validateChange(ConfiguredObject<?> proxyForValidation, Set<String> changedAttributes)
validateChange
in class AbstractConfiguredObject<X extends AbstractQueue<X>>
public List<Long> moveMessages(Queue<?> destination, List<Long> messageIds, String selector, int limit)
moveMessages
in interface Queue<X extends AbstractQueue<X>>
public List<Long> copyMessages(Queue<?> destination, List<Long> messageIds, String selector, int limit)
copyMessages
in interface Queue<X extends AbstractQueue<X>>
public List<Long> deleteMessages(List<Long> messageIds, String selector, int limit)
deleteMessages
in interface Queue<X extends AbstractQueue<X>>
public Content getMessageContent(long messageId)
getMessageContent
in interface Queue<X extends AbstractQueue<X>>
public List<MessageInfo> getMessageInfo(int first, int last)
getMessageInfo
in interface Queue<X extends AbstractQueue<X>>
public MessageInfo getMessageInfoById(long messageId)
getMessageInfoById
in interface Queue<X extends AbstractQueue<X>>
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.