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

public interface VoltStreamSink<T> extends Consumer<T>, VoltLifecycle
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 Type
    Method
    Description
    default void
    batchProcessed(long batchId)
    the callback is invoked when the sink finishes processing a batch of data
    default CommitResult
    the callback is invoked when the sink has to perform any logic assuring data is securely passed to downstream system
    default void
    nextBatchStarts(long batchId)
    the callback is invoked when the sink starts processing a new batch of data

    Methods inherited from interface org.voltdb.stream.api.Consumer

    consume

    Methods 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

      default CommitResult commit(ExecutionContext context)
      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