Class LivePageCacheImpl
- java.lang.Object
-
- org.apache.activemq.artemis.core.paging.cursor.impl.LivePageCacheImpl
-
- All Implemented Interfaces:
AutoCloseable,BulkPageCache,LivePageCache,PageCache,SoftValueLongObjectHashMap.ValueCache
public final class LivePageCacheImpl extends Object implements LivePageCache
This is the same as PageCache, however this is for the page that's being currently written.
-
-
Constructor Summary
Constructors Constructor Description LivePageCacheImpl(long pageId)LivePageCacheImpl(long pageId, PagedMessage[] initialMessages)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLiveMessage(PagedMessage message)voidclose()PagedMessagegetMessage(PagePosition pagePosition)PagedMessage[]getMessages()intgetNumberOfMessages()longgetPageId()booleanisLive()StringtoString()
-
-
-
Constructor Detail
-
LivePageCacheImpl
public LivePageCacheImpl(long pageId)
-
LivePageCacheImpl
public LivePageCacheImpl(long pageId, PagedMessage[] initialMessages)
-
-
Method Detail
-
getNumberOfMessages
public int getNumberOfMessages()
- Specified by:
getNumberOfMessagesin interfacePageCache
-
getMessage
public PagedMessage getMessage(PagePosition pagePosition)
- Specified by:
getMessagein interfacePageCache- Parameters:
pagePosition- page position- Returns:
-
isLive
public boolean isLive()
- Specified by:
isLivein interfaceSoftValueLongObjectHashMap.ValueCache
-
addLiveMessage
public void addLiveMessage(PagedMessage message)
- Specified by:
addLiveMessagein interfaceLivePageCache
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacePageCache
-
getMessages
public PagedMessage[] getMessages()
- Specified by:
getMessagesin interfaceBulkPageCache
-
-