Interface StreamingCallback<K,V>
- All Known Subinterfaces:
TrackingStreamingCallback<K,
V>
- All Known Implementing Classes:
ClientComputeRecordStreamDecoder.Callback
,DelegatingTrackingCallback
public interface StreamingCallback<K,V>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onCompletion
(Optional<Exception> exception) This will be invoked when the callbacks are fully executed.void
onRecordReceived
(K key, V value) This function will be invoked when some records are ready to be consumed.
-
Method Details
-
onRecordReceived
This function will be invoked when some records are ready to be consumed. This function could be invoked in parallel when data records arrive at the same time, and if you want to need to do sequential processing, you need to synchronize it in the customizedonRecordReceived(Object, Object)
.- Parameters:
key
-value
- : could be null when key doesn't exist in Venice.
-
onCompletion
This will be invoked when the callbacks are fully executed.- Parameters:
exception
- Exception thrown when processing result from Venice.
-