Interface FrameColumnWriter
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
ComplexFrameColumnWriter,DoubleArrayFrameColumnWriter,DoubleFrameColumnWriter,FloatArrayFrameColumnWriter,FloatFrameColumnWriter,LongArrayFrameColumnWriter,LongFrameColumnWriter,NumericArrayFrameColumnWriter,StringFrameColumnWriter
Represent writers for the columnar frames.
The class objects must be provided with information on what values to write, usually provided as a
ColumnValueSelector and where to write to, usually temporary growable memory
addSelection() will be called repeatedly, as the current value to write gets updated. For the final write,
call writeTo(org.apache.datasketches.memory.WritableMemory, long), which will copy the values we have added so far to the destination memory.-
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds the current value to the writervoidclose()longsize()Size (in bytes) of the column data that will get written whenwriteTo(org.apache.datasketches.memory.WritableMemory, long)will be calledvoidundo()Reverts the last added value.longwriteTo(org.apache.datasketches.memory.WritableMemory memory, long position) Writes the value of the column to the provided memory at the given position
-
Method Details
-
addSelection
boolean addSelection()Adds the current value to the writer -
undo
void undo()Reverts the last added value. Undo calls cannot be called in successsion -
size
long size()Size (in bytes) of the column data that will get written whenwriteTo(org.apache.datasketches.memory.WritableMemory, long)will be called -
writeTo
long writeTo(org.apache.datasketches.memory.WritableMemory memory, long position) Writes the value of the column to the provided memory at the given position -
close
void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-