public class MultiClientDistributedSink extends DistributedTransport
Sink
instance connecting to each destination. This class interacts
with Sink interface and it does not make any assumptions on the underlying transport implementation.Modifier and Type | Class and Description |
---|---|
class |
MultiClientDistributedSink.MultiClientConnectionCallback
Connection callback to notify DistributionStrategy about new connection initiations and failures
|
DistributedTransport.ConnectionCallback
Sink.OnErrorAction
siddhiAppContext, strategy, streamDefinition
isTryingToConnect
Constructor and Description |
---|
MultiClientDistributedSink() |
Modifier and Type | Method and Description |
---|---|
void |
connect()
Will be called to connect to the backend before events are published
|
void |
destroy()
Will be called at the end to clean all the resources consumed
|
void |
disconnect()
Will be called after all publishing is done, or when ConnectionUnavailableException is thrown
|
protected ServiceDeploymentInfo |
exposeServiceDeploymentInfo()
Give information to the deployment about the service exposed by the sink.
|
List<ServiceDeploymentInfo> |
getServiceDeploymentInfoList() |
Class[] |
getSupportedInputEventClasses() |
void |
initTransport(OptionHolder sinkOptionHolder,
List<OptionHolder> destinationOptionHolders,
Map<String,String> deploymentProperties,
List<Map<String,String>> destinationDeploymentProperties,
io.siddhi.query.api.annotation.Annotation sinkAnnotation,
ConfigReader sinkConfigReader,
DistributionStrategy strategy,
String type,
SiddhiAppContext siddhiAppContext) |
void |
publish(Object payload,
DynamicOptions transportOptions,
Integer destinationId,
State state) |
connectWithRetry, getSupportedDynamicOptions, init, init, isConnected, publish
getHandler, getMapper, getStreamDefinition, getType, init, initOnlyTransport, publish, setConnected, shutdown
public void publish(Object payload, DynamicOptions transportOptions, Integer destinationId, State state) throws ConnectionUnavailableException
publish
in class DistributedTransport
ConnectionUnavailableException
public void initTransport(OptionHolder sinkOptionHolder, List<OptionHolder> destinationOptionHolders, Map<String,String> deploymentProperties, List<Map<String,String>> destinationDeploymentProperties, io.siddhi.query.api.annotation.Annotation sinkAnnotation, ConfigReader sinkConfigReader, DistributionStrategy strategy, String type, SiddhiAppContext siddhiAppContext)
initTransport
in class DistributedTransport
public Class[] getSupportedInputEventClasses()
getSupportedInputEventClasses
in class Sink
protected ServiceDeploymentInfo exposeServiceDeploymentInfo()
Sink
exposeServiceDeploymentInfo
in class Sink
public void connect() throws ConnectionUnavailableException
connect
in class Sink
ConnectionUnavailableException
- if it cannot connect to the backendpublic void disconnect()
disconnect
in class Sink
public void destroy()
public List<ServiceDeploymentInfo> getServiceDeploymentInfoList()
getServiceDeploymentInfoList
in class Sink
Copyright © 2019. All rights reserved.