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 Queuepublic SimpleString getName()
public SimpleString getAddress()
getAddress in interface Queuepublic PageSubscription getPageSubscription()
getPageSubscription in interface Queuepublic void addHead(MessageReference ref)
public void reload(MessageReference ref)
public void addTail(MessageReference ref)
public void addTail(MessageReference ref, boolean direct)
public void forceDelivery()
QueueforceDelivery in interface Queuepublic void deliverAsync()
deliverAsync in interface Queuepublic Executor getExecutor()
getExecutor in interface Queuepublic void deliverNow()
public boolean flushExecutor()
flushExecutor in interface Queuepublic void addConsumer(Consumer consumer) throws Exception
addConsumer in interface QueueExceptionpublic void removeConsumer(Consumer consumer) throws Exception
removeConsumer in interface QueueExceptionpublic void addRedistributor(long delay)
addRedistributor in interface Queuepublic void cancelRedistributor()
throws Exception
cancelRedistributor in interface QueueExceptionprotected void finalize()
throws Throwable
public int getConsumerCount()
getConsumerCount in interface Queuepublic Set<Consumer> getConsumers()
getConsumers in interface Queuepublic boolean hasMatchingConsumer(ServerMessage message)
hasMatchingConsumer in interface Queuepublic LinkedListIterator<MessageReference> iterator()
public MessageReference removeReferenceWithID(long id) throws Exception
removeReferenceWithID in interface QueueExceptionpublic MessageReference getReference(long id)
getReference in interface Queuepublic long getMessageCount()
getMessageCount in interface Queuepublic long getInstantMessageCount()
QueuegetInstantMessageCount in interface Queuepublic int getScheduledCount()
getScheduledCount in interface Queuepublic List<MessageReference> getScheduledMessages()
getScheduledMessages in interface Queuepublic int getDeliveringCount()
getDeliveringCount in interface Queuepublic void acknowledge(MessageReference ref) throws Exception
acknowledge in interface QueueExceptionpublic void acknowledge(Transaction tx, MessageReference ref) throws Exception
acknowledge in interface QueueExceptionpublic void reacknowledge(Transaction tx, MessageReference ref) throws Exception
reacknowledge in interface QueueExceptionpublic 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 Queuepublic void referenceHandled()
referenceHandled in interface Queuepublic long getMessagesAdded()
getMessagesAdded in interface Queuepublic long getInstantMessagesAdded()
getInstantMessagesAdded in interface Queuepublic int deleteAllReferences()
throws Exception
deleteAllReferences in interface QueueExceptionpublic int deleteMatchingReferences(Filter filter) throws Exception
deleteMatchingReferences in interface QueueExceptionpublic boolean deleteReference(long messageID)
throws Exception
deleteReference in interface QueueExceptionpublic boolean expireReference(long messageID)
throws Exception
expireReference in interface QueueExceptionpublic int expireReferences(Filter filter) throws Exception
QueueexpireReferences in interface QueueExceptionpublic void expireReferences()
throws Exception
expireReferences in interface QueueExceptionpublic boolean sendMessageToDeadLetterAddress(long messageID)
throws Exception
sendMessageToDeadLetterAddress in interface QueueExceptionpublic int sendMessagesToDeadLetterAddress(Filter filter) throws Exception
sendMessagesToDeadLetterAddress in interface QueueExceptionpublic boolean moveReference(long messageID,
SimpleString toAddress)
throws Exception
moveReference in interface QueueExceptionpublic boolean moveReference(long messageID,
SimpleString toAddress,
boolean rejectDuplicate)
throws Exception
moveReference in interface QueueExceptionpublic int moveReferences(Filter filter, SimpleString toAddress) throws Exception
moveReferences in interface QueueExceptionpublic int moveReferences(Filter filter, SimpleString toAddress, boolean rejectDuplicates) throws Exception
moveReferences in interface QueueExceptionpublic boolean changeReferencePriority(long messageID,
byte newPriority)
throws Exception
changeReferencePriority in interface QueueExceptionpublic int changeReferencesPriority(Filter filter, byte newPriority) throws Exception
changeReferencesPriority in interface QueueExceptionpublic void resetAllIterators()
resetAllIterators in interface Queuepublic void pause()
Queuepublic void resume()
Queuepublic boolean isPaused()
public boolean isDirectDeliver()
isDirectDeliver in interface Queuepublic boolean isInternalQueue()
QueueisInternalQueue in interface Queuepublic void setInternalQueue(boolean internalQueue)
setInternalQueue in interface QueueinternalQueue - the internalQueue to setprotected void refAdded(MessageReference ref)
ref - public boolean checkRedelivery(MessageReference reference, long timeBase) throws Exception
checkRedelivery in interface QueueExceptionpublic int getNumberOfReferences()
protected void postAcknowledge(MessageReference ref)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.