Package org.jgroups.raft.filelog
Class LogEntryStorage
java.lang.Object
org.jgroups.raft.filelog.LogEntryStorage
Stores the
LogEntry into a file.- Since:
- 0.5.4
- Author:
- Pedro Ruivo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddelete()voidforEach(ObjLongConsumer<LogEntry> consumer, long startIndex, long endIndex) longlonglonggetLogEntry(long index) voidopen()voidreinitializeTo(long index, LogEntry firstEntry) voidreload()longremoveNew(long index) voidremoveOld(long index) voiduseFsync(boolean value) intwrite(long startIndex, LogEntries entries)
-
Constructor Details
-
LogEntryStorage
-
-
Method Details
-
open
- Throws:
IOException
-
close
- Throws:
IOException
-
delete
- Throws:
IOException
-
reload
- Throws:
IOException
-
getFirstAppended
public long getFirstAppended() -
getLastAppended
public long getLastAppended() -
getCachedFileSize
public long getCachedFileSize() -
getLogEntry
- Throws:
IOException
-
write
- Throws:
IOException
-
removeOld
- Throws:
IOException
-
reinitializeTo
- Throws:
IOException
-
removeNew
- Throws:
IOException
-
forEach
public void forEach(ObjLongConsumer<LogEntry> consumer, long startIndex, long endIndex) throws IOException - Throws:
IOException
-
useFsync
public void useFsync(boolean value)
-