Package io.siddhi.core.query
Class QueryRuntimeImpl
- java.lang.Object
-
- io.siddhi.core.query.QueryRuntimeImpl
-
- All Implemented Interfaces:
QueryRuntime,ExternalReferencedHolder,MemoryCalculable
public class QueryRuntimeImpl extends Object implements QueryRuntime, MemoryCalculable, ExternalReferencedHolder
Query Runtime represent holder object for a single Siddhi query and holds all runtime objects related to that query.
-
-
Constructor Summary
Constructors Constructor Description QueryRuntimeImpl(io.siddhi.query.api.execution.query.Query query, StreamRuntime streamRuntime, QuerySelector selector, OutputRateLimiter outputRateLimiter, OutputCallback outputCallback, MetaComplexEvent metaComplexEvent, SiddhiQueryContext siddhiQueryContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCallback(QueryCallback callback)List<String>getInputStreamId()MetaComplexEventgetMetaComplexEvent()OutputCallbackgetOutputCallback()OutputRateLimitergetOutputRateManager()io.siddhi.query.api.definition.StreamDefinitiongetOutputStreamDefinition()io.siddhi.query.api.execution.query.QuerygetQuery()StringgetQueryId()QuerySelectorgetSelector()SiddhiQueryContextgetSiddhiQueryContext()StreamRuntimegetStreamRuntime()voidinit()voidinitPartition()booleanisFromLocalStream()booleanisStateful()booleanisToLocalStream()voidremoveCallback(QueryCallback callback)voidsetToLocalStream(boolean toLocalStream)voidstart()This will be called only once and this can be used to acquire required resources for the processing element.voidstop()This will be called only once and this can be used to release the acquired resources for processing.
-
-
-
Constructor Detail
-
QueryRuntimeImpl
public QueryRuntimeImpl(io.siddhi.query.api.execution.query.Query query, StreamRuntime streamRuntime, QuerySelector selector, OutputRateLimiter outputRateLimiter, OutputCallback outputCallback, MetaComplexEvent metaComplexEvent, SiddhiQueryContext siddhiQueryContext)
-
-
Method Detail
-
getQueryId
public String getQueryId()
- Specified by:
getQueryIdin interfaceQueryRuntime
-
addCallback
public void addCallback(QueryCallback callback)
-
removeCallback
public void removeCallback(QueryCallback callback)
-
getOutputRateManager
public OutputRateLimiter getOutputRateManager()
-
getOutputStreamDefinition
public io.siddhi.query.api.definition.StreamDefinition getOutputStreamDefinition()
-
isToLocalStream
public boolean isToLocalStream()
-
setToLocalStream
public void setToLocalStream(boolean toLocalStream)
-
isStateful
public boolean isStateful()
- Specified by:
isStatefulin interfaceQueryRuntime
-
isFromLocalStream
public boolean isFromLocalStream()
-
getSiddhiQueryContext
public SiddhiQueryContext getSiddhiQueryContext()
-
getStreamRuntime
public StreamRuntime getStreamRuntime()
-
getMetaComplexEvent
public MetaComplexEvent getMetaComplexEvent()
-
getQuery
public io.siddhi.query.api.execution.query.Query getQuery()
- Specified by:
getQueryin interfaceQueryRuntime
-
getOutputCallback
public OutputCallback getOutputCallback()
-
init
public void init()
-
getSelector
public QuerySelector getSelector()
-
initPartition
public void initPartition()
-
start
public void start()
Description copied from interface:ExternalReferencedHolderThis will be called only once and this can be used to acquire required resources for the processing element. This will be called after initializing the system and before starting to process the events.- Specified by:
startin interfaceExternalReferencedHolder
-
stop
public void stop()
Description copied from interface:ExternalReferencedHolderThis will be called only once and this can be used to release the acquired resources for processing. This will be called before shutting down the system.- Specified by:
stopin interfaceExternalReferencedHolder
-
-