protected static class LoggedBookmarkStore.Subscription extends java.lang.Object implements Subscription
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_recoveryTimestamp
The last-modified timestamp of the backing bookmark log file, just
before recovery is initiated.
|
Constructor and Description |
---|
Subscription() |
Modifier and Type | Method and Description |
---|---|
void |
discard(long index) |
Field |
getLastPersisted() |
Field |
getMostRecent() |
protected Field |
getMostRecent(boolean updateRecovery_) |
Field |
getMostRecentList(boolean useList) |
long |
getOldestBookmarkSeq() |
BookmarkRangeField |
getRange() |
java.lang.String |
getRecoveryTimestamp() |
void |
init(Field subscriptionId,
LoggedBookmarkStore parent) |
boolean |
isDiscarded(BookmarkField bookmark)
Check to see if this message is older than the most recent one seen,
and if it is, then check to see if it is discarded.
|
boolean |
justRecovered()
Call on a Subscription object just after recovery is performed to
convert logged entries into recovery entries and set the publishers
cache state to the earliest sequence seen for each publisher minus
one.
|
long |
log(BookmarkField bookmark) |
void |
reset()
Reset the state of this subscription object such that it can be
returned to the pool for reuse.
|
void |
setLastPersisted(BookmarkField bookmark) |
void |
setLastPersisted(long bookmark)
Deprecated.
use
setLastPersisted(BookmarkField) instead. |
static void |
setPublishersToDiscarded(java.util.List<BookmarkRingBuffer.Entry> active,
java.util.Map<java.lang.Long,java.lang.Long> publishers) |
protected void |
setRecoveryTimestamp(java.lang.String rts) |
void |
setResizeHandler(BookmarkStoreResizeHandler handler,
BookmarkStore store) |
protected volatile java.lang.String _recoveryTimestamp
public void reset()
public void init(Field subscriptionId, LoggedBookmarkStore parent) throws java.io.IOException
java.io.IOException
public java.lang.String getRecoveryTimestamp()
protected final void setRecoveryTimestamp(java.lang.String rts)
public long log(BookmarkField bookmark) throws java.io.IOException, CommandException
log
in interface Subscription
java.io.IOException
CommandException
public void discard(long index) throws java.io.IOException
discard
in interface Subscription
java.io.IOException
public boolean isDiscarded(BookmarkField bookmark) throws java.io.IOException
isDiscarded
in interface Subscription
java.io.IOException
public Field getLastPersisted()
public BookmarkRangeField getRange()
getRange
in interface Subscription
public Field getMostRecent()
getMostRecent
in interface Subscription
protected Field getMostRecent(boolean updateRecovery_)
public Field getMostRecentList(boolean useList)
getMostRecentList
in interface Subscription
@Deprecated public void setLastPersisted(long bookmark) throws java.io.IOException
setLastPersisted(BookmarkField)
instead.setLastPersisted
in interface Subscription
bookmark
- Used to be the bookmark sequence number.java.io.IOException
public void setLastPersisted(BookmarkField bookmark) throws java.io.IOException
setLastPersisted
in interface Subscription
java.io.IOException
public long getOldestBookmarkSeq()
getOldestBookmarkSeq
in interface Subscription
public boolean justRecovered()
public static void setPublishersToDiscarded(java.util.List<BookmarkRingBuffer.Entry> active, java.util.Map<java.lang.Long,java.lang.Long> publishers)
public void setResizeHandler(BookmarkStoreResizeHandler handler, BookmarkStore store)
setResizeHandler
in interface Subscription