|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.messaging.core.ChannelSupport
org.jboss.messaging.core.PagingChannelSupport
This channel implementation automatically pages message references to and from storage to prevent more than a maximum number of references being stored in memory at once. This allows us to support logical channels holding many millions of messages without running out of memory.
Field Summary | |
protected java.util.List |
downCache
|
protected int |
downCacheSize
The maximum number of references paged to storage in one operation |
protected long |
firstPagingOrder
The page order value for the first reference paged in storage |
protected int |
fullSize
The maximum number of references this channel will hold before going into paging mode |
protected long |
nextPagingOrder
The value of page order for the next reference to page |
protected int |
pageSize
The maximum number of references to load from storage in one go when unpaging |
protected boolean |
paging
Are we in paging mode? |
Fields inherited from class org.jboss.messaging.core.ChannelSupport |
acceptReliableMessages, active, channelID, deliveringCount, maxSize, messageRefs, messagesAdded, ms, pm, receiversReady, recoverable, refLock, router, scheduledDeliveries |
Constructor Summary | |
PagingChannelSupport(long channelID,
MessageStore ms,
PersistenceManager pm,
boolean acceptReliableMessages,
boolean recoverable,
int maxSize)
Constructor with default paging params. |
|
PagingChannelSupport(long channelID,
MessageStore ms,
PersistenceManager pm,
boolean acceptReliableMessages,
boolean recoverable,
int maxSize,
int fullSize,
int pageSize,
int downCacheSize)
Constructor specifying paging params. |
Method Summary | |
protected MessageReference |
addFromRefInfo(PersistenceManager.ReferenceInfo info,
java.util.Map refMap)
|
protected void |
addReferenceInMemory(MessageReference ref)
|
protected void |
addToDownCache(MessageReference ref,
boolean cancelling)
|
protected void |
cancelInternal(MessageReference ref)
|
protected void |
doLoad(PersistenceManager.InitialLoadInfo ili)
|
int |
downCacheCount()
|
protected void |
flushDownCache()
|
int |
getMessageCount()
Returns the count of messages stored AND being delivered AND scheduled |
boolean |
isActive()
|
boolean |
isPaging()
|
void |
load()
|
protected void |
loadPagedReferences(int number)
|
protected java.util.Map |
processReferences(java.util.List refInfos)
|
protected MessageReference |
removeFirstInMemory()
|
void |
setPagingParams(int fullSize,
int pageSize,
int downCacheSize)
|
void |
unload()
|
Methods inherited from class org.jboss.messaging.core.ChannelSupport |
acceptReliableMessages, acknowledge, acknowledgeInternal, activate, add, browse, browse, cancel, checkAndSchedule, checkClosed, clear, clearAllScheduledDeliveries, close, contains, deactivate, deliver, deliverInternal, deliverScheduled, getCallback, getChannelID, getDeliveringCount, getMaxSize, getMessagesAdded, getNumberOfReceivers, getScheduledCount, handle, handleInternal, isRecoverable, iterator, memoryRefCount, processMessageBeforeStorage, recoverDeliveries, remove, removeAllReferences, setMaxSize, toString, undelivered |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.List downCache
protected int fullSize
protected int pageSize
protected int downCacheSize
protected boolean paging
protected long firstPagingOrder
protected long nextPagingOrder
Constructor Detail |
public PagingChannelSupport(long channelID, MessageStore ms, PersistenceManager pm, boolean acceptReliableMessages, boolean recoverable, int maxSize)
public PagingChannelSupport(long channelID, MessageStore ms, PersistenceManager pm, boolean acceptReliableMessages, boolean recoverable, int maxSize, int fullSize, int pageSize, int downCacheSize)
Method Detail |
public int getMessageCount()
ChannelSupport
getMessageCount
in interface Channel
getMessageCount
in class ChannelSupport
public int downCacheCount()
public boolean isPaging()
public void setPagingParams(int fullSize, int pageSize, int downCacheSize)
public void load() throws java.lang.Exception
java.lang.Exception
public void unload() throws java.lang.Exception
java.lang.Exception
public boolean isActive()
isActive
in interface Channel
isActive
in class ChannelSupport
protected void loadPagedReferences(int number) throws java.lang.Exception
java.lang.Exception
protected void cancelInternal(MessageReference ref) throws java.lang.Exception
cancelInternal
in class ChannelSupport
java.lang.Exception
protected MessageReference removeFirstInMemory() throws java.lang.Exception
removeFirstInMemory
in class ChannelSupport
java.lang.Exception
protected void addReferenceInMemory(MessageReference ref) throws java.lang.Exception
addReferenceInMemory
in class ChannelSupport
java.lang.Exception
protected void addToDownCache(MessageReference ref, boolean cancelling) throws java.lang.Exception
java.lang.Exception
protected void flushDownCache() throws java.lang.Exception
java.lang.Exception
protected void doLoad(PersistenceManager.InitialLoadInfo ili) throws java.lang.Exception
java.lang.Exception
protected MessageReference addFromRefInfo(PersistenceManager.ReferenceInfo info, java.util.Map refMap)
protected java.util.Map processReferences(java.util.List refInfos) throws java.lang.Exception
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |