Class ChunkWriter.Context

java.lang.Object
io.deephaven.util.referencecounting.ReferenceCounted
io.deephaven.extensions.barrage.chunk.ChunkWriter.Context
All Implemented Interfaces:
LogOutputAppendable, SafeCloseable, AutoCloseable
Direct Known Subclasses:
ListChunkWriter.Context, MapChunkWriter.Context, UnionChunkWriter.Context, VarBinaryChunkWriter.Context
Enclosing interface:
ChunkWriter<SOURCE_CHUNK_TYPE extends Chunk<Values>>

public static class ChunkWriter.Context extends ReferenceCounted implements SafeCloseable
  • Constructor Details

    • Context

      public Context(Chunk<Values> chunk, long rowOffset)
      Create a new context for the given chunk.
      Parameters:
      chunk - the chunk of data to be written
      rowOffset - the offset into the logical message potentially spread over multiple chunks
  • Method Details

    • getRowOffset

      public long getRowOffset()
      Returns:
      the offset into the logical message potentially spread over multiple chunks
    • getLastRowOffset

      public long getLastRowOffset()
      Returns:
      the offset of the final row this writer can produce.
    • size

      public int size()
      Returns:
      the number of rows in the wrapped chunk
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface SafeCloseable
    • onReferenceCountAtZero

      protected void onReferenceCountAtZero()
      Description copied from class: ReferenceCounted
      Callback method that will be invoked when the reference count returns to zero.
      Specified by:
      onReferenceCountAtZero in class ReferenceCounted