Class Page
- java.lang.Object
-
- org.apache.activemq.artemis.core.paging.impl.Page
-
public final class Page extends Object
-
-
Constructor Summary
Constructors Constructor Description Page(SimpleString storeName, StorageManager storageManager, SequentialFileFactory factory, SequentialFile file, long pageId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose(boolean sendEvent)voidclose(boolean sendEvent, boolean waitSync)sendEvent means it's a close happening from a major event such moveNext.StringdebugMessages()booleandelete(LinkedList<PagedMessage> messages)booleanequals(Object o)SequentialFilegetFile()LinkedList<PagedMessage>getMessages()intgetNumberOfMessages()longgetPageId()longgetSize()inthashCode()booleanisOpen()LinkedListIterator<PagedMessage>iterator()booleanopen(boolean createFile)LinkedList<PagedMessage>read()LinkedList<PagedMessage>read(StorageManager storage)LinkedList<PagedMessage>read(StorageManager storage, boolean onlyLargeMessages)intreadNumberOfMessages()voidreleaseTask(Consumer<Page> releaseTask)to be called when the page is supposed to be releasedvoidsync()StringtoString()intusageDown()voidusageExhaust()intusageUp()voidwrite(PagedMessage message)voidwriteDirect(PagedMessage message)This write will not interact back with the storage manager.
-
-
-
Constructor Detail
-
Page
public Page(SimpleString storeName, StorageManager storageManager, SequentialFileFactory factory, SequentialFile file, long pageId) throws Exception
- Throws:
Exception
-
-
Method Detail
-
usageExhaust
public void usageExhaust()
-
usageUp
public int usageUp()
-
usageDown
public int usageDown()
-
releaseTask
public void releaseTask(Consumer<Page> releaseTask)
to be called when the page is supposed to be released
-
getPageId
public long getPageId()
-
iterator
public LinkedListIterator<PagedMessage> iterator() throws Exception
- Throws:
Exception
-
getMessages
public LinkedList<PagedMessage> getMessages() throws Exception
- Throws:
Exception
-
read
public LinkedList<PagedMessage> read() throws Exception
- Throws:
Exception
-
read
public LinkedList<PagedMessage> read(StorageManager storage) throws Exception
- Throws:
Exception
-
read
public LinkedList<PagedMessage> read(StorageManager storage, boolean onlyLargeMessages) throws Exception
- Throws:
Exception
-
write
public void write(PagedMessage message) throws Exception
- Throws:
Exception
-
writeDirect
public void writeDirect(PagedMessage message) throws Exception
This write will not interact back with the storage manager. To avoid ping pongs with Journal retaining events and any other stuff.- Throws:
Exception
-
isOpen
public boolean isOpen()
-
close
public void close(boolean sendEvent, boolean waitSync) throws ExceptionsendEvent means it's a close happening from a major event such moveNext. While reading the cache we don't need (and shouldn't inform the backup- Throws:
Exception
-
delete
public boolean delete(LinkedList<PagedMessage> messages) throws Exception
- Throws:
Exception
-
getNumberOfMessages
public int getNumberOfMessages()
-
getSize
public long getSize()
-
getFile
public SequentialFile getFile()
-
-