public class DelegatingRaftLog extends Object implements RaftLog
PHYSICAL_LOG_DIRECTORY_NAME| Constructor and Description |
|---|
DelegatingRaftLog(RaftLog inner) |
| Modifier and Type | Method and Description |
|---|---|
long |
append(RaftLogEntry... entry)
Appends entry to the end of the log.
|
long |
appendIndex() |
RaftLogCursor |
getEntryCursor(long fromIndex)
Returns a
RaftLogCursor of RaftLogEntrys from the specified index until the end of the log |
long |
prevIndex() |
long |
prune(long safeIndex)
Attempt to prune (delete) a prefix of the log, no further than the safeIndex.
|
long |
readEntryTerm(long logIndex)
Reads the term associated with the entry at the supplied index.
|
long |
skip(long index,
long term)
Skip up to the supplied index if it is not already present.
|
void |
truncate(long fromIndex)
Truncates the log starting from the supplied index.
|
public DelegatingRaftLog(RaftLog inner)
public long append(RaftLogEntry... entry) throws IOException
RaftLogappend in interface RaftLogentry - The log entry.IOExceptionpublic void truncate(long fromIndex)
throws IOException
RaftLogtruncate in interface RaftLogfromIndex - The start index (inclusive).IOExceptionpublic long prune(long safeIndex)
throws IOException
RaftLogprune in interface RaftLogsafeIndex - Highest index that may be pruned.IOExceptionpublic long skip(long index,
long term)
throws IOException
RaftLogskip in interface RaftLogindex - the index we want to skip toterm - the term of the indexIOExceptionpublic long appendIndex()
appendIndex in interface ReadableRaftLogpublic long prevIndex()
prevIndex in interface ReadableRaftLogpublic long readEntryTerm(long logIndex)
throws IOException
ReadableRaftLogreadEntryTerm in interface ReadableRaftLoglogIndex - The index of the log entry.IOExceptionpublic RaftLogCursor getEntryCursor(long fromIndex) throws IOException
ReadableRaftLogRaftLogCursor of RaftLogEntrys from the specified index until the end of the loggetEntryCursor in interface ReadableRaftLogfromIndex - The log index at which the cursor should be positionedIOExceptionCopyright © 2002–2016 The Neo4j Graph Database Project. All rights reserved.