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.ConnectionCallbacksiddhiAppContext, strategy, streamDefinitionisTryingToConnect| Constructor and Description |
|---|
SingleClientDistributedSink() |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Will be called to connect to the backend before events are published
|
Map<String,Object> |
currentState()
Used to collect the serializable state of the processing element, that need to be
persisted for the reconstructing the element to the same state on a different point of time
|
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,
org.wso2.siddhi.query.api.annotation.Annotation sinkAnnotation,
ConfigReader sinkConfigReader,
DistributionStrategy strategy,
String type,
SiddhiAppContext siddhiAppContext) |
void |
publish(Object payload,
DynamicOptions transportOptions,
Integer destinationId) |
void |
restoreState(Map<String,Object> state)
Used to restore serialized state of the processing element, for reconstructing
the element to the same state as if was on a previous point of time.
|
connectWithRetry, getSupportedDynamicOptions, init, init, isConnected, publishgetElementId, getHandler, getMapper, getStreamDefinition, getType, init, initOnlyTransport, publish, setConnected, shutdownpublic void publish(Object payload, DynamicOptions transportOptions, Integer destinationId) throws ConnectionUnavailableException
publish in class DistributedTransportConnectionUnavailableExceptionpublic void initTransport(OptionHolder sinkOptionHolder, List<OptionHolder> destinationOptionHolders, org.wso2.siddhi.query.api.annotation.Annotation sinkAnnotation, ConfigReader sinkConfigReader, DistributionStrategy strategy, String type, SiddhiAppContext siddhiAppContext)
initTransport in class DistributedTransportpublic Class[] getSupportedInputEventClasses()
getSupportedInputEventClasses in class Sinkpublic void connect()
throws ConnectionUnavailableException
connect in class SinkConnectionUnavailableException - if it cannot connect to the backendpublic void disconnect()
disconnect in class Sinkpublic void destroy()
public Map<String,Object> currentState()
public void restoreState(Map<String,Object> state)
state - the stateful objects of the element as an array on
the same order provided by currentState().Copyright © 2019 WSO2. All rights reserved.