net.esper.eql.expression
Class OutputLimitSpec

java.lang.Object
  extended by net.esper.eql.expression.OutputLimitSpec

public class OutputLimitSpec
extends java.lang.Object

Spec for building an EventBatch.


Constructor Summary
OutputLimitSpec(double timeRate, boolean displayLastOnly)
          Ctor.
OutputLimitSpec(int eventRate, boolean displayLastOnly)
          Ctor.
 
Method Summary
 int getEventRate()
          Returns the event rate.
 double getTimeRate()
          Returns the rate in seconds, if supplied, or zero if not supplied.
 boolean isDisplayLastOnly()
          Returns true to output the last event only, or false to output all events.
 boolean isEventLimit()
          Returns the number of events, or zero if no number of events was supplied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputLimitSpec

public OutputLimitSpec(int eventRate,
                       boolean displayLastOnly)
Ctor. For batching events by event count.

Parameters:
eventRate - - the number of events to batch.
displayLastOnly - indicates whether the output should be all or only the last arriving event.

OutputLimitSpec

public OutputLimitSpec(double timeRate,
                       boolean displayLastOnly)
Ctor. Used for creating batching events by time.

Parameters:
timeRate - - the number of seconds to batch for.
displayLastOnly - indicates whether the output should be all or only the last arriving event.
Method Detail

getEventRate

public int getEventRate()
Returns the event rate.

Returns:
event rate

isEventLimit

public boolean isEventLimit()
Returns the number of events, or zero if no number of events was supplied.

Returns:
event limit

getTimeRate

public double getTimeRate()
Returns the rate in seconds, if supplied, or zero if not supplied.

Returns:
rate

isDisplayLastOnly

public boolean isDisplayLastOnly()
Returns true to output the last event only, or false to output all events.

Returns:
true if last only, false for all events