Package com.linkedin.venice.writer
Class ChainedPubSubCallback
java.lang.Object
com.linkedin.venice.writer.ChainedPubSubCallback
- All Implemented Interfaces:
PubSubProducerCallback
This class bundles a main
PubSubProducerCallback and a list of dependent PubSubProducerCallback.
When it completes either successfully or exceptionally, it will pass on the same result to the main callback and the
list of the dependent callbacks.
This class is intended to be used inside BatchingVeniceWriter for compacting buffered messages with the same key.-
Constructor Summary
ConstructorsConstructorDescriptionChainedPubSubCallback(PubSubProducerCallback mainCallback, List<PubSubProducerCallback> dependentCallbackList) -
Method Summary
Modifier and TypeMethodDescriptionvoidonCompletion(PubSubProduceResult produceResult, Exception exception) exception will be null if request was completed without an error.voidsetInternalCallback(PubSubProducerCallback internalCallback) Insert an internalPubSubProducerCallbackto main callback and the dependent callbacks.
-
Constructor Details
-
ChainedPubSubCallback
public ChainedPubSubCallback(PubSubProducerCallback mainCallback, List<PubSubProducerCallback> dependentCallbackList)
-
-
Method Details
-
onCompletion
Description copied from interface:PubSubProducerCallbackexception will be null if request was completed without an error.- Specified by:
onCompletionin interfacePubSubProducerCallback
-
setInternalCallback
Insert an internalPubSubProducerCallbackto main callback and the dependent callbacks.- Specified by:
setInternalCallbackin interfacePubSubProducerCallback
-