Package org.voltdb.stream.api.pipeline
Interface VoltStreamSink<T>
- Type Parameters:
T
- type of data sent to downstream system
- All Superinterfaces:
Consumer<T>
,VoltLifecycle
- All Known Implementing Classes:
FileSink
,IterableSink
,StdoutSink
This class encapsulates any integration logic with a downstream system.
The sink is the last element of any pipeline.
Sink's lifecycle is - configure - nextBatchStarts* - consume* - batchProcessed* - commit* - destroy
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
batchProcessed
(long batchId) the callback is invoked when the sink finishes processing a batch of datadefault CommitResult
commit
(ExecutionContext context) the callback is invoked when the sink has to perform any logic assuring data is securely passed to downstream systemdefault void
nextBatchStarts
(long batchId) the callback is invoked when the sink starts processing a new batch of dataMethods inherited from interface org.voltdb.stream.api.pipeline.VoltLifecycle
configure, destroy
-
Method Details
-
nextBatchStarts
default void nextBatchStarts(long batchId) the callback is invoked when the sink starts processing a new batch of data- Parameters:
batchId
- globally unique id to track messages related to current batch of data
-
batchProcessed
default void batchProcessed(long batchId) the callback is invoked when the sink finishes processing a batch of data- Parameters:
batchId
- globally unique id to track messages related to current batch of data
-
commit
the callback is invoked when the sink has to perform any logic assuring data is securely passed to downstream system- Parameters:
context
- runtime context- Returns:
- result of the commit
-