Class Page
java.lang.Object
org.apache.activemq.artemis.core.paging.impl.Page
-
Constructor Summary
ConstructorsConstructorDescriptionPage(SimpleString storeName, StorageManager storageManager, SequentialFileFactory factory, SequentialFile file, long pageId) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(boolean sendReplicaClose) voidclose(boolean sendReplicaClose, boolean waitSync) sendEvent means it's a close happening from a major event such moveNext.booleandelete(LinkedList<PagedMessage> messages) booleangetFile()intlonglonggetSize()inthashCode()booleanisOpen()iterator()booleanopen(boolean createFile) read()read(StorageManager storage) read(StorageManager storage, boolean onlyLargeMessages) intvoidreleaseTask(Consumer<Page> releaseTask) to be called when the page is supposed to be releasedvoidsync()toString()voidtrySync()intvoidintusageUp()voidwrite(PagedMessage message, boolean lineUp, boolean originallyReplicated) voidwriteDirect(PagedMessage message) This write will not interact back with the storage manager.
-
Constructor Details
-
Page
public Page(SimpleString storeName, StorageManager storageManager, SequentialFileFactory factory, SequentialFile file, long pageId) throws Exception - Throws:
Exception
-
-
Method Details
-
usageExhaust
public void usageExhaust() -
usageUp
public int usageUp() -
usageDown
public int usageDown() -
releaseTask
to be called when the page is supposed to be released -
getPageId
public long getPageId() -
iterator
- Throws:
Exception
-
getMessages
- Throws:
Exception
-
read
- Throws:
Exception
-
read
- Throws:
Exception
-
read
public LinkedList<PagedMessage> read(StorageManager storage, boolean onlyLargeMessages) throws Exception - Throws:
Exception
-
debugMessages
- Throws:
Exception
-
write
public void write(PagedMessage message, boolean lineUp, boolean originallyReplicated) throws Exception - Throws:
Exception
-
writeDirect
This write will not interact back with the storage manager. To avoid ping pongs with Journal retaining events and any other stuff.- Throws:
Exception
-
sync
- Throws:
Exception
-
trySync
- Throws:
IOException
-
isOpen
public boolean isOpen() -
open
- Throws:
Exception
-
close
- Throws:
Exception
-
close
sendEvent 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
- Throws:
Exception
-
readNumberOfMessages
- Throws:
Exception
-
getNumberOfMessages
public int getNumberOfMessages() -
getSize
public long getSize() -
toString
-
equals
-
hashCode
public int hashCode() -
getFile
-