public abstract class Scheduler extends Object implements Snapshotable
| Modifier and Type | Field and Description |
|---|---|
protected String |
elementId |
protected String |
queryName |
protected SiddhiAppContext |
siddhiAppContext |
protected BlockingQueue<Long> |
toNotifyQueue |
| Constructor and Description |
|---|
Scheduler(Schedulable singleThreadEntryValve,
SiddhiAppContext siddhiAppContext) |
| Modifier and Type | Method and Description |
|---|---|
abstract 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.
|
abstract 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) |
protected final BlockingQueue<Long> toNotifyQueue
protected SiddhiAppContext siddhiAppContext
protected String elementId
protected String queryName
public Scheduler(Schedulable singleThreadEntryValve, SiddhiAppContext siddhiAppContext)
public abstract void schedule(long time)
public abstract 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.Copyright © 2018 WSO2. All rights reserved.