public class QueueImpl extends Object implements Queue
Modifier and Type | Field and Description |
---|---|
static int |
CHECK_QUEUE_SIZE_PERIOD |
protected AtomicInteger |
deliveringCount |
static int |
MAX_DELIVERIES_IN_LOOP |
static int |
NUM_PRIORITIES |
static int |
REDISTRIBUTOR_BATCH_SIZE |
Constructor and Description |
---|
QueueImpl(long id,
SimpleString address,
SimpleString name,
Filter filter,
boolean durable,
boolean temporary,
ScheduledExecutorService scheduledExecutor,
PostOffice postOffice,
StorageManager storageManager,
HierarchicalRepository<AddressSettings> addressSettingsRepository,
Executor executor) |
QueueImpl(long id,
SimpleString address,
SimpleString name,
Filter filter,
PageSubscription pageSubscription,
boolean durable,
boolean temporary,
ScheduledExecutorService scheduledExecutor,
PostOffice postOffice,
StorageManager storageManager,
HierarchicalRepository<AddressSettings> addressSettingsRepository,
Executor executor) |
public static final int REDISTRIBUTOR_BATCH_SIZE
public static final int NUM_PRIORITIES
public static final int MAX_DELIVERIES_IN_LOOP
public static final int CHECK_QUEUE_SIZE_PERIOD
protected final AtomicInteger deliveringCount
public QueueImpl(long id, SimpleString address, SimpleString name, Filter filter, boolean durable, boolean temporary, ScheduledExecutorService scheduledExecutor, PostOffice postOffice, StorageManager storageManager, HierarchicalRepository<AddressSettings> addressSettingsRepository, Executor executor)
public QueueImpl(long id, SimpleString address, SimpleString name, Filter filter, PageSubscription pageSubscription, boolean durable, boolean temporary, ScheduledExecutorService scheduledExecutor, PostOffice postOffice, StorageManager storageManager, HierarchicalRepository<AddressSettings> addressSettingsRepository, Executor executor)
public String debug()
public SimpleString getRoutingName()
public SimpleString getUniqueName()
public boolean isExclusive()
public void route(ServerMessage message, RoutingContext context) throws Exception
public boolean isTemporary()
isTemporary
in interface Queue
public SimpleString getName()
public SimpleString getAddress()
getAddress
in interface Queue
public PageSubscription getPageSubscription()
getPageSubscription
in interface Queue
public void addHead(MessageReference ref)
public void reload(MessageReference ref)
public void addTail(MessageReference ref)
public void addTail(MessageReference ref, boolean direct)
public void forceDelivery()
Queue
forceDelivery
in interface Queue
public void deliverAsync()
deliverAsync
in interface Queue
public Executor getExecutor()
getExecutor
in interface Queue
public void deliverNow()
public boolean flushExecutor()
flushExecutor
in interface Queue
public void addConsumer(Consumer consumer) throws Exception
addConsumer
in interface Queue
Exception
public void removeConsumer(Consumer consumer) throws Exception
removeConsumer
in interface Queue
Exception
public void addRedistributor(long delay)
addRedistributor
in interface Queue
public void cancelRedistributor() throws Exception
cancelRedistributor
in interface Queue
Exception
protected void finalize() throws Throwable
public int getConsumerCount()
getConsumerCount
in interface Queue
public Set<Consumer> getConsumers()
getConsumers
in interface Queue
public boolean hasMatchingConsumer(ServerMessage message)
hasMatchingConsumer
in interface Queue
public LinkedListIterator<MessageReference> iterator()
public MessageReference removeReferenceWithID(long id) throws Exception
removeReferenceWithID
in interface Queue
Exception
public MessageReference getReference(long id)
getReference
in interface Queue
public long getMessageCount()
getMessageCount
in interface Queue
public long getInstantMessageCount()
Queue
getInstantMessageCount
in interface Queue
public int getScheduledCount()
getScheduledCount
in interface Queue
public List<MessageReference> getScheduledMessages()
getScheduledMessages
in interface Queue
public int getDeliveringCount()
getDeliveringCount
in interface Queue
public void acknowledge(MessageReference ref) throws Exception
acknowledge
in interface Queue
Exception
public void acknowledge(Transaction tx, MessageReference ref) throws Exception
acknowledge
in interface Queue
Exception
public void reacknowledge(Transaction tx, MessageReference ref) throws Exception
reacknowledge
in interface Queue
Exception
public void cancel(Transaction tx, MessageReference reference)
public void cancel(MessageReference reference, long timeBase) throws Exception
public void expire(MessageReference ref) throws Exception
public void setExpiryAddress(SimpleString expiryAddress)
setExpiryAddress
in interface Queue
public void referenceHandled()
referenceHandled
in interface Queue
public long getMessagesAdded()
getMessagesAdded
in interface Queue
public long getInstantMessagesAdded()
getInstantMessagesAdded
in interface Queue
public int deleteAllReferences() throws Exception
deleteAllReferences
in interface Queue
Exception
public int deleteMatchingReferences(Filter filter) throws Exception
deleteMatchingReferences
in interface Queue
Exception
public boolean deleteReference(long messageID) throws Exception
deleteReference
in interface Queue
Exception
public boolean expireReference(long messageID) throws Exception
expireReference
in interface Queue
Exception
public int expireReferences(Filter filter) throws Exception
Queue
expireReferences
in interface Queue
Exception
public void expireReferences() throws Exception
expireReferences
in interface Queue
Exception
public boolean sendMessageToDeadLetterAddress(long messageID) throws Exception
sendMessageToDeadLetterAddress
in interface Queue
Exception
public int sendMessagesToDeadLetterAddress(Filter filter) throws Exception
sendMessagesToDeadLetterAddress
in interface Queue
Exception
public boolean moveReference(long messageID, SimpleString toAddress) throws Exception
moveReference
in interface Queue
Exception
public boolean moveReference(long messageID, SimpleString toAddress, boolean rejectDuplicate) throws Exception
moveReference
in interface Queue
Exception
public int moveReferences(Filter filter, SimpleString toAddress) throws Exception
moveReferences
in interface Queue
Exception
public int moveReferences(Filter filter, SimpleString toAddress, boolean rejectDuplicates) throws Exception
moveReferences
in interface Queue
Exception
public boolean changeReferencePriority(long messageID, byte newPriority) throws Exception
changeReferencePriority
in interface Queue
Exception
public int changeReferencesPriority(Filter filter, byte newPriority) throws Exception
changeReferencesPriority
in interface Queue
Exception
public void resetAllIterators()
resetAllIterators
in interface Queue
public void pause()
Queue
public void resume()
Queue
public boolean isPaused()
public boolean isDirectDeliver()
isDirectDeliver
in interface Queue
public boolean isInternalQueue()
Queue
isInternalQueue
in interface Queue
public void setInternalQueue(boolean internalQueue)
setInternalQueue
in interface Queue
internalQueue
- the internalQueue to setprotected void refAdded(MessageReference ref)
ref
- public boolean checkRedelivery(MessageReference reference, long timeBase) throws Exception
checkRedelivery
in interface Queue
Exception
public int getNumberOfReferences()
protected void postAcknowledge(MessageReference ref)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.