com.espertech.esper.epl.view
Class OutputConditionTime
java.lang.Object
com.espertech.esper.epl.view.OutputConditionBase
com.espertech.esper.epl.view.OutputConditionTime
- All Implemented Interfaces:
- OutputCondition, StopCallback
public final class OutputConditionTime
- extends OutputConditionBase
- implements OutputCondition, StopCallback
Output condition that is satisfied at the end
of every time interval of a given length.
Method Summary |
protected static long |
computeWaitMSec(long current,
long reference,
long interval)
Given a current time and a reference time and an interval size, compute the amount of
milliseconds till the next interval. |
void |
stop()
Stops the underlying resources. |
java.lang.String |
toString()
|
void |
updateOutputCondition(int newEventsCount,
int oldEventsCount)
Update the output condition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OutputConditionTime
public OutputConditionTime(OutputCallback outputCallback,
AgentInstanceContext context,
OutputConditionTimeFactory outputConditionTimeFactory)
updateOutputCondition
public final void updateOutputCondition(int newEventsCount,
int oldEventsCount)
- Description copied from interface:
OutputCondition
- Update the output condition.
- Specified by:
updateOutputCondition
in interface OutputCondition
- Parameters:
newEventsCount
- - number of new events incomingoldEventsCount
- - number of old events incoming
toString
public final java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
stop
public void stop()
- Description copied from interface:
StopCallback
- Stops the underlying resources.
- Specified by:
stop
in interface StopCallback
computeWaitMSec
protected static long computeWaitMSec(long current,
long reference,
long interval)
- Given a current time and a reference time and an interval size, compute the amount of
milliseconds till the next interval.
- Parameters:
current
- is the current timereference
- is the reference pointinterval
- is the interval size
- Returns:
- milliseconds after current time that marks the end of the current interval