public class PartitionState extends Object
| Constructor and Description |
|---|
PartitionState() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToFailoverLog(long seqno,
long vbuuid)
Deprecated.
in favor of
setFailoverLog(List) |
static PartitionState |
fromOffset(StreamOffset offset) |
CollectionsManifest |
getCollectionsManifest() |
long |
getCollectionsManifestUid() |
long |
getEndSeqno()
Returns the current end sequence number.
|
List<FailoverLogEntry> |
getFailoverLog()
Returns the full failover log stored, in sorted order.
|
KeyExtractor |
getKeyExtractor() |
long |
getLastUuid()
Convenience method to get the last UUID returned on the failover log.
|
StreamOffset |
getOffset() |
SnapshotMarker |
getSnapshot() |
long |
getSnapshotEndSeqno()
Returns the current snapshot end sequence number.
|
long |
getSnapshotStartSeqno()
Returns the current snapshot start sequence number.
|
long |
getStartSeqno()
Returns the current start sequence number.
|
boolean |
isAtEnd()
Check if the current partition is at the end (start >= end seqno).
|
void |
setCollectionsManifest(CollectionsManifest collectionsManifest) |
void |
setCollectionsManifestUid(long collectionsManifestUid) |
void |
setEndSeqno(long endSeqno)
Allows to set the current end sequence number.
|
void |
setFailoverLog(List<FailoverLogEntry> log)
Sets the failover log.
|
void |
setKeyExtractor(KeyExtractor keyExtractor) |
void |
setSnapshot(SnapshotMarker snapshot) |
void |
setSnapshotEndSeqno(long snapshotEndSeqno)
Deprecated.
in favor of
setSnapshot(SnapshotMarker) |
void |
setSnapshotStartSeqno(long snapshotStartSeqno)
Deprecated.
in favor of
setSnapshot(SnapshotMarker) |
void |
setStartSeqno(long startSeqno)
Allows to set the current start sequence number.
|
String |
toString() |
public static PartitionState fromOffset(StreamOffset offset)
public long getCollectionsManifestUid()
public void setCollectionsManifestUid(long collectionsManifestUid)
public CollectionsManifest getCollectionsManifest()
public void setCollectionsManifest(CollectionsManifest collectionsManifest)
public KeyExtractor getKeyExtractor()
public void setKeyExtractor(KeyExtractor keyExtractor)
public long getEndSeqno()
public long getStartSeqno()
public void setStartSeqno(long startSeqno)
public void setEndSeqno(long endSeqno)
public List<FailoverLogEntry> getFailoverLog()
public void setFailoverLog(List<FailoverLogEntry> log)
@Deprecated public void addToFailoverLog(long seqno, long vbuuid)
setFailoverLog(List)seqno - the sequence number.vbuuid - the uuid for the sequence.public long getSnapshotStartSeqno()
@Deprecated public void setSnapshotStartSeqno(long snapshotStartSeqno)
setSnapshot(SnapshotMarker)public void setSnapshot(SnapshotMarker snapshot)
public SnapshotMarker getSnapshot()
public long getSnapshotEndSeqno()
@Deprecated public void setSnapshotEndSeqno(long snapshotEndSeqno)
setSnapshot(SnapshotMarker)public boolean isAtEnd()
public long getLastUuid()
Note that if the failover log is empty, 0 is sent out to indicate the start.
The server inserts failover records into the head of the list, so the first one is the most recent.
public StreamOffset getOffset()
Copyright © 2021 Couchbase, Inc.. All rights reserved.