org.jboss.messaging.core.server
Interface Queue
- All Superinterfaces:
- Bindable
- All Known Implementing Classes:
- LastValueQueue, QueueImpl
public interface Queue
- extends Bindable
A Queue
- Author:
- Tim Fox, Andy Taylor, Clebert Suconic
reroute
MessageReference reroute(ServerMessage message,
Transaction tx)
throws java.lang.Exception
- Throws:
java.lang.Exception
getName
SimpleString getName()
getPersistenceID
long getPersistenceID()
setPersistenceID
void setPersistenceID(long id)
getFilter
Filter getFilter()
isDurable
boolean isDurable()
isTemporary
boolean isTemporary()
addConsumer
void addConsumer(Consumer consumer)
throws java.lang.Exception
- Throws:
java.lang.Exception
removeConsumer
boolean removeConsumer(Consumer consumer)
throws java.lang.Exception
- Throws:
java.lang.Exception
getConsumerCount
int getConsumerCount()
getConsumers
java.util.Set<Consumer> getConsumers()
addLast
void addLast(MessageReference ref)
addFirst
void addFirst(MessageReference ref)
acknowledge
void acknowledge(MessageReference ref)
throws java.lang.Exception
- Throws:
java.lang.Exception
acknowledge
void acknowledge(Transaction tx,
MessageReference ref)
throws java.lang.Exception
- Throws:
java.lang.Exception
reacknowledge
void reacknowledge(Transaction tx,
MessageReference ref)
throws java.lang.Exception
- Throws:
java.lang.Exception
cancel
void cancel(Transaction tx,
MessageReference ref)
throws java.lang.Exception
- Throws:
java.lang.Exception
cancel
void cancel(MessageReference reference)
throws java.lang.Exception
- Throws:
java.lang.Exception
deliverAsync
void deliverAsync(java.util.concurrent.Executor executor)
list
java.util.List<MessageReference> list(Filter filter)
getMessageCount
int getMessageCount()
getDeliveringCount
int getDeliveringCount()
referenceHandled
void referenceHandled()
getScheduledCount
int getScheduledCount()
getScheduledMessages
java.util.List<MessageReference> getScheduledMessages()
getDistributionPolicy
Distributor getDistributionPolicy()
setDistributionPolicy
void setDistributionPolicy(Distributor policy)
getMessagesAdded
int getMessagesAdded()
removeReferenceWithID
MessageReference removeReferenceWithID(long id)
throws java.lang.Exception
- Throws:
java.lang.Exception
removeFirstReference
MessageReference removeFirstReference(long id)
throws java.lang.Exception
- Throws:
java.lang.Exception
getReference
MessageReference getReference(long id)
deleteAllReferences
int deleteAllReferences()
throws java.lang.Exception
- Throws:
java.lang.Exception
deleteReference
boolean deleteReference(long messageID)
throws java.lang.Exception
- Throws:
java.lang.Exception
deleteMatchingReferences
int deleteMatchingReferences(Filter filter)
throws java.lang.Exception
- Throws:
java.lang.Exception
expireReference
boolean expireReference(long messageID)
throws java.lang.Exception
- Throws:
java.lang.Exception
expireReferences
int expireReferences(Filter filter)
throws java.lang.Exception
- Expire all the references in the queue which matches the filter
- Throws:
java.lang.Exception
expireReferences
void expireReferences()
throws java.lang.Exception
- Throws:
java.lang.Exception
expire
void expire(MessageReference ref)
throws java.lang.Exception
- Throws:
java.lang.Exception
sendMessageToDeadLetterAddress
boolean sendMessageToDeadLetterAddress(long messageID)
throws java.lang.Exception
- Throws:
java.lang.Exception
changeReferencePriority
boolean changeReferencePriority(long messageID,
byte newPriority)
throws java.lang.Exception
- Throws:
java.lang.Exception
moveReference
boolean moveReference(long messageID,
SimpleString toAddress)
throws java.lang.Exception
- Throws:
java.lang.Exception
moveReferences
int moveReferences(Filter filter,
SimpleString toAddress)
throws java.lang.Exception
- Throws:
java.lang.Exception
setBackup
void setBackup()
activate
boolean activate()
activateNow
void activateNow(java.util.concurrent.Executor executor)
isBackup
boolean isBackup()
consumerFailedOver
boolean consumerFailedOver()
addRedistributor
void addRedistributor(long delay,
java.util.concurrent.Executor executor,
Channel replicatingChannel)
cancelRedistributor
void cancelRedistributor()
throws java.lang.Exception
- Throws:
java.lang.Exception
deliverNow
void deliverNow()
checkDLQ
boolean checkDLQ(MessageReference ref)
throws java.lang.Exception
- Throws:
java.lang.Exception
lockDelivery
void lockDelivery()
unlockDelivery
void unlockDelivery()
iterator
java.util.Iterator<MessageReference> iterator()
- Returns:
- an immutable iterator which does not allow to remove references
Copyright © 2006 JBoss Inc. All Rights Reserved.