Class InMemorySource
- java.lang.Object
-
- io.siddhi.core.stream.input.source.Source
-
- io.siddhi.core.stream.input.source.InMemorySource
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.siddhi.core.stream.input.source.Source
Source.ConnectionCallback
-
-
Constructor Summary
Constructors Constructor Description InMemorySource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect(Source.ConnectionCallback connectionCallback, State state)Called to connect to the source backend for receiving eventsvoiddestroy()Called at the end to clean all the resources consumedvoiddisconnect()Called to disconnect from the source backend, or when ConnectionUnavailableException is thrownprotected ServiceDeploymentInfoexposeServiceDeploymentInfo()Give information to the deployment about the service exposed by the sink.Class[]getOutputEventClasses()Get produced event class typesStateFactory<State>init(SourceEventListener sourceEventListener, OptionHolder optionHolder, String[] requestedTransportPropertyNames, ConfigReader configReader, SiddhiAppContext siddhiAppContext)To initialize the source.voidpause()Called to pause event consumptionvoidresume()Called to resume event consumption-
Methods inherited from class io.siddhi.core.stream.input.source.Source
connectWithRetry, getMapper, getServiceDeploymentInfo, getStreamDefinition, getType, init, isStateful, shutdown
-
-
-
-
Method Detail
-
exposeServiceDeploymentInfo
protected ServiceDeploymentInfo exposeServiceDeploymentInfo()
Description copied from class:SourceGive information to the deployment about the service exposed by the sink.- Specified by:
exposeServiceDeploymentInfoin classSource- Returns:
- ServiceDeploymentInfo Service related information to the deployment
-
init
public StateFactory<State> init(SourceEventListener sourceEventListener, OptionHolder optionHolder, String[] requestedTransportPropertyNames, ConfigReader configReader, SiddhiAppContext siddhiAppContext)
Description copied from class:SourceTo initialize the source. (This will be called only once, no connection to external systems should be made at this point).- Specified by:
initin classSource- Parameters:
sourceEventListener- The listener to pass the events for processing which are consumed by the sourceoptionHolder- Contains static options of the sourcerequestedTransportPropertyNames- Requested transport properties that should be passed to SourceEventListenerconfigReader- System configuration reader for sourcesiddhiAppContext- Siddhi application context
-
getOutputEventClasses
public Class[] getOutputEventClasses()
Description copied from class:SourceGet produced event class types- Specified by:
getOutputEventClassesin classSource- Returns:
- Array of classes that will be produced by the source, null or empty array if it can produce any type of class.
-
connect
public void connect(Source.ConnectionCallback connectionCallback, State state) throws ConnectionUnavailableException
Description copied from class:SourceCalled to connect to the source backend for receiving events- Specified by:
connectin classSource- Parameters:
connectionCallback- Callback to pass the ConnectionUnavailableException for connection failure after initial successful connectionstate- current state of the source- Throws:
ConnectionUnavailableException- if it cannot connect to the source backend
-
disconnect
public void disconnect()
Description copied from class:SourceCalled to disconnect from the source backend, or when ConnectionUnavailableException is thrown- Specified by:
disconnectin classSource
-
destroy
public void destroy()
Description copied from class:SourceCalled at the end to clean all the resources consumed
-
pause
public void pause()
Description copied from class:SourceCalled to pause event consumption
-
-