net.esper.eql.spec
Class OutputLimitSpec

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

public class OutputLimitSpec
extends java.lang.Object

Spec for building an EventBatch.


Nested Class Summary
static class OutputLimitSpec.DisplayLimit
          Enum controlling the type of output limiting.
 
Constructor Summary
OutputLimitSpec(double timeRate, OutputLimitSpec.DisplayLimit displayLimit)
          Ctor.
OutputLimitSpec(int eventRate, OutputLimitSpec.DisplayLimit displayLimit)
          Ctor.
 
Method Summary
 int getEventRate()
          Returns the event rate.
 double getTimeRate()
          Returns the rate in seconds, if supplied, or zero if not supplied.
 boolean isDisplayFirstOnly()
          Returns true to output the first event only.
 boolean isDisplayLastOnly()
          Returns true to output the last event only.
 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,
                       OutputLimitSpec.DisplayLimit displayLimit)
Ctor. For batching events by event count.

Parameters:
eventRate - - the number of events to batch.
displayLimit - - indicates whether to output only the first, only the last, or all events

OutputLimitSpec

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

Parameters:
timeRate - - the number of seconds to batch for.
displayLimit - - indicates whether to output only the first, only the last, or all events
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.

Returns:
true if last only, false otherwise

isDisplayFirstOnly

public boolean isDisplayFirstOnly()
Returns true to output the first event only.

Returns:
true if first only, false otherwise