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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetStats()voidonCompletion(Optional<Exception> exception) This will be invoked when the callbacks are fully executed.voidonDeserializationCompletion(Optional<Exception> exception, int successKeyCount, int duplicateEntryCount) This will be invoked when Venice Client deserialization is done.voidThis will be invoked when any record deserialization happens.voidonRecordReceived(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:StreamingCallbackThis 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:
onRecordReceivedin interfaceStreamingCallback<K,V> value- : could be null when key doesn't exist in Venice.
-
onCompletion
Description copied from interface:StreamingCallbackThis will be invoked when the callbacks are fully executed.- Specified by:
onCompletionin interfaceStreamingCallback<K,V> - Parameters:
exception- Exception thrown when processing result from Venice.
-
getStats
- Specified by:
getStatsin interfaceTrackingStreamingCallback<K,V>
-
onRecordDeserialized
public void onRecordDeserialized()Description copied from interface:TrackingStreamingCallbackThis will be invoked when any record deserialization happens.- Specified by:
onRecordDeserializedin interfaceTrackingStreamingCallback<K,V>
-
onDeserializationCompletion
public void onDeserializationCompletion(Optional<Exception> exception, int successKeyCount, int duplicateEntryCount) Description copied from interface:TrackingStreamingCallbackThis will be invoked when Venice Client deserialization is done.- Specified by:
onDeserializationCompletionin interfaceTrackingStreamingCallback<K,V> successKeyCount- , this param indicates the total number of existing keys
-
wrap
-