public class Scheduler extends Object implements Snapshotable
| Constructor and Description |
|---|
Scheduler(Schedulable singleThreadEntryValve,
SiddhiAppContext siddhiAppContext) |
| Modifier and Type | Method and Description |
|---|---|
Scheduler |
clone(String key,
EntryValveProcessor entryValveProcessor) |
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
|
String |
getElementId() |
void |
init(LockWrapper lockWrapper,
String queryName) |
void |
notifyAt(long time) |
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.
|
void |
schedule(long time) |
protected void |
sendTimerEvents()
Go through the timestamps stored in the
toNotifyQueue and send the TIMER events for the expired events. |
void |
setLatencyTracker(LatencyTracker latencyTracker) |
void |
setStreamEventPool(StreamEventPool streamEventPool) |
void |
switchToLiveMode()
Schedule events which are not scheduled in the queue when switching back from event time to system current time
|
void |
switchToPlayBackMode()
this can be used to release
the acquired resources for processing.
|
protected String queryName
public Scheduler(Schedulable singleThreadEntryValve, SiddhiAppContext siddhiAppContext)
public void schedule(long time)
public Scheduler clone(String key, EntryValveProcessor entryValveProcessor)
public void notifyAt(long time)
public void setStreamEventPool(StreamEventPool streamEventPool)
public void init(LockWrapper lockWrapper, String queryName)
public Map<String,Object> currentState()
SnapshotablecurrentState in interface Snapshotablepublic void restoreState(Map<String,Object> state)
SnapshotablerestoreState in interface Snapshotablestate - the stateful objects of the element as an array on
the same order provided by currentState().public String getElementId()
getElementId in interface Snapshotablepublic void setLatencyTracker(LatencyTracker latencyTracker)
protected void sendTimerEvents()
toNotifyQueue and send the TIMER events for the expired events.public void switchToLiveMode()
public void switchToPlayBackMode()
Copyright © 2019 WSO2. All rights reserved.