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
|
Class[] |
getSupportedInputEventClasses() |
void |
initTransport(OptionHolder sinkOptionHolder,
List<OptionHolder> destinationOptionHolders,
io.siddhi.query.api.annotation.Annotation sinkAnnotation,
ConfigReader sinkConfigReader,
DistributionStrategy strategy,
String type,
SiddhiAppContext siddhiAppContext) |
void |
publish(Object payload,
DynamicOptions transportOptions,
Integer destinationId) |
connectWithRetry, getSupportedDynamicOptions, init, init, isConnected, publish
getHandler, getMapper, getStreamDefinition, getType, init, initOnlyTransport, publish, setConnected, shutdown
public void publish(Object payload, DynamicOptions transportOptions, Integer destinationId) throws ConnectionUnavailableException
publish
in class DistributedTransport
ConnectionUnavailableException
public void initTransport(OptionHolder sinkOptionHolder, List<OptionHolder> destinationOptionHolders, 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
Copyright © 2019. All rights reserved.