Interface WriterEvents.ColumnWriterListener
- All Known Implementing Classes:
ColumnState.PrimitiveColumnState
- Enclosing interface:
- WriterEvents
public static interface WriterEvents.ColumnWriterListener
Listener (callback) for vector overflow events. To be optionally
implemented and bound by the client code of the writer. If no
listener is bound, and a vector overflows, then an exception is
thrown.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canExpand
(ScalarWriter writer, int delta) A writer wants to expand its vector.void
overflowed
(ScalarWriter writer) Alert the listener that a vector has overflowed.
-
Method Details
-
overflowed
Alert the listener that a vector has overflowed. Upon return, all writers must have a new set of buffers available, ready to accept the in-flight value that triggered the overflow.- Parameters:
writer
- the writer that triggered the overflow
-
canExpand
A writer wants to expand its vector. Allows the listener to either allow the growth, or trigger and overflow to limit batch size.- Parameters:
writer
- the writer that wishes to grow its vectordelta
- the amount by which the vector is to grow- Returns:
- true if the vector can be grown, false if the writer
should instead trigger an overflow by calling
overflowed()
-