public class LogEntry extends Object
Modifier and Type | Field and Description |
---|---|
static Comparator<LogEntry> |
SORT_BY_INDEX
Sorts instances by log index.
|
Modifier and Type | Method and Description |
---|---|
int |
getAge()
Get the age of this log entry since instantiation.
|
String[] |
getConfigChange()
Get the cluster config change associated with this log entry, if any.
|
File |
getFile()
Get the on-disk file for this log entry.
|
long |
getFileSize()
Get the size of the on-disk file for this log entry.
|
long |
getIndex()
Get the index of this instance.
|
long |
getTerm()
Get the term of this instance.
|
static long[] |
parseFileName(String fileName)
Parse a log file name, extracting the log term and index.
|
String |
toString() |
public static final Comparator<LogEntry> SORT_BY_INDEX
public int getAge()
public long getTerm()
public long getIndex()
public String[] getConfigChange()
The returned array is a copy; changes have no effect on this instance.
RaftKVTransaction.configChange
public long getFileSize()
public File getFile()
public static long[] parseFileName(String fileName)
fileName
- file name[index, term]
, or null if parse failsIllegalArgumentException
- if fileName
is nullCopyright © 2022. All rights reserved.