Interface WritableFrameChannel

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
ComposingWritableFrameChannel, WritableFrameFileChannel

public interface WritableFrameChannel extends Closeable
Interface for writing a sequence of result batches. Supports nonblocking writes through the writabilityFuture() method. May be implemented using an in-memory queue, disk file, stream, etc. Channels implementing this interface are used by a single writer; they do not support concurrent writes. Despite its name, instances of this class can typically accept any RowsAndColumns through the write(RowsAndColumns) method.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Partition number used when there is no meaningful partition to associate with a batch of data.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Finish writing to this channel.
    void
    fail(Throwable cause)
    Called prior to close() if the writer has failed.
    boolean
    Whether close() has been called on this channel.
    com.google.common.util.concurrent.ListenableFuture<?>
    Returns a future that resolves when write(org.apache.druid.query.rowsandcols.RowsAndColumns, int) is able to receive a new batch of data without blocking or throwing an exception.
    default void
    write(Frame frame)
    Writes a frame without an attached partition number.
    default void
    write(Frame frame, int partitionNumber)
    Writes a frame with an attached partition number.
    default void
    Writes a batch of data without an attached partition number.
    void
    write(RowsAndColumns rac, int partitionNumber)
    Writes a batch of data with an attached partition number.