Class BinaryLogFileWriter
java.lang.Object
io.deephaven.enterprise.binlog.writer.GatheringChannelWriter
io.deephaven.enterprise.binlog.writer.BinaryLogFileWriter
- All Implemented Interfaces:
SinglePartitionWriter,Closeable,AutoCloseable
A non-rotating writer for a Deephaven binary log format file. Useful for testing.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BinaryLogFileWritercreate(@NotNull ByteBuffer header, @NotNull Path path) Creates a new file withwrite access.voidforce(boolean metaData) Callforceon the underlyingFileChannel.static BinaryLogFileWriterof(@NotNull ByteBuffer header, @NotNull FileChannel channel) Create a new file channel writer withchannel.Methods inherited from class io.deephaven.enterprise.binlog.writer.GatheringChannelWriter
close, writeDataToPartition
-
Method Details
-
of
public static BinaryLogFileWriter of(@NotNull @NotNull ByteBuffer header, @NotNull @NotNull FileChannel channel) throws IOException Create a new file channel writer withchannel. Theheaderwill be written to the file.- Parameters:
header- the headerchannel- the channel- Returns:
- the file channel writer
- Throws:
IOException- if an IO error occurs
-
create
public static BinaryLogFileWriter create(@NotNull @NotNull ByteBuffer header, @NotNull @NotNull Path path) throws IOException Creates a new file withwrite access. Theheaderwill be written to the file.- Parameters:
header- the headerpath- the path of the file to create- Returns:
- the file channel writer
- Throws:
IOException- if an IO error occurs- See Also:
-
force
Callforceon the underlyingFileChannel.- Parameters:
metaData- Iftruethen this method is required to force changes to both the file's content and metadata to be written to storage; otherwise, it need only force content changes to be written- Throws:
IOException- If some I/O error occurs
-