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.siddhiAppContext, strategy, streamDefinition| Constructor and Description |
|---|
MultiClientDistributedSink() |
| 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,
SiddhiAppContext siddhiAppContext) |
void |
publish(Object payload,
DynamicOptions transportOptions,
int 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.
|
getSupportedDynamicOptions, init, init, publishconnectWithRetry, getElementId, getMapper, getStreamDefinition, getType, init, initOnlyTransport, isConnected, publish, shutdownpublic void publish(Object payload, DynamicOptions transportOptions, int destinationId) throws ConnectionUnavailableException
publish in class DistributedTransportConnectionUnavailableExceptionpublic void initTransport(OptionHolder sinkOptionHolder, List<OptionHolder> destinationOptionHolders, org.wso2.siddhi.query.api.annotation.Annotation sinkAnnotation, ConfigReader sinkConfigReader, 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 © 2017 WSO2. All rights reserved.