public class TierTopicSnapshotObject extends Object implements SequencedObject
Constructor and Description |
---|
TierTopicSnapshotObject(long startTimestampMs,
long endTimestampMs,
EpochAndSeqNumber current,
EpochAndSeqNumber previous) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(SequencedObject o) |
EpochAndSeqNumber |
currentEpochAndSeqNumber() |
static TierTopicSnapshotObject |
decodeSnapshotName(String key)
Helper utility to decode the snapshot file name
|
Path |
encodeSnapshotName()
Helper utility to encode the snapshot file name
File format:
|
long |
endTimestampMs() |
boolean |
equals(Object o) |
static long |
getDaysFromEpoch(long timeMs) |
static String |
getDirName(long timeMs) |
static String |
getDirNameWithDayPrefix(long timeMs) |
int |
hashCode() |
Path |
path() |
EpochAndSeqNumber |
previousEpochAndSeqNumber() |
long |
startTimestampMs() |
String |
toString() |
public TierTopicSnapshotObject(long startTimestampMs, long endTimestampMs, EpochAndSeqNumber current, EpochAndSeqNumber previous)
public Path encodeSnapshotName()
public static String getDirName(long timeMs)
public static String getDirNameWithDayPrefix(long timeMs)
public static long getDaysFromEpoch(long timeMs)
public static TierTopicSnapshotObject decodeSnapshotName(String key)
key
- the snapshot file's keyIllegalArgumentException
- if file name is not correctly encodedpublic long startTimestampMs()
public long endTimestampMs()
public EpochAndSeqNumber currentEpochAndSeqNumber()
currentEpochAndSeqNumber
in interface SequencedObject
public EpochAndSeqNumber previousEpochAndSeqNumber()
previousEpochAndSeqNumber
in interface SequencedObject
public Path path()
path
in interface SequencedObject
public int compareTo(SequencedObject o)
compareTo
in interface Comparable<SequencedObject>