Interface FrameColumnWriter
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
ComplexFrameColumnWriter,DoubleArrayFrameColumnWriter,DoubleFrameColumnWriter,FloatArrayFrameColumnWriter,FloatFrameColumnWriter,LongArrayFrameColumnWriter,LongFrameColumnWriter,NumericArrayFrameColumnWriter,StringFrameColumnWriter
public interface FrameColumnWriter extends Closeable
Represent writers for the columnar frames. The class objects must be provided with information on what values to write, usually provided as aColumnValueSelectorand where to write to, usually temporary growable memoryaddSelection()will be called repeatedly, as the current value to write gets updated. For the final write, callwriteTo(org.apache.datasketches.memory.WritableMemory, long), which will copy the values we have added so far to the destination memory.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddSelection()Adds 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 Detail
-
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
-
-