|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.broker.region.BaseDestination
org.apache.activemq.broker.region.Queue
public class Queue
The Queue is a List of MessageEntry objects that are dispatched to matching subscriptions.
| Field Summary | |
|---|---|
protected List<Subscription> |
consumers
|
protected static org.slf4j.Logger |
LOG
|
protected PendingMessageCursor |
messages
|
protected PendingList |
pagedInPendingDispatch
|
protected PendingList |
redeliveredWaitingDispatch
|
protected TaskRunnerFactory |
taskFactory
|
protected TaskRunner |
taskRunner
|
| Fields inherited from class org.apache.activemq.broker.region.BaseDestination |
|---|
blockedProducerWarningInterval, broker, brokerService, cursorMemoryHighWaterMark, deadLetterStrategy, DEFAULT_INACTIVE_TIMEOUT_BEFORE_GC, destination, destinationStatistics, EXPIRE_MESSAGE_PERIOD, expireMessagesPeriod, MAX_AUDIT_DEPTH, MAX_BROWSE_PAGE_SIZE, MAX_PAGE_SIZE, MAX_PRODUCERS_TO_AUDIT, memoryUsage, regionBroker, scheduler, store, storeUsageHighWaterMark, systemUsage, warnOnProducerFlowControl |
| Fields inherited from interface org.apache.activemq.broker.region.Destination |
|---|
DEFAULT_BLOCKED_PRODUCER_WARNING_INTERVAL, DEFAULT_DEAD_LETTER_STRATEGY |
| Constructor Summary | |
|---|---|
Queue(BrokerService brokerService,
ActiveMQDestination destination,
MessageStore store,
DestinationStatistics parentStats,
TaskRunnerFactory taskFactory)
|
|
| Method Summary | |
|---|---|
void |
acknowledge(ConnectionContext context,
Subscription sub,
MessageAck ack,
MessageReference node)
|
void |
addSubscription(ConnectionContext context,
Subscription sub)
|
protected void |
assignGroup(Subscription subs,
MessageGroupMap messageGroupOwners,
MessageReference n,
String groupId)
|
protected boolean |
assignMessageGroup(Subscription subscription,
QueueMessageReference node)
|
Message[] |
browse()
|
void |
clearPendingMessages()
|
int |
copyMatchingMessages(ConnectionContext context,
MessageReferenceFilter filter,
ActiveMQDestination dest,
int maximumMessages)
Copies the messages matching the given filter up to the maximum number of matched messages |
int |
copyMatchingMessagesTo(ConnectionContext context,
String selector,
ActiveMQDestination dest)
Copies the messages matching the given selector |
int |
copyMatchingMessagesTo(ConnectionContext context,
String selector,
ActiveMQDestination dest,
int maximumMessages)
Copies the messages matching the given selector up to the maximum number of matched messages |
boolean |
copyMessageTo(ConnectionContext context,
String messageId,
ActiveMQDestination dest)
Copies the message matching the given messageId |
protected MessageReferenceFilter |
createMessageIdFilter(String messageId)
|
protected MessageReferenceFilter |
createSelectorFilter(String selector)
|
void |
doBrowse(List<Message> browseList,
int max)
|
void |
gc()
|
ActiveMQDestination |
getActiveMQDestination()
|
List<Subscription> |
getConsumers()
|
int |
getConsumersBeforeDispatchStarts()
|
DispatchPolicy |
getDispatchPolicy()
|
protected org.slf4j.Logger |
getLog()
|
QueueMessageReference |
getMessage(String id)
|
MessageGroupMapFactory |
getMessageGroupMapFactory()
|
MessageGroupMap |
getMessageGroupOwners()
|
PendingMessageCursor |
getMessages()
|
int |
getTimeBeforeDispatchStarts()
|
void |
initialize()
initialize the destination |
boolean |
isAllConsumersExclusiveByDefault()
|
boolean |
isOptimizedDispatch()
|
protected boolean |
isOptimizeStorage()
|
boolean |
isStrictOrderDispatch()
|
boolean |
isUseConsumerPriority()
|
boolean |
iterate()
|
void |
messageExpired(ConnectionContext context,
MessageReference reference)
|
void |
messageExpired(ConnectionContext context,
Subscription subs,
MessageReference reference)
Inform the Destination a message has expired |
int |
moveMatchingMessagesTo(ConnectionContext context,
MessageReferenceFilter filter,
ActiveMQDestination dest,
int maximumMessages)
Moves the messages matching the given filter up to the maximum number of matched messages |
int |
moveMatchingMessagesTo(ConnectionContext context,
String selector,
ActiveMQDestination dest)
Moves the messages matching the given selector |
int |
moveMatchingMessagesTo(ConnectionContext context,
String selector,
ActiveMQDestination dest,
int maximumMessages)
Moves the messages matching the given selector up to the maximum number of matched messages |
boolean |
moveMessageTo(ConnectionContext context,
QueueMessageReference m,
ActiveMQDestination dest)
Move a message |
boolean |
moveMessageTo(ConnectionContext context,
String messageId,
ActiveMQDestination dest)
Moves the message matching the given messageId |
void |
onUsageChanged(Usage usage,
int oldPercentUsage,
int newPercentUsage)
|
protected void |
pageInMessages(boolean force)
|
void |
processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
called on Queues in slave mode to allow dispatch to follow subscription choice of master |
void |
purge()
|
int |
removeMatchingMessages(MessageReferenceFilter filter,
int maximumMessages)
Removes the messages matching the given filter up to the maximum number of matched messages |
int |
removeMatchingMessages(String selector)
Removes the messages matching the given selector |
int |
removeMatchingMessages(String selector,
int maximumMessages)
Removes the messages matching the given selector up to the maximum number of matched messages |
protected void |
removeMessage(ConnectionContext c,
QueueMessageReference r)
|
protected void |
removeMessage(ConnectionContext c,
Subscription subs,
QueueMessageReference r)
|
protected void |
removeMessage(ConnectionContext context,
Subscription sub,
QueueMessageReference reference,
MessageAck ack)
|
boolean |
removeMessage(String messageId)
Removes the message matching the given messageId |
void |
removeSubscription(ConnectionContext context,
Subscription sub,
long lastDeiveredSequenceId)
|
int |
retryMessages(ConnectionContext context,
int maximumMessages)
|
void |
send(ProducerBrokerExchange producerExchange,
Message message)
|
void |
setAllConsumersExclusiveByDefault(boolean allConsumersExclusiveByDefault)
|
void |
setConsumersBeforeDispatchStarts(int consumersBeforeDispatchStarts)
|
void |
setDispatchPolicy(DispatchPolicy dispatchPolicy)
|
void |
setMessageGroupMapFactory(MessageGroupMapFactory messageGroupMapFactory)
|
void |
setMessages(PendingMessageCursor messages)
|
void |
setOptimizedDispatch(boolean optimizedDispatch)
|
void |
setPrioritizedMessages(boolean prioritizedMessages)
|
void |
setStrictOrderDispatch(boolean strictOrderDispatch)
|
void |
setTimeBeforeDispatchStarts(int timeBeforeDispatchStarts)
|
void |
setUseConsumerPriority(boolean useConsumerPriority)
|
void |
start()
|
void |
stop()
|
String |
toString()
|
void |
wakeup()
optionally called by a Subscriber - to inform the Destination its ready for more messages |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final org.slf4j.Logger LOG
protected final TaskRunnerFactory taskFactory
protected TaskRunner taskRunner
protected final List<Subscription> consumers
protected PendingMessageCursor messages
protected PendingList pagedInPendingDispatch
protected PendingList redeliveredWaitingDispatch
| Constructor Detail |
|---|
public Queue(BrokerService brokerService,
ActiveMQDestination destination,
MessageStore store,
DestinationStatistics parentStats,
TaskRunnerFactory taskFactory)
throws Exception
Exception| Method Detail |
|---|
public List<Subscription> getConsumers()
getConsumers in interface DestinationgetConsumers in class BaseDestinationpublic void setPrioritizedMessages(boolean prioritizedMessages)
setPrioritizedMessages in class BaseDestination
public void initialize()
throws Exception
BaseDestination
initialize in class BaseDestinationException
public void addSubscription(ConnectionContext context,
Subscription sub)
throws Exception
addSubscription in interface DestinationaddSubscription in class BaseDestinationException
public void removeSubscription(ConnectionContext context,
Subscription sub,
long lastDeiveredSequenceId)
throws Exception
removeSubscription in interface DestinationremoveSubscription in class BaseDestinationException
public void send(ProducerBrokerExchange producerExchange,
Message message)
throws Exception
send in interface DestinationExceptionpublic void gc()
gc in interface Destination
public void acknowledge(ConnectionContext context,
Subscription sub,
MessageAck ack,
MessageReference node)
throws IOException
acknowledge in interface DestinationIOExceptionpublic String toString()
toString in class Object
public void start()
throws Exception
start in interface ServiceException
public void stop()
throws Exception
stop in interface ServiceExceptionpublic ActiveMQDestination getActiveMQDestination()
getActiveMQDestination in interface DestinationgetActiveMQDestination in class BaseDestinationpublic MessageGroupMap getMessageGroupOwners()
public DispatchPolicy getDispatchPolicy()
public void setDispatchPolicy(DispatchPolicy dispatchPolicy)
public MessageGroupMapFactory getMessageGroupMapFactory()
public void setMessageGroupMapFactory(MessageGroupMapFactory messageGroupMapFactory)
public PendingMessageCursor getMessages()
public void setMessages(PendingMessageCursor messages)
public boolean isUseConsumerPriority()
public void setUseConsumerPriority(boolean useConsumerPriority)
public boolean isStrictOrderDispatch()
public void setStrictOrderDispatch(boolean strictOrderDispatch)
public boolean isOptimizedDispatch()
public void setOptimizedDispatch(boolean optimizedDispatch)
public int getTimeBeforeDispatchStarts()
public void setTimeBeforeDispatchStarts(int timeBeforeDispatchStarts)
public int getConsumersBeforeDispatchStarts()
public void setConsumersBeforeDispatchStarts(int consumersBeforeDispatchStarts)
public void setAllConsumersExclusiveByDefault(boolean allConsumersExclusiveByDefault)
public boolean isAllConsumersExclusiveByDefault()
public Message[] browse()
browse in interface Destination
public void doBrowse(List<Message> browseList,
int max)
public QueueMessageReference getMessage(String id)
public void purge()
throws Exception
Exceptionpublic void clearPendingMessages()
clearPendingMessages in interface Destination
public boolean removeMessage(String messageId)
throws Exception
Exception
public int removeMatchingMessages(String selector)
throws Exception
Exception
public int removeMatchingMessages(String selector,
int maximumMessages)
throws Exception
Exception
public int removeMatchingMessages(MessageReferenceFilter filter,
int maximumMessages)
throws Exception
Exception
public boolean copyMessageTo(ConnectionContext context,
String messageId,
ActiveMQDestination dest)
throws Exception
Exception
public int copyMatchingMessagesTo(ConnectionContext context,
String selector,
ActiveMQDestination dest)
throws Exception
Exception
public int copyMatchingMessagesTo(ConnectionContext context,
String selector,
ActiveMQDestination dest,
int maximumMessages)
throws Exception
Exception
public int copyMatchingMessages(ConnectionContext context,
MessageReferenceFilter filter,
ActiveMQDestination dest,
int maximumMessages)
throws Exception
Exception
public boolean moveMessageTo(ConnectionContext context,
QueueMessageReference m,
ActiveMQDestination dest)
throws Exception
context - connection contextm - QueueMessageReferencedest - ActiveMQDestination
Exception
public boolean moveMessageTo(ConnectionContext context,
String messageId,
ActiveMQDestination dest)
throws Exception
Exception
public int moveMatchingMessagesTo(ConnectionContext context,
String selector,
ActiveMQDestination dest)
throws Exception
Exception
public int moveMatchingMessagesTo(ConnectionContext context,
String selector,
ActiveMQDestination dest,
int maximumMessages)
throws Exception
Exception
public int moveMatchingMessagesTo(ConnectionContext context,
MessageReferenceFilter filter,
ActiveMQDestination dest,
int maximumMessages)
throws Exception
Exception
public int retryMessages(ConnectionContext context,
int maximumMessages)
throws Exception
Exceptionpublic boolean iterate()
iterate in interface TaskTask.iterate()protected MessageReferenceFilter createMessageIdFilter(String messageId)
protected MessageReferenceFilter createSelectorFilter(String selector)
throws javax.jms.InvalidSelectorException
javax.jms.InvalidSelectorException
protected void removeMessage(ConnectionContext c,
QueueMessageReference r)
throws IOException
IOException
protected void removeMessage(ConnectionContext c,
Subscription subs,
QueueMessageReference r)
throws IOException
IOException
protected void removeMessage(ConnectionContext context,
Subscription sub,
QueueMessageReference reference,
MessageAck ack)
throws IOException
IOException
public void messageExpired(ConnectionContext context,
MessageReference reference)
public void messageExpired(ConnectionContext context,
Subscription subs,
MessageReference reference)
Destination
messageExpired in interface Destinationpublic void wakeup()
Destination
wakeup in interface Destination
protected boolean assignMessageGroup(Subscription subscription,
QueueMessageReference node)
throws Exception
Exception
protected void assignGroup(Subscription subs,
MessageGroupMap messageGroupOwners,
MessageReference n,
String groupId)
throws IOException
IOException
protected void pageInMessages(boolean force)
throws Exception
Exception
public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
throws Exception
Destination
processDispatchNotification in interface DestinationprocessDispatchNotification in class BaseDestinationException
public void onUsageChanged(Usage usage,
int oldPercentUsage,
int newPercentUsage)
onUsageChanged in interface UsageListenerprotected org.slf4j.Logger getLog()
getLog in class BaseDestinationprotected boolean isOptimizeStorage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||