public class SingleClientDistributedSink extends DistributedTransport
Modifier and Type | Class and Description |
---|---|
class |
SingleClientDistributedSink.SingleClientConnectionCallback
Connection callback to notify DistributionStrategy about new connection initiations and failures
|
DistributedTransport.ConnectionCallback
Sink.OnErrorAction
siddhiAppContext, strategy, streamDefinition
isTryingToConnect
Constructor and Description |
---|
SingleClientDistributedSink() |
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 s) |
getSupportedDynamicOptions, init, init, isConnected, publish
connectWithRetry, getHandler, getMapper, getStreamDefinition, getType, init, initOnlyTransport, isStateful, onError, publish, retryPublish, setConnected, shutdown
public void publish(Object payload, DynamicOptions transportOptions, Integer destinationId, State s) 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
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()
protected ServiceDeploymentInfo exposeServiceDeploymentInfo()
Sink
exposeServiceDeploymentInfo
in class Sink
public List<ServiceDeploymentInfo> getServiceDeploymentInfoList()
getServiceDeploymentInfoList
in class Sink
Copyright © 2019. All rights reserved.