|
||||||||||
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 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,
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 ConnectionContext |
createConnectionContext()
|
protected MessageReferenceFilter |
createMessageIdFilter(String messageId)
|
protected MessageReferenceFilter |
createSelectorFilter(String selector)
|
void |
dispose(ConnectionContext context)
|
void |
dropEvent()
|
void |
dropEvent(boolean skipGc)
|
void |
gc()
|
ActiveMQDestination |
getActiveMQDestination()
|
DeadLetterStrategy |
getDeadLetterStrategy()
|
String |
getDestination()
|
DestinationStatistics |
getDestinationStatistics()
|
DispatchPolicy |
getDispatchPolicy()
|
Message |
getMessage(String messageId)
|
MessageGroupMapFactory |
getMessageGroupMapFactory()
|
MessageGroupMap |
getMessageGroupOwners()
|
PendingMessageCursor |
getMessages()
|
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,
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,
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(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,
IndirectMessageReference r)
|
boolean |
removeMessage(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()
|
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 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 Exception
Exception
Method Detail |
---|
public void initialize() throws Exception
Exception
public boolean lock(MessageReference node, LockOwner lockOwner)
lock
in interface Destination
public void addSubscription(ConnectionContext context, Subscription sub) throws Exception
addSubscription
in interface Destination
Exception
public void removeSubscription(ConnectionContext context, Subscription sub) throws Exception
removeSubscription
in interface Destination
Exception
public void send(ConnectionContext context, Message message) throws Exception
send
in interface Destination
Exception
public void dispose(ConnectionContext context) throws IOException
dispose
in interface Destination
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 IOException
acknowledge
in interface Destination
IOException
public String toString()
toString
in class Object
public void start() throws Exception
start
in interface Service
Exception
public void stop() throws Exception
stop
in interface Service
Exception
public ActiveMQDestination getActiveMQDestination()
getActiveMQDestination
in interface Destination
public 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 String getName()
getName
in interface Destination
public PendingMessageCursor getMessages()
public void setMessages(PendingMessageCursor messages)
public Message[] browse()
browse
in interface Destination
public Message getMessage(String messageId)
public void purge()
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, 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
protected MessageReferenceFilter createMessageIdFilter(String messageId)
protected MessageReferenceFilter createSelectorFilter(String selector) throws javax.jms.InvalidSelectorException
javax.jms.InvalidSelectorException
protected void removeMessage(ConnectionContext c, IndirectMessageReference r) throws IOException
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 |