public abstract class DistributionStrategy extends Object
Constructor and Description |
---|
DistributionStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
destinationAvailable(Integer destinationId)
Remove a destination to available set of destination IDs.
|
void |
destinationFailed(Integer destinationId)
Remove a given destination from available set of destination IDs.
|
int |
getActiveDestinationCount()
Get the active number of destinations
|
abstract 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.
|
abstract 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.
|
public abstract void init(io.siddhi.query.api.definition.StreamDefinition streamDefinition, OptionHolder transportOptionHolder, OptionHolder distributionOptionHolder, List<OptionHolder> destinationOptionHolders, ConfigReader configReader)
streamDefinition
- The stream attached to the sink this DistributionStrategy is used intransportOptionHolder
- Sink options of the sink which uses this DistributionStrategydistributionOptionHolder
- The option under @destination of the relevant sink.destinationOptionHolders
- The list of options under @destination of the relevant sink.configReader
- This hold the DistributionStrategy
extensions configuration reader.public abstract List<Integer> getDestinationsToPublish(Object payload, DynamicOptions transportOptions)
payload
- payload of the messagetransportOptions
- Dynamic transport options of the sinkpublic void destinationFailed(Integer destinationId)
destinationId
- the ID of the destination to be removedpublic void destinationAvailable(Integer destinationId)
destinationId
- the ID of the destination to be check for availability.public int getActiveDestinationCount()
Copyright © 2021. All rights reserved.