Class BinaryLogFileWriter

java.lang.Object
io.deephaven.enterprise.binlog.writer.GatheringChannelWriter
io.deephaven.enterprise.binlog.writer.BinaryLogFileWriter
All Implemented Interfaces:
SinglePartitionWriter, Closeable, AutoCloseable

public final class BinaryLogFileWriter extends GatheringChannelWriter
A non-rotating writer for a Deephaven binary log format file. Useful for testing.
  • Method Details

    • of

      public static BinaryLogFileWriter of(@NotNull @NotNull ByteBuffer header, @NotNull @NotNull FileChannel channel) throws IOException
      Create a new file channel writer with channel. The header will be written to the file.
      Parameters:
      header - the header
      channel - 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 with write access. The header will be written to the file.
      Parameters:
      header - the header
      path - the path of the file to create
      Returns:
      the file channel writer
      Throws:
      IOException - if an IO error occurs
      See Also:
    • force

      public void force(boolean metaData) throws IOException
      Call force on the underlying FileChannel.
      Parameters:
      metaData - If true then 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