org.jboss.messaging.core.server.impl
Class QueueImpl_nc
java.lang.Object
org.jboss.messaging.core.server.impl.QueueImpl_nc
- All Implemented Interfaces:
- Queue
public class QueueImpl_nc
- extends java.lang.Object
- implements Queue
Implementation of a Queue
TODO use Java 5 concurrent queue
- Author:
- Tim Fox, Andy Taylor
|
Constructor Summary |
QueueImpl_nc(long persistenceID,
SimpleString name,
Filter filter,
boolean clustered,
boolean durable,
boolean temporary,
int maxSizeBytes,
java.util.concurrent.ScheduledExecutorService scheduledExecutor)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
QueueImpl_nc
public QueueImpl_nc(long persistenceID,
SimpleString name,
Filter filter,
boolean clustered,
boolean durable,
boolean temporary,
int maxSizeBytes,
java.util.concurrent.ScheduledExecutorService scheduledExecutor)
isClustered
public boolean isClustered()
- Specified by:
isClustered in interface Queue
isDurable
public boolean isDurable()
- Specified by:
isDurable in interface Queue
isTemporary
public boolean isTemporary()
- Specified by:
isTemporary in interface Queue
getName
public SimpleString getName()
- Specified by:
getName in interface Queue
addLast
public HandleStatus addLast(MessageReference ref)
- Specified by:
addLast in interface Queue
addFirst
public HandleStatus addFirst(MessageReference ref)
- Specified by:
addFirst in interface Queue
addListFirst
public void addListFirst(java.util.LinkedList<MessageReference> list)
- Description copied from interface:
Queue
- This method is used to add a List of MessageReferences atomically at the head of the list.
Useful when cancelling messages and guaranteeing ordering
- Specified by:
addListFirst in interface Queue
deliverAsync
public void deliverAsync(java.util.concurrent.Executor executor)
- Specified by:
deliverAsync in interface Queue
deliver
public void deliver()
- Specified by:
deliver in interface Queue
addConsumer
public void addConsumer(Consumer consumer)
- Specified by:
addConsumer in interface Queue
removeConsumer
public boolean removeConsumer(Consumer consumer)
- Specified by:
removeConsumer in interface Queue
getConsumerCount
public int getConsumerCount()
- Specified by:
getConsumerCount in interface Queue
list
public java.util.List<MessageReference> list(Filter filter)
- Specified by:
list in interface Queue
removeReferenceWithID
public boolean removeReferenceWithID(long id)
- Specified by:
removeReferenceWithID in interface Queue
getReference
public MessageReference getReference(long id)
- Specified by:
getReference in interface Queue
getPersistenceID
public long getPersistenceID()
- Specified by:
getPersistenceID in interface Queue
setPersistenceID
public void setPersistenceID(long id)
- Specified by:
setPersistenceID in interface Queue
getFilter
public Filter getFilter()
- Specified by:
getFilter in interface Queue
setFilter
public void setFilter(Filter filter)
- Specified by:
setFilter in interface Queue
getMessageCount
public int getMessageCount()
- Specified by:
getMessageCount in interface Queue
getScheduledCount
public int getScheduledCount()
- Specified by:
getScheduledCount in interface Queue
getDeliveringCount
public int getDeliveringCount()
- Specified by:
getDeliveringCount in interface Queue
referenceAcknowledged
public void referenceAcknowledged(MessageReference ref)
throws java.lang.Exception
- Specified by:
referenceAcknowledged in interface Queue
- Throws:
java.lang.Exception
referenceCancelled
public void referenceCancelled()
- Specified by:
referenceCancelled in interface Queue
getMaxSizeBytes
public int getMaxSizeBytes()
- Specified by:
getMaxSizeBytes in interface Queue
getSizeBytes
public int getSizeBytes()
- Specified by:
getSizeBytes in interface Queue
getDistributionPolicy
public DistributionPolicy getDistributionPolicy()
- Specified by:
getDistributionPolicy in interface Queue
setDistributionPolicy
public void setDistributionPolicy(DistributionPolicy distributionPolicy)
- Specified by:
setDistributionPolicy in interface Queue
getMessagesAdded
public int getMessagesAdded()
- Specified by:
getMessagesAdded in interface Queue
setFlowController
public void setFlowController(FlowController flowController)
- Specified by:
setFlowController in interface Queue
getFlowController
public FlowController getFlowController()
- Specified by:
getFlowController in interface Queue
deleteAllReferences
public void deleteAllReferences(StorageManager storageManager)
throws java.lang.Exception
- Specified by:
deleteAllReferences in interface Queue
- Throws:
java.lang.Exception
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
Copyright © 2006 JBoss Inc. All Rights Reserved.