Class DelegatingTrackingCallback<K,V>
java.lang.Object
com.linkedin.venice.client.store.streaming.DelegatingTrackingCallback<K,V>
- All Implemented Interfaces:
StreamingCallback<K,
,V> TrackingStreamingCallback<K,
V>
- Direct Known Subclasses:
ClientComputeRecordStreamDecoder.Callback
public class DelegatingTrackingCallback<K,V>
extends Object
implements TrackingStreamingCallback<K,V>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetStats()
void
onCompletion
(Optional<Exception> exception) This will be invoked when the callbacks are fully executed.void
onDeserializationCompletion
(Optional<Exception> exception, int successKeyCount, int duplicateEntryCount) This will be invoked when Venice Client deserialization is done.void
This will be invoked when any record deserialization happens.void
onRecordReceived
(K key, V value) This function will be invoked when some records are ready to be consumed.static <K,
V> TrackingStreamingCallback<K, V> wrap
(StreamingCallback<K, V> callback)
-
Constructor Details
-
DelegatingTrackingCallback
-
-
Method Details
-
onRecordReceived
Description copied from interface:StreamingCallback
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 customizedStreamingCallback.onRecordReceived(Object, Object)
.- Specified by:
onRecordReceived
in interfaceStreamingCallback<K,
V> value
- : could be null when key doesn't exist in Venice.
-
onCompletion
Description copied from interface:StreamingCallback
This will be invoked when the callbacks are fully executed.- Specified by:
onCompletion
in interfaceStreamingCallback<K,
V> - Parameters:
exception
- Exception thrown when processing result from Venice.
-
getStats
- Specified by:
getStats
in interfaceTrackingStreamingCallback<K,
V>
-
onRecordDeserialized
public void onRecordDeserialized()Description copied from interface:TrackingStreamingCallback
This will be invoked when any record deserialization happens.- Specified by:
onRecordDeserialized
in interfaceTrackingStreamingCallback<K,
V>
-
onDeserializationCompletion
public void onDeserializationCompletion(Optional<Exception> exception, int successKeyCount, int duplicateEntryCount) Description copied from interface:TrackingStreamingCallback
This will be invoked when Venice Client deserialization is done.- Specified by:
onDeserializationCompletion
in interfaceTrackingStreamingCallback<K,
V> successKeyCount
- , this param indicates the total number of existing keys
-
wrap
-