public final class Page extends Object implements Comparable<Page>
Modifier and Type | Field and Description |
---|---|
static int |
SIZE_RECORD |
Constructor and Description |
---|
Page(SimpleString storeName,
StorageManager storageManager,
SequentialFileFactory factory,
SequentialFile file,
int pageId) |
Modifier and Type | Method and Description |
---|---|
void |
addPendingCounter(PageSubscriptionCounter pageSubscriptionCounter)
This will indicate a page that will need to be called on cleanup when the page has been closed and confirmed
|
void |
close(boolean sendEvent) |
void |
close(boolean sendEvent,
boolean waitSync)
sendEvent means it's a close happening from a major event such moveNext.
|
int |
compareTo(Page otherPage) |
boolean |
delete(PagedMessage[] messages) |
boolean |
equals(Object obj) |
SequentialFile |
getFile() |
LivePageCache |
getLiveCache() |
int |
getNumberOfMessages() |
int |
getPageId() |
int |
getSize() |
int |
hashCode() |
boolean |
isLive() |
void |
open() |
List<PagedMessage> |
read() |
List<PagedMessage> |
read(StorageManager storage) |
List<PagedMessage> |
read(StorageManager storage,
boolean onlyLargeMessages) |
PagedMessage |
readMessage(int startOffset,
int startMessageNumber,
int targetMessageNumber) |
void |
setLiveCache(LivePageCache pageCache) |
void |
sync() |
String |
toString() |
void |
write(PagedMessage message) |
public static final int SIZE_RECORD
public Page(SimpleString storeName, StorageManager storageManager, SequentialFileFactory factory, SequentialFile file, int pageId) throws Exception
Exception
public int getPageId()
public void setLiveCache(LivePageCache pageCache)
public LivePageCache getLiveCache()
public PagedMessage readMessage(int startOffset, int startMessageNumber, int targetMessageNumber) throws Exception
Exception
public List<PagedMessage> read() throws Exception
Exception
public List<PagedMessage> read(StorageManager storage) throws Exception
Exception
public List<PagedMessage> read(StorageManager storage, boolean onlyLargeMessages) throws Exception
Exception
public void write(PagedMessage message) throws Exception
Exception
public void close(boolean sendEvent, boolean waitSync) throws Exception
Exception
public boolean isLive()
public boolean delete(PagedMessage[] messages) throws Exception
Exception
public int getNumberOfMessages()
public int getSize()
public int compareTo(Page otherPage)
compareTo
in interface Comparable<Page>
public SequentialFile getFile()
public void addPendingCounter(PageSubscriptionCounter pageSubscriptionCounter)
pageSubscriptionCounter
- Copyright © 2021 JBoss by Red Hat. All rights reserved.