|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.messaging.core.ChannelState
Represents the state of a Channel.
| Field Summary | |
protected boolean |
acceptReliableMessages
|
protected Channel |
channel
|
protected java.util.Set |
deliveries
|
protected java.util.List |
downCache
|
protected int |
downCacheSize
|
protected int |
fullSize
|
protected SynchronizedLong |
messageOrdering
|
protected PrioritizedDeque |
messageRefs
|
protected MemoryManager |
mm
|
protected int |
pageSize
|
protected boolean |
paging
|
protected PersistenceManager |
pm
|
protected boolean |
recoverable
|
protected int |
refsInStorage
|
| Constructor Summary | |
ChannelState(Channel channel,
PersistenceManager pm,
MemoryManager mm,
boolean acceptReliableMessages,
boolean recoverable,
int fullSize,
int pageSize,
int downCacheSize)
|
|
| Method Summary | |
boolean |
acceptReliableMessages()
A non-recoverable state cannot guarantee recoverability for reliable messages so by default it won't accept reliable messages. |
void |
acknowledge(Delivery d)
A Delivery has been acknowledged in a non transactional context. |
void |
acknowledge(Delivery d,
Transaction tx)
A Delivery has been acknowledged in the presence of a JMS local transaction. |
protected void |
acknowledgeInMemory(Delivery d)
|
void |
addDelivery(Delivery d)
Add a Delivery to the state |
boolean |
addReference(MessageReference ref)
Add a MessageReference to the State |
void |
addReference(MessageReference ref,
Transaction tx)
This method is called after a new message has arrived at the Channel in the presence of a JMS transaction. |
protected boolean |
addReferenceInMemory(MessageReference ref)
|
protected void |
addToDownCache(MessageReference ref)
|
java.util.List |
browse(Filter filter)
|
void |
cancelDelivery(Delivery del)
A Delivery has been cancelled. |
protected void |
checkLoad()
|
protected void |
checkMemory()
|
void |
clear()
Clears non-recoverable state but not persisted state, so a recovery of the channel is possible TODO really? |
java.util.List |
delivering(Filter filter)
A list of message references of messages in process of being delivered. |
int |
downCacheCount()
|
protected void |
flushDownCache()
|
protected org.jboss.messaging.core.ChannelState.InMemoryCallback |
getCallback(Transaction tx)
|
boolean |
isPaging()
|
boolean |
isRecoverable()
|
void |
load()
|
protected void |
load(int number)
|
int |
memoryDeliveryCount()
|
int |
memoryRefCount()
|
int |
messageCount()
Message amount. |
MessageReference |
peekFirst()
Peek the MessageReference at the head of the state without actually removing it |
void |
removeAll()
Remove all messages. |
protected void |
removeCompletely(MessageReference r)
|
MessageReference |
removeFirstInMemory()
Remove the MessageReference at the head of the queue from the state. |
java.lang.String |
toString()
|
java.util.List |
undelivered(Filter filter)
A list of message references of messages that are currently NOT being delivered by the channel. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected PrioritizedDeque messageRefs
protected java.util.Set deliveries
protected Channel channel
protected java.util.List downCache
protected boolean acceptReliableMessages
protected boolean recoverable
protected SynchronizedLong messageOrdering
protected PersistenceManager pm
protected MemoryManager mm
protected int fullSize
protected int pageSize
protected int downCacheSize
protected boolean paging
protected int refsInStorage
| Constructor Detail |
public ChannelState(Channel channel,
PersistenceManager pm,
MemoryManager mm,
boolean acceptReliableMessages,
boolean recoverable,
int fullSize,
int pageSize,
int downCacheSize)
| Method Detail |
public boolean isRecoverable()
isRecoverable in interface Statepublic boolean acceptReliableMessages()
State
acceptReliableMessages in interface State
public void addReference(MessageReference ref,
Transaction tx)
throws java.lang.Throwable
State
addReference in interface Stateref - The MessageReference to addtx - The JMS local transaction
java.lang.Throwable
public boolean addReference(MessageReference ref)
throws java.lang.Throwable
State
addReference in interface Stateref - The MessageReference to add
java.lang.Throwable
public void addDelivery(Delivery d)
throws java.lang.Throwable
State
addDelivery in interface Stated - The set of delivery instances to add
java.lang.Throwable
public void cancelDelivery(Delivery del)
throws java.lang.Throwable
State
cancelDelivery in interface Statedel - The delivery to cancel
java.lang.Throwable
public void acknowledge(Delivery d,
Transaction tx)
throws java.lang.Throwable
State
acknowledge in interface Stated - The delivery to acknowledgetx - The JMS local transaction
java.lang.Throwable
public void acknowledge(Delivery d)
throws java.lang.Throwable
State
acknowledge in interface Stated - The delivery to acknowledge
java.lang.Throwable
public MessageReference removeFirstInMemory()
throws java.lang.Throwable
State
removeFirstInMemory in interface Statejava.lang.Throwable
public MessageReference peekFirst()
throws java.lang.Throwable
State
peekFirst in interface Statejava.lang.Throwablepublic java.util.List delivering(Filter filter)
State
delivering in interface Statepublic java.util.List undelivered(Filter filter)
State
undelivered in interface Statepublic java.util.List browse(Filter filter)
browse in interface Statefilter - - may be null, in which case no filter is applied.
public void clear()
State
clear in interface Statepublic int messageCount()
State
messageCount in interface State
public void load()
throws java.lang.Exception
load in interface Statejava.lang.Exceptionpublic void removeAll()
State
removeAll in interface Statepublic int memoryRefCount()
public int memoryDeliveryCount()
public int downCacheCount()
public boolean isPaging()
public java.lang.String toString()
protected void checkMemory()
protected boolean addReferenceInMemory(MessageReference ref)
throws java.lang.Throwable
java.lang.Throwable
protected void addToDownCache(MessageReference ref)
throws java.lang.Exception
java.lang.Exception
protected void flushDownCache()
throws java.lang.Exception
java.lang.Exception
protected void acknowledgeInMemory(Delivery d)
throws java.lang.Throwable
java.lang.Throwableprotected void removeCompletely(MessageReference r)
protected void checkLoad()
throws java.lang.Throwable
java.lang.Throwable
protected void load(int number)
throws java.lang.Exception
java.lang.Exceptionprotected org.jboss.messaging.core.ChannelState.InMemoryCallback getCallback(Transaction tx)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||