Class SnapshotOutputRateLimiter<S extends State>
- java.lang.Object
-
- io.siddhi.core.query.output.ratelimit.snapshot.SnapshotOutputRateLimiter<S>
-
- Type Parameters:
S- current state of the RateLimiter
- All Implemented Interfaces:
Schedulable
- Direct Known Subclasses:
AggregationWindowedPerSnapshotOutputRateLimiter,AllAggregationGroupByWindowedPerSnapshotOutputRateLimiter,AllAggregationPerSnapshotOutputRateLimiter,GroupByPerSnapshotOutputRateLimiter,PerSnapshotOutputRateLimiter,WindowedPerSnapshotOutputRateLimiter
public abstract class SnapshotOutputRateLimiter<S extends State> extends Object implements Schedulable
Parent implementation to run theSchedulerto handle periodic snapshot rate limiting.
-
-
Field Summary
Fields Modifier and Type Field Description protected LockWrapperlockWrapperprotected SiddhiQueryContextsiddhiQueryContextprotected StateEventClonerstateEventClonerprotected StateHolder<S>stateHolderprotected StreamEventClonerstreamEventCloner
-
Constructor Summary
Constructors Modifier Constructor Description protectedSnapshotOutputRateLimiter(WrappedSnapshotOutputRateLimiter wrappedSnapshotOutputRateLimiter, SiddhiQueryContext siddhiQueryContext, boolean groupBy)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ComplexEventcloneComplexEvent(ComplexEvent complexEvent)Clones a given complex event.protected abstract StateFactory<S>init()abstract voidpartitionCreated()abstract voidprocess(ComplexEventChunk complexEventChunk)protected voidsendToCallBacks(List<ComplexEventChunk> outputEventChunks)voidsetQueryLock(LockWrapper lockWrapper)voidsetStateEventCloner(StateEventCloner stateEventCloner)voidsetStreamEventCloner(StreamEventCloner streamEventCloner)
-
-
-
Field Detail
-
stateHolder
protected final StateHolder<S extends State> stateHolder
-
streamEventCloner
protected StreamEventCloner streamEventCloner
-
stateEventCloner
protected StateEventCloner stateEventCloner
-
siddhiQueryContext
protected SiddhiQueryContext siddhiQueryContext
-
lockWrapper
protected LockWrapper lockWrapper
-
-
Constructor Detail
-
SnapshotOutputRateLimiter
protected SnapshotOutputRateLimiter(WrappedSnapshotOutputRateLimiter wrappedSnapshotOutputRateLimiter, SiddhiQueryContext siddhiQueryContext, boolean groupBy)
-
-
Method Detail
-
init
protected abstract StateFactory<S> init()
-
process
public abstract void process(ComplexEventChunk complexEventChunk)
- Specified by:
processin interfaceSchedulable
-
setStreamEventCloner
public void setStreamEventCloner(StreamEventCloner streamEventCloner)
-
setStateEventCloner
public void setStateEventCloner(StateEventCloner stateEventCloner)
-
sendToCallBacks
protected void sendToCallBacks(List<ComplexEventChunk> outputEventChunks)
-
cloneComplexEvent
protected ComplexEvent cloneComplexEvent(ComplexEvent complexEvent)
Clones a given complex event.- Parameters:
complexEvent- Complex event to be cloned- Returns:
- Cloned complex event
-
partitionCreated
public abstract void partitionCreated()
-
setQueryLock
public void setQueryLock(LockWrapper lockWrapper)
-
-