public class RoundRobinDistributionStrategy extends DistributionStrategy
Constructor and Description |
---|
RoundRobinDistributionStrategy() |
Modifier and Type | Method and Description |
---|---|
List<Integer> |
getDestinationsToPublish(Object payload,
DynamicOptions transportOptions)
This method tells the ID(s) of the destination(s) to which a given messages should be sent.
|
void |
init(io.siddhi.query.api.definition.StreamDefinition streamDefinition,
OptionHolder transportOptionHolder,
OptionHolder distributionOptionHolder,
List<OptionHolder> destinationOptionHolders,
ConfigReader configReader)
Initialize the Distribution strategy with the information it will require to make decisions.
|
destinationAvailable, destinationFailed, getActiveDestinationCount
public void init(io.siddhi.query.api.definition.StreamDefinition streamDefinition, OptionHolder transportOptionHolder, OptionHolder distributionOptionHolder, List<OptionHolder> destinationOptionHolders, ConfigReader configReader)
init
in class DistributionStrategy
streamDefinition
- The stream attached to the sink this DistributionStrategy is used intransportOptionHolder
- Sink options of the sink which uses this DistributionStrategydestinationOptionHolders
- The list of options under @destination of the relevant sink.configReader
- This hold the RoundRobinDistributionStrategy
configuration reader.distributionOptionHolder
- The option under @destination of the relevant sink.public List<Integer> getDestinationsToPublish(Object payload, DynamicOptions transportOptions)
getDestinationsToPublish
in class DistributionStrategy
payload
- payload of the messagetransportOptions
- Dynamic transport options of the sinkCopyright © 2019. All rights reserved.