org.jboss.messaging.core.impl
Class MessagingQueue
java.lang.Object
org.jboss.messaging.core.impl.ChannelSupport
org.jboss.messaging.core.impl.PagingChannelSupport
org.jboss.messaging.core.impl.MessagingQueue
- All Implemented Interfaces:
- Channel, DeliveryObserver, Queue, Receiver
public class MessagingQueue
- extends PagingChannelSupport
- implements Queue
A MessagingQueue
Can be used to implement a point to point queue, or a subscription fed from a topic
- Version:
- $Revision: 1295 $
$Id: Queue.java 1295 2006-09-15 17:44:02Z timfox $
- Author:
- Ovidiu Feodorov, Tim Fox
Fields inherited from class org.jboss.messaging.core.impl.ChannelSupport |
active, channelID, deliveringCount, distributor, lock, maxSize, messageRefs, messagesAdded, pm, receiversReady, recoverable, scheduledDeliveries |
Constructor Summary |
MessagingQueue(int nodeID,
java.lang.String name,
long id,
boolean recoverable,
Filter filter,
boolean clustered)
|
MessagingQueue(int nodeID,
java.lang.String name,
long id,
MessageStore ms,
PersistenceManager pm,
boolean recoverable,
Filter filter,
boolean clustered)
This constructor is used when loading queue from storage - the paging params, maxSize and recoverDeliveriesTimeout don't matter
they are injected when the queue or topic service is started |
MessagingQueue(int nodeID,
java.lang.String name,
long id,
MessageStore ms,
PersistenceManager pm,
boolean recoverable,
int maxSize,
Filter filter,
boolean clustered)
|
MessagingQueue(int nodeID,
java.lang.String name,
long id,
MessageStore ms,
PersistenceManager pm,
boolean recoverable,
int maxSize,
Filter filter,
int fullSize,
int pageSize,
int downCacheSize,
boolean clustered,
long recoverDeliveriesTimeout)
|
Methods inherited from class org.jboss.messaging.core.impl.PagingChannelSupport |
addFromRefInfo, addReferenceInMemory, addToDownCache, cancelInternal, doLoad, downCacheCount, flushDownCache, getMessageCount, isPaging, load, loadPagedReferences, processReferences, removeFirstInMemory, setPagingParams, unload |
Methods inherited from class org.jboss.messaging.core.impl.ChannelSupport |
acknowledge, acknowledgeInternal, activate, browse, cancel, checkAndSchedule, checkClosed, clearAllScheduledDeliveries, close, deactivate, deliver, deliverScheduled, getCallback, getChannelID, getDeliveringCount, getMaxSize, getMessagesAdded, getReceiversReady, getScheduledCount, handle, handleInternal, isActive, isRecoverable, memoryRefCount, processMessageBeforeStorage, removeAllReferences, setMaxSize, undelivered |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.messaging.core.contract.Channel |
activate, browse, close, deactivate, deliver, getChannelID, getDeliveringCount, getMaxSize, getMessageCount, getMessagesAdded, getScheduledCount, isActive, isRecoverable, load, removeAllReferences, setMaxSize, unload |
Methods inherited from interface org.jboss.messaging.core.contract.Receiver |
handle |
name
protected java.lang.String name
filter
protected Filter filter
clustered
protected boolean clustered
remoteDistributor
protected Distributor remoteDistributor
localDistributor
protected Distributor localDistributor
MessagingQueue
public MessagingQueue(int nodeID,
java.lang.String name,
long id,
MessageStore ms,
PersistenceManager pm,
boolean recoverable,
int maxSize,
Filter filter,
int fullSize,
int pageSize,
int downCacheSize,
boolean clustered,
long recoverDeliveriesTimeout)
MessagingQueue
public MessagingQueue(int nodeID,
java.lang.String name,
long id,
MessageStore ms,
PersistenceManager pm,
boolean recoverable,
Filter filter,
boolean clustered)
- This constructor is used when loading queue from storage - the paging params, maxSize and recoverDeliveriesTimeout don't matter
they are injected when the queue or topic service is started
MessagingQueue
public MessagingQueue(int nodeID,
java.lang.String name,
long id,
MessageStore ms,
PersistenceManager pm,
boolean recoverable,
int maxSize,
Filter filter,
boolean clustered)
MessagingQueue
public MessagingQueue(int nodeID,
java.lang.String name,
long id,
boolean recoverable,
Filter filter,
boolean clustered)
getNodeID
public int getNodeID()
- Specified by:
getNodeID
in interface Queue
getName
public java.lang.String getName()
- Specified by:
getName
in interface Queue
getFilter
public Filter getFilter()
- Specified by:
getFilter
in interface Queue
isClustered
public boolean isClustered()
- Specified by:
isClustered
in interface Queue
getLocalDistributor
public Distributor getLocalDistributor()
- Specified by:
getLocalDistributor
in interface Queue
getRemoteDistributor
public Distributor getRemoteDistributor()
- Specified by:
getRemoteDistributor
in interface Queue
mergeIn
public void mergeIn(long theChannelID,
int nodeID)
throws java.lang.Exception
- Merge the contents of one queue with another - this happens at failover when a queue is failed
over to another node, but a queue with the same name already exists. In this case we merge the
two queues.
- Specified by:
mergeIn
in interface Queue
- Throws:
java.lang.Exception
recoverDeliveries
public java.util.List recoverDeliveries(java.util.List messageIds)
- Specified by:
recoverDeliveries
in interface Queue
removeStrandedReferences
public void removeStrandedReferences(java.lang.String sessionID)
- Specified by:
removeStrandedReferences
in interface Queue
registerSucker
public void registerSucker(MessageSucker sucker)
- Specified by:
registerSucker
in interface Queue
unregisterSucker
public boolean unregisterSucker(MessageSucker sucker)
- Specified by:
unregisterSucker
in interface Queue
getFullSize
public int getFullSize()
- Specified by:
getFullSize
in interface Queue
getPageSize
public int getPageSize()
- Specified by:
getPageSize
in interface Queue
getDownCacheSize
public int getDownCacheSize()
- Specified by:
getDownCacheSize
in interface Queue
addToRecoveryArea
public void addToRecoveryArea(int nodeID,
long messageID,
java.lang.String sessionID)
- Specified by:
addToRecoveryArea
in interface Queue
removeFromRecoveryArea
public void removeFromRecoveryArea(int nodeID,
long messageID)
- Specified by:
removeFromRecoveryArea
in interface Queue
removeAllFromRecoveryArea
public void removeAllFromRecoveryArea(int nodeID)
- Specified by:
removeAllFromRecoveryArea
in interface Queue
addAllToRecoveryArea
public void addAllToRecoveryArea(int nodeID,
java.util.Map ids)
- Specified by:
addAllToRecoveryArea
in interface Queue
getRecoverDeliveriesTimeout
public long getRecoverDeliveriesTimeout()
- Specified by:
getRecoverDeliveriesTimeout
in interface Queue
getRecoveryArea
public java.util.Map getRecoveryArea()
- Specified by:
getRecoveryArea
in interface Queue
getRecoveryMapSize
public int getRecoveryMapSize()
- Specified by:
getRecoveryMapSize
in interface Queue
deliverInternal
protected void deliverInternal()
- Description copied from class:
ChannelSupport
- This methods delivers as many messages as possible to the distributor until no more deliveries are
returned. This method should never be called at the same time as handle.
- Overrides:
deliverInternal
in class ChannelSupport
- See Also:
Channel.deliver()
setReceiversReady
protected void setReceiversReady(boolean receiversReady)
- Overrides:
setReceiversReady
in class ChannelSupport
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in class java.lang.Object
Copyright © 2006 JBoss Inc. All Rights Reserved.