|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.messaging.core.impl.ChannelSupport org.jboss.messaging.core.impl.PagingChannelSupport
public abstract class 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 MessageStore |
ms
|
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.impl.ChannelSupport |
---|
active, channelID, deliveringCount, distributor, lock, maxSize, messageRefs, messagesAdded, pm, receiversReady, recoverable, scheduledDeliveries |
Constructor Summary | |
---|---|
PagingChannelSupport(long channelID,
MessageStore ms,
PersistenceManager pm,
boolean recoverable,
int maxSize)
Constructor with default paging params. |
|
PagingChannelSupport(long channelID,
MessageStore ms,
PersistenceManager pm,
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 |
isPaging()
|
void |
load()
Load any references for this channel from storage |
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()
Unload any references for this channel |
Methods inherited from class org.jboss.messaging.core.impl.ChannelSupport |
---|
acknowledge, acknowledgeInternal, activate, browse, cancel, checkAndSchedule, checkClosed, clearAllScheduledDeliveries, close, deactivate, deliver, deliverInternal, deliverScheduled, getCallback, getChannelID, getDeliveringCount, getMaxSize, getMessagesAdded, getReceiversReady, getScheduledCount, handle, handleInternal, isActive, isRecoverable, memoryRefCount, processMessageBeforeStorage, removeAllReferences, setMaxSize, setReceiversReady, undelivered |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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
protected MessageStore ms
Constructor Detail |
---|
public PagingChannelSupport(long channelID, MessageStore ms, PersistenceManager pm, boolean recoverable, int maxSize)
public PagingChannelSupport(long channelID, MessageStore ms, PersistenceManager pm, 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
Channel
java.lang.Exception
public void unload() throws java.lang.Exception
Channel
java.lang.Exception
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 |