Package org.apache.druid.frame.field
Interface FieldWriter
-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
ComplexFieldWriter
,DoubleFieldWriter
,FloatFieldWriter
,LongFieldWriter
,NumericArrayFieldWriter
,NumericFieldWriter
,StringArrayFieldWriter
,StringFieldWriter
public interface FieldWriter extends Closeable
Helper used to write field values to row-based frames orRowKey
. Most callers should useFrameWriters
to build frames fromColumnSelectorFactory
, rather than using this interface directly. Not thread-safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Releases resources held by this writer.long
writeTo(org.apache.datasketches.memory.WritableMemory memory, long position, long maxSize)
Writes the current selection at the given memory position.
-
-
-
Method Detail
-
writeTo
long writeTo(org.apache.datasketches.memory.WritableMemory memory, long position, long maxSize)
Writes the current selection at the given memory position.- Parameters:
memory
- memory region in little-endian orderposition
- position to writemaxSize
- maximum number of bytes to write- Returns:
- number of bytes written, or -1 if "maxSize" was not enough memory
-
close
void close()
Releases resources held by this writer.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-