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>>
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.deephaven.util.referencecounting.ReferenceCounted
append, decrementReferenceCount, forceReferenceCountToZero, getReferenceCountDebug, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCount
-
Constructor Details
-
Context
Create a new context for the given chunk.- Parameters:
chunk- the chunk of data to be writtenrowOffset- 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceSafeCloseable
-
onReferenceCountAtZero
protected void onReferenceCountAtZero()Description copied from class:ReferenceCountedCallback method that will be invoked when the reference count returns to zero.- Specified by:
onReferenceCountAtZeroin classReferenceCounted
-