Class ClientComputeRecordStreamDecoder<K,V>
- java.lang.Object
-
- com.linkedin.venice.client.store.streaming.ClientComputeRecordStreamDecoder<K,V>
-
- All Implemented Interfaces:
RecordStreamDecoder
,TransportClientStreamingCallback
public class ClientComputeRecordStreamDecoder<K,V> extends java.lang.Object implements RecordStreamDecoder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClientComputeRecordStreamDecoder.Callback<K,V>
-
Constructor Summary
Constructors Constructor Description ClientComputeRecordStreamDecoder(java.util.List<K> keyList, ClientComputeRecordStreamDecoder.Callback<K,V> callback, java.util.concurrent.Executor deserializationExecutor, RecordDeserializer<StreamingFooterRecordV1> streamingFooterRecordDeserializer, java.util.function.Supplier<RecordDeserializer<V>> computeDeserializerProvider, java.util.function.Function<java.lang.Integer,RecordDeserializer<V>> valueDeserializerProvider, java.util.function.BiFunction<CompressionStrategy,java.nio.ByteBuffer,java.nio.ByteBuffer> decompressor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onCompletion(java.util.Optional<VeniceClientException> exception)
This will be invoked when the response is fully completed.void
onDataReceived(java.nio.ByteBuffer chunk)
This will be invoked when a new data chunk is available.void
onHeaderReceived(java.util.Map<java.lang.String,java.lang.String> headers)
This will be invoked when headers are available.
-
-
-
Constructor Detail
-
ClientComputeRecordStreamDecoder
public ClientComputeRecordStreamDecoder(java.util.List<K> keyList, ClientComputeRecordStreamDecoder.Callback<K,V> callback, java.util.concurrent.Executor deserializationExecutor, RecordDeserializer<StreamingFooterRecordV1> streamingFooterRecordDeserializer, java.util.function.Supplier<RecordDeserializer<V>> computeDeserializerProvider, java.util.function.Function<java.lang.Integer,RecordDeserializer<V>> valueDeserializerProvider, java.util.function.BiFunction<CompressionStrategy,java.nio.ByteBuffer,java.nio.ByteBuffer> decompressor)
-
-
Method Detail
-
onHeaderReceived
public void onHeaderReceived(java.util.Map<java.lang.String,java.lang.String> headers)
Description copied from interface:TransportClientStreamingCallback
This will be invoked when headers are available.- Specified by:
onHeaderReceived
in interfaceTransportClientStreamingCallback
-
onDataReceived
public void onDataReceived(java.nio.ByteBuffer chunk)
Description copied from interface:TransportClientStreamingCallback
This will be invoked when a new data chunk is available.- Specified by:
onDataReceived
in interfaceTransportClientStreamingCallback
-
onCompletion
public void onCompletion(java.util.Optional<VeniceClientException> exception)
Description copied from interface:TransportClientStreamingCallback
This will be invoked when the response is fully completed. When any error happens, {@param exception} will contain the underlying exception.- Specified by:
onCompletion
in interfaceTransportClientStreamingCallback
-
-