public final class LocalQueue extends AbstractLocalDestination implements javax.jms.Queue, LocalQueueMBean, ActiveObject
Implementation for a local JMS Queue
closed, closeLock, consumersLock, destinationDef, localConsumers, transactionLock| Constructor and Description |
|---|
LocalQueue(FFMQEngine engine,
QueueDefinition queueDef)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
AbstractMessage |
browse(LocalQueueBrowserCursor cursor,
MessageSelector selector)
Browse a message in this queue
|
void |
close()
Release destination resources
|
void |
commitChanges(SynchronizationBarrier barrier)
Commit all changes (make sure they are really applied) (ASYNCHRONOUS)
|
AbstractMessage |
get(LocalSession localSession,
TransactionSet transactionSet,
MessageSelector selector)
Get the first available message from this destination (matching an optional message selector).
|
long |
getAcknowledgedGetCount()
Get the number of acknowledged get operations on this queue (since startup or last reset)
|
QueueDefinition |
getDefinition()
Get the queue definition
|
long |
getExpiredCount()
Get the number of messages that were removed from this queue because they expired (since startup or last reset)
|
long |
getLastActivity()
Get a timestamp of this object's last activity
|
int |
getMemoryStoreUsage()
Get the usage amount (%) for the memory store
|
int |
getPersistentStoreUsage()
Get the usage amount (%) for the memory store
|
String |
getQueueName() |
long |
getReceivedFromQueueCount()
Get the number of messages received from this queue (since startup or last reset)
|
long |
getRollbackedGetCount()
Get the number of rollbacked get operations on this queue (since startup or last reset)
|
long |
getSentToQueueCount()
Get the number of messages sent to this queue (since startup or last reset)
|
int |
getSize()
Get the destination size (number of contained messages)
|
long |
getStoreFullEventsCount()
Get the number of times a message could not be stored because the queue store was full
|
long |
getTimeoutDelay()
Get the maximum allowed time between activities
|
protected boolean |
hasPendingChanges()
Test if this destinations still has some uncommitted changes
|
boolean |
onActivityTimeout()
Called if the object has been inactive for more
|
protected void |
processAvailabilityNotificationQueue() |
void |
purge(MessageSelector selector)
Purge some messages from the buffer
|
boolean |
putLocked(AbstractMessage message,
LocalSession session,
MessageLockSet locks)
Put a new message in the destination.
|
boolean |
redeliverLocked(TransactionItem[] items,
MessageLockSet locks)
Rollback get operations on this queue (messages are unlocked)..
|
protected void |
redeliverMessage(AbstractMessage msg,
MessageStore store,
int handle)
See RedeliveryTask
|
boolean |
remove(LocalSession localSession,
TransactionItem[] items)
Commit get operations on this queue (messages are removed)
|
void |
removeLocked(MessageLock lockRef)
Remove a locked message from this queue.
|
protected boolean |
requiresTransactionalUpdate()
Test if this destination requires transactional semantics to be updated
|
void |
resetStats()
Reset statistics on this destination
|
String |
toString() |
void |
unlockAndDeliver(MessageLock lockRef)
Unlock a message.
|
checkNotClosed, checkTransactionLock, closeTransaction, commitChanges, getAutoExtendAmount, getAverageCommitTime, getBlockSize, getInitialBlockCount, getJournalOutputBuffer, getMaxBlockCount, getMaxCommitTime, getMaxJournalSize, getMaxNonPersistentMessages, getMaxUncommittedStoreSize, getMaxUnflushedJournalSize, getMaxWriteBatchSize, getMinCommitTime, getName, getRegisteredConsumersCount, getStorageSyncMethod, isClosed, isConsumerRegistered, isPreAllocateFiles, isTemporary, isUseJournal, lookupConsumer, notifyCommitTime, openTransaction, registerConsumer, unregisterConsumerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAverageCommitTime, getMaxCommitTime, getMinCommitTime, getRegisteredConsumersCountgetAutoExtendAmount, getBlockSize, getInitialBlockCount, getJournalOutputBuffer, getMaxBlockCount, getMaxJournalSize, getMaxNonPersistentMessages, getMaxUncommittedStoreSize, getMaxUnflushedJournalSize, getMaxWriteBatchSize, getName, getStorageSyncMethod, isPreAllocateFiles, isTemporary, isUseJournalpublic LocalQueue(FFMQEngine engine, QueueDefinition queueDef) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic QueueDefinition getDefinition()
public String getQueueName()
getQueueName in interface javax.jms.Queuepublic boolean putLocked(AbstractMessage message, LocalSession session, MessageLockSet locks) throws javax.jms.JMSException
AbstractLocalDestinationputLocked in class AbstractLocalDestinationjavax.jms.JMSExceptionpublic void unlockAndDeliver(MessageLock lockRef) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void removeLocked(MessageLock lockRef) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic boolean remove(LocalSession localSession, TransactionItem[] items) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic boolean redeliverLocked(TransactionItem[] items, MessageLockSet locks) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void commitChanges(SynchronizationBarrier barrier) throws javax.jms.JMSException
CommittablecommitChanges in interface Committablebarrier - a synchronization barrierjavax.jms.JMSExceptionprotected void redeliverMessage(AbstractMessage msg, MessageStore store, int handle)
public AbstractMessage get(LocalSession localSession, TransactionSet transactionSet, MessageSelector selector) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic AbstractMessage browse(LocalQueueBrowserCursor cursor, MessageSelector selector) throws javax.jms.JMSException
cursor - browser cursorselector - a message selector or nulljavax.jms.JMSException - on internal errorpublic void purge(MessageSelector selector) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic int getSize()
LocalDestinationMBeangetSize in interface LocalDestinationMBeanpublic int getMemoryStoreUsage()
LocalQueueMBeangetMemoryStoreUsage in interface LocalQueueMBeanpublic int getPersistentStoreUsage()
LocalQueueMBeangetPersistentStoreUsage in interface LocalQueueMBeanpublic void resetStats()
LocalDestinationMBeanresetStats in interface LocalDestinationMBeanresetStats in class AbstractLocalDestinationpublic String toString()
public final void close()
throws javax.jms.JMSException
AbstractLocalDestinationclose in class AbstractLocalDestinationjavax.jms.JMSExceptionpublic long getSentToQueueCount()
LocalQueueMBeangetSentToQueueCount in interface LocalQueueMBeanpublic long getReceivedFromQueueCount()
LocalQueueMBeangetReceivedFromQueueCount in interface LocalQueueMBeanpublic long getAcknowledgedGetCount()
LocalQueueMBeangetAcknowledgedGetCount in interface LocalQueueMBeanpublic long getRollbackedGetCount()
LocalQueueMBeangetRollbackedGetCount in interface LocalQueueMBeanpublic long getExpiredCount()
LocalQueueMBeangetExpiredCount in interface LocalQueueMBeanpublic long getStoreFullEventsCount()
LocalQueueMBeangetStoreFullEventsCount in interface LocalQueueMBeanpublic long getLastActivity()
ActiveObjectgetLastActivity in interface ActiveObjectpublic long getTimeoutDelay()
ActiveObjectgetTimeoutDelay in interface ActiveObjectpublic boolean onActivityTimeout()
throws Exception
ActiveObjectonActivityTimeout in interface ActiveObjectExceptionprotected void processAvailabilityNotificationQueue()
protected boolean hasPendingChanges()
AbstractLocalDestinationhasPendingChanges in class AbstractLocalDestinationprotected boolean requiresTransactionalUpdate()
AbstractLocalDestinationrequiresTransactionalUpdate in class AbstractLocalDestinationCopyright © 2021. All rights reserved.