Class TimerWithinOrMaxCountGuard
java.lang.Object
com.espertech.esper.common.internal.epl.pattern.guard.TimerWithinOrMaxCountGuard
- All Implemented Interfaces:
Guard
,ScheduleHandleCallback
Guard implementation that keeps a timer instance and quits when the timer expired,
and also keeps a count of the number of matches so far, checking both count and timer,
letting all
MatchedEventMap
instances pass until then.-
Field Summary
-
Constructor Summary
ConstructorDescriptionTimerWithinOrMaxCountGuard
(long deltaTime, int numCountTo, Quitable quitable) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(EventGuardVisitor visitor) boolean
inspect
(MatchedEventMap matchEvent) Returns true if inspection shows that the match events can pass, or false to not pass.void
Callback that is invoked as indicated by a schedule added to the scheduling service.void
Start the guard operation.void
Called when sub-expression quits, or when the pattern stopped.
-
Field Details
-
NAME_AUDITPROVIDER_SCHEDULE
- See Also:
-
-
Constructor Details
-
TimerWithinOrMaxCountGuard
Ctor.- Parameters:
deltaTime
- - number of millisecond to guard expirationnumCountTo
- - max number of countsquitable
- - to use to indicate that the gaurd quitted
-
-
Method Details
-
startGuard
public void startGuard()Description copied from interface:Guard
Start the guard operation.- Specified by:
startGuard
in interfaceGuard
-
inspect
Description copied from interface:Guard
Returns true if inspection shows that the match events can pass, or false to not pass. -
stopGuard
public void stopGuard()Description copied from interface:Guard
Called when sub-expression quits, or when the pattern stopped. -
scheduledTrigger
public void scheduledTrigger()Description copied from interface:ScheduleHandleCallback
Callback that is invoked as indicated by a schedule added to the scheduling service.- Specified by:
scheduledTrigger
in interfaceScheduleHandleCallback
-
accept
-