Interface ILogWriter
-
- All Known Implementing Classes:
LogWriter
public interface ILogWriterILogWriter provides functions to insert WAL logs that have already been converted to bytes to a persistent medium.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()release resources occupied by this object, like file streams.voidforce()force the OS/FileSystem to flush its cache to make sure logs are persisted.voidwrite(java.nio.ByteBuffer logBuffer)Write given logs to a persistent medium.
-
-
-
Method Detail
-
write
void write(java.nio.ByteBuffer logBuffer) throws java.io.IOExceptionWrite given logs to a persistent medium. NOTICE: the logs may be cached in the OS/FileSystem, if the OS/FileSystem you are using do not guarantee strong persistency and you want the logs to be persisted immediately, please call force() after calling this method. Notice: do not flip the buffer before calling this method- Parameters:
logBuffer- WAL logs that have been converted to bytes- Throws:
java.io.IOException
-
force
void force() throws java.io.IOExceptionforce the OS/FileSystem to flush its cache to make sure logs are persisted.- Throws:
java.io.IOException
-
close
void close() throws java.io.IOExceptionrelease resources occupied by this object, like file streams.- Throws:
java.io.IOException
-
-