Class BufThenFileOutputStream

java.lang.Object
java.io.OutputStream
org.opendaylight.raft.spi.BufThenFileOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public final class BufThenFileOutputStream extends OutputStream
An OutputStream which stats off writing to a ByteBuf, but switches to a file.
  • Constructor Details

    • BufThenFileOutputStream

      public BufThenFileOutputStream(Path directory, ByteBuf buf, int threshold)
      Default constructor.
      Parameters:
      directory - the directory where to create temporary files
      buf - the output buffer
      threshold - the cutover threshold
  • Method Details