Package io.siddhi.core.util
Class Scheduler
- java.lang.Object
-
- io.siddhi.core.util.Scheduler
-
- All Implemented Interfaces:
ExternalReferencedHolder
public class Scheduler extends Object implements ExternalReferencedHolder
Scheduler implementation to take periodic snapshots
-
-
Constructor Summary
Constructors Constructor Description Scheduler(Schedulable singleThreadEntryValve, SiddhiQueryContext siddhiQueryContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(LockWrapper lockWrapper, String queryName)voidnotifyAt(long time)voidsetLatencyTracker(LatencyTracker latencyTracker)voidsetStreamEventFactory(StreamEventFactory streamEventFactory)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.voidswitchToLiveMode()Schedule events which are not scheduled in the queue when switching back from event time to system current timevoidswitchToPlayBackMode()this can be used to release the acquired resources for processing.
-
-
-
Field Detail
-
queryName
protected String queryName
-
-
Constructor Detail
-
Scheduler
public Scheduler(Schedulable singleThreadEntryValve, SiddhiQueryContext siddhiQueryContext)
-
-
Method Detail
-
init
public void init(LockWrapper lockWrapper, String queryName)
-
notifyAt
public void notifyAt(long time)
-
setStreamEventFactory
public void setStreamEventFactory(StreamEventFactory streamEventFactory)
-
setLatencyTracker
public void setLatencyTracker(LatencyTracker latencyTracker)
-
switchToLiveMode
public void switchToLiveMode()
Schedule events which are not scheduled in the queue when switching back from event time to system current time
-
switchToPlayBackMode
public void switchToPlayBackMode()
this can be used to release the acquired resources for processing.
-
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
-
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
-
-