|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 java.util.List |
consumers
|
protected ActiveMQDestination |
destination
|
protected DestinationStatistics |
destinationStatistics
|
protected Valve |
dispatchValve
|
protected long |
garbageSize
|
protected long |
garbageSizeBeforeCollection
|
protected int |
highestSubscriptionPriority
|
protected PendingMessageCursor |
messages
|
protected MessageStore |
store
|
protected UsageManager |
usageManager
|
Constructor Summary | |
---|---|
Queue(ActiveMQDestination destination,
UsageManager memoryManager,
MessageStore store,
DestinationStatistics parentStats,
TaskRunnerFactory taskFactory)
|
Method Summary | |
---|---|
void |
acknowledge(ConnectionContext context,
Subscription sub,
MessageAck ack,
MessageReference node)
|
void |
addSubscription(ConnectionContext context,
Subscription sub)
|
Message[] |
browse()
|
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,
java.lang.String selector,
ActiveMQDestination dest)
Copies the messages matching the given selector |
int |
copyMatchingMessagesTo(ConnectionContext context,
java.lang.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,
java.lang.String messageId,
ActiveMQDestination dest)
Copies the message matching the given messageId |
protected ConnectionContext |
createConnectionContext()
|
protected MessageReferenceFilter |
createMessageIdFilter(java.lang.String messageId)
|
protected MessageReferenceFilter |
createSelectorFilter(java.lang.String selector)
|
void |
dispose(ConnectionContext context)
|
void |
dropEvent()
|
void |
dropEvent(boolean skipGc)
|
void |
gc()
|
ActiveMQDestination |
getActiveMQDestination()
|
DeadLetterStrategy |
getDeadLetterStrategy()
|
java.lang.String |
getDestination()
|
DestinationStatistics |
getDestinationStatistics()
|
DispatchPolicy |
getDispatchPolicy()
|
Message |
getMessage(java.lang.String messageId)
|
MessageGroupMapFactory |
getMessageGroupMapFactory()
|
MessageGroupMap |
getMessageGroupOwners()
|
PendingMessageCursor |
getMessages()
|
java.lang.String |
getName()
|
UsageManager |
getUsageManager()
|
void |
initialize()
|
boolean |
lock(MessageReference node,
LockOwner lockOwner)
|
protected boolean |
lockMessage(IndirectMessageReference r)
|
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,
java.lang.String selector,
ActiveMQDestination dest)
Moves the messages matching the given selector |
int |
moveMatchingMessagesTo(ConnectionContext context,
java.lang.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,
java.lang.String messageId,
ActiveMQDestination dest)
Moves the message matching the given messageId |
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(java.lang.String selector)
Removes the messages matching the given selector |
int |
removeMatchingMessages(java.lang.String selector,
int maximumMessages)
Removes the messages matching the given selector up to the maximum number of matched messages |
protected void |
removeMessage(ConnectionContext c,
IndirectMessageReference r)
|
boolean |
removeMessage(java.lang.String messageId)
Removes the message matching the given messageId |
void |
removeSubscription(ConnectionContext context,
Subscription sub)
|
void |
send(ConnectionContext context,
Message message)
|
void |
setDeadLetterStrategy(DeadLetterStrategy deadLetterStrategy)
|
void |
setDispatchPolicy(DispatchPolicy dispatchPolicy)
|
void |
setMessageGroupMapFactory(MessageGroupMapFactory messageGroupMapFactory)
|
void |
setMessages(PendingMessageCursor messages)
|
void |
start()
|
void |
stop()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final ActiveMQDestination destination
protected final java.util.List consumers
protected final Valve dispatchValve
protected final UsageManager usageManager
protected final DestinationStatistics destinationStatistics
protected PendingMessageCursor messages
protected long garbageSize
protected long garbageSizeBeforeCollection
protected final MessageStore store
protected int highestSubscriptionPriority
Constructor Detail |
---|
public Queue(ActiveMQDestination destination, UsageManager memoryManager, MessageStore store, DestinationStatistics parentStats, TaskRunnerFactory taskFactory) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public void initialize() throws java.lang.Exception
java.lang.Exception
public boolean lock(MessageReference node, LockOwner lockOwner)
lock
in interface Destination
public void addSubscription(ConnectionContext context, Subscription sub) throws java.lang.Exception
addSubscription
in interface Destination
java.lang.Exception
public void removeSubscription(ConnectionContext context, Subscription sub) throws java.lang.Exception
removeSubscription
in interface Destination
java.lang.Exception
public void send(ConnectionContext context, Message message) throws java.lang.Exception
send
in interface Destination
java.lang.Exception
public void dispose(ConnectionContext context) throws java.io.IOException
dispose
in interface Destination
java.io.IOException
public void dropEvent()
public void dropEvent(boolean skipGc)
public void gc()
gc
in interface Destination
public void acknowledge(ConnectionContext context, Subscription sub, MessageAck ack, MessageReference node) throws java.io.IOException
acknowledge
in interface Destination
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public void start() throws java.lang.Exception
start
in interface Service
java.lang.Exception
public void stop() throws java.lang.Exception
stop
in interface Service
java.lang.Exception
public ActiveMQDestination getActiveMQDestination()
getActiveMQDestination
in interface Destination
public java.lang.String getDestination()
public UsageManager getUsageManager()
getUsageManager
in interface Destination
public DestinationStatistics getDestinationStatistics()
getDestinationStatistics
in interface Destination
public MessageGroupMap getMessageGroupOwners()
public DispatchPolicy getDispatchPolicy()
public void setDispatchPolicy(DispatchPolicy dispatchPolicy)
public DeadLetterStrategy getDeadLetterStrategy()
getDeadLetterStrategy
in interface Destination
public void setDeadLetterStrategy(DeadLetterStrategy deadLetterStrategy)
public MessageGroupMapFactory getMessageGroupMapFactory()
public void setMessageGroupMapFactory(MessageGroupMapFactory messageGroupMapFactory)
public java.lang.String getName()
getName
in interface Destination
public PendingMessageCursor getMessages()
public void setMessages(PendingMessageCursor messages)
public Message[] browse()
browse
in interface Destination
public Message getMessage(java.lang.String messageId)
public void purge()
public boolean removeMessage(java.lang.String messageId) throws java.lang.Exception
java.lang.Exception
public int removeMatchingMessages(java.lang.String selector) throws java.lang.Exception
java.lang.Exception
public int removeMatchingMessages(java.lang.String selector, int maximumMessages) throws java.lang.Exception
java.lang.Exception
public int removeMatchingMessages(MessageReferenceFilter filter, int maximumMessages) throws java.lang.Exception
java.lang.Exception
public boolean copyMessageTo(ConnectionContext context, java.lang.String messageId, ActiveMQDestination dest) throws java.lang.Exception
java.lang.Exception
public int copyMatchingMessagesTo(ConnectionContext context, java.lang.String selector, ActiveMQDestination dest) throws java.lang.Exception
java.lang.Exception
public int copyMatchingMessagesTo(ConnectionContext context, java.lang.String selector, ActiveMQDestination dest, int maximumMessages) throws java.lang.Exception
java.lang.Exception
public int copyMatchingMessages(ConnectionContext context, MessageReferenceFilter filter, ActiveMQDestination dest, int maximumMessages) throws java.lang.Exception
java.lang.Exception
public boolean moveMessageTo(ConnectionContext context, java.lang.String messageId, ActiveMQDestination dest) throws java.lang.Exception
java.lang.Exception
public int moveMatchingMessagesTo(ConnectionContext context, java.lang.String selector, ActiveMQDestination dest) throws java.lang.Exception
java.lang.Exception
public int moveMatchingMessagesTo(ConnectionContext context, java.lang.String selector, ActiveMQDestination dest, int maximumMessages) throws java.lang.Exception
java.lang.Exception
public int moveMatchingMessagesTo(ConnectionContext context, MessageReferenceFilter filter, ActiveMQDestination dest, int maximumMessages) throws java.lang.Exception
java.lang.Exception
protected MessageReferenceFilter createMessageIdFilter(java.lang.String messageId)
protected MessageReferenceFilter createSelectorFilter(java.lang.String selector) throws javax.jms.InvalidSelectorException
javax.jms.InvalidSelectorException
protected void removeMessage(ConnectionContext c, IndirectMessageReference r) throws java.io.IOException
java.io.IOException
protected boolean lockMessage(IndirectMessageReference r)
protected ConnectionContext createConnectionContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |