/** * The following several methods (startLogSegment, rollLogSegment, * writeLogEntry, and truncate) are only called by SegmentedRaftLog which is * protected by RaftServer's lock. * * Thus all the tasks are created and added sequentially. */ void startLogSegment(long startIndex) { addIOTask(new StartLogSegment(startIndex)); }
Task truncate(TruncationSegments ts, long index) { LOG.info("{}: Truncating segments {}, start index {}", name, ts, index); return addIOTask(new TruncateLog(ts, index)); }
/** * The following several methods (startLogSegment, rollLogSegment, * writeLogEntry, and truncate) are only called by SegmentedRaftLog which is * protected by RaftServer's lock. * * Thus all the tasks are created and added sequentially. */ void startLogSegment(long startIndex) { LOG.info("{}: Starting segment from index:{}", name, startIndex); addIOTask(new StartLogSegment(startIndex)); }
Task writeLogEntry(LogEntryProto entry) { return addIOTask(new WriteLog(entry)); }
Task truncate(TruncationSegments ts) { return addIOTask(new TruncateLog(ts)); }
Task writeLogEntry(LogEntryProto entry) { return addIOTask(new WriteLog(entry)); }