com.espertech.esper.schedule
Class ScheduleBucket

java.lang.Object
  extended by com.espertech.esper.schedule.ScheduleBucket

public class ScheduleBucket
extends java.lang.Object

This class acts as a buckets for sorting schedule service callbacks that are scheduled to occur at the same time. Each buckets constists of ScheduleSlot slots that callbacks are assigned to.

At the time of timer evaluation, callbacks that become triggerable are ordered using the bucket as the first-level order, and slot as the second-level order.

Each statement at statement creation time allocates a buckets, and each timer within the statement allocates a slot. Thus statements that depend on other statements (such as for insert-into), and timers within their statement (such as time window or output rate limit timers) behave deterministically.


Constructor Summary
ScheduleBucket(int bucketNum)
          Ctor.
 
Method Summary
 ScheduleSlot allocateSlot()
          Returns a new slot in the bucket.
 ScheduleSlot allocateSlot(int slotNumber)
          Returns a new slot in the bucket, given a slot number
 void restart()
          Restart bucket slot numbering wuch as when a statement is restarted and new slots are allocated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScheduleBucket

public ScheduleBucket(int bucketNum)
Ctor.

Parameters:
bucketNum - is a simple integer number for this bucket by which buckets can be sorted
Method Detail

restart

public void restart()
Restart bucket slot numbering wuch as when a statement is restarted and new slots are allocated.


allocateSlot

public ScheduleSlot allocateSlot()
Returns a new slot in the bucket.

Returns:
slot

allocateSlot

public ScheduleSlot allocateSlot(int slotNumber)
Returns a new slot in the bucket, given a slot number

Returns:
slot

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com