com.espertech.esper.epl.view
Class OutputConditionCount

java.lang.Object
  extended by com.espertech.esper.epl.view.OutputConditionCount
All Implemented Interfaces:
OutputCondition

public final class OutputConditionCount
extends Object
implements OutputCondition

Output limit condition that is satisfied when either the total number of new events arrived or the total number of old events arrived is greater than a preset value.


Constructor Summary
OutputConditionCount(int eventRate, VariableReader variableReader, OutputCallback outputCallback)
          Constructor.
 
Method Summary
 long getEventRate()
          Returns the event rate.
 int getNewEventsCount()
          Returns the number of new events.
 int getOldEventsCount()
          Returns the number of old events.
 String toString()
           
 void updateOutputCondition(int newDataCount, int oldDataCount)
          Update the output condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OutputConditionCount

public OutputConditionCount(int eventRate,
                            VariableReader variableReader,
                            OutputCallback outputCallback)
Constructor.

Parameters:
eventRate - is the number of old or new events that must arrive in order for the condition to be satisfied
outputCallback - is the callback that is made when the conditoin is satisfied
variableReader - is for reading the variable value, if a variable was supplied, else null
Method Detail

getNewEventsCount

public int getNewEventsCount()
Returns the number of new events.

Returns:
number of new events

getOldEventsCount

public int getOldEventsCount()
Returns the number of old events.

Returns:
number of old events

getEventRate

public final long getEventRate()
Returns the event rate.

Returns:
event rate

updateOutputCondition

public final void updateOutputCondition(int newDataCount,
                                        int oldDataCount)
Description copied from interface: OutputCondition
Update the output condition.

Specified by:
updateOutputCondition in interface OutputCondition
Parameters:
newDataCount - - number of new events incoming
oldDataCount - - number of old events incoming

toString

public final String toString()
Overrides:
toString in class Object

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com