com.espertech.esper.core.service
Class InsertIntoLatchWait

java.lang.Object
  extended by com.espertech.esper.core.service.InsertIntoLatchWait

public class InsertIntoLatchWait
extends java.lang.Object

A suspend-and-notify implementation of a latch for use in guaranteeing delivery between a single event produced by a single statement and consumable by another statement.


Constructor Summary
InsertIntoLatchWait(InsertIntoLatchFactory factory)
          Ctor - use for the first and unused latch to indicate completion.
InsertIntoLatchWait(InsertIntoLatchFactory factory, InsertIntoLatchWait earlier, long msecTimeout, EventBean payload)
          Ctor.
 
Method Summary
 EventBean await()
          Blcking call that returns only when the earlier latch completed.
 void done()
          Called to indicate that the latch completed and a later latch can start.
 boolean isCompleted()
          Returns true if the dispatch completed for this future.
 void setLater(InsertIntoLatchWait later)
          Hand a later latch to use for indicating completion via notify.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsertIntoLatchWait

public InsertIntoLatchWait(InsertIntoLatchFactory factory,
                           InsertIntoLatchWait earlier,
                           long msecTimeout,
                           EventBean payload)
Ctor.

Parameters:
earlier - the latch before this latch that this latch should be waiting for
msecTimeout - the timeout after which delivery occurs
payload - the payload is an event to deliver

InsertIntoLatchWait

public InsertIntoLatchWait(InsertIntoLatchFactory factory)
Ctor - use for the first and unused latch to indicate completion.

Method Detail

isCompleted

public boolean isCompleted()
Returns true if the dispatch completed for this future.

Returns:
true for completed, false if not

setLater

public void setLater(InsertIntoLatchWait later)
Hand a later latch to use for indicating completion via notify.

Parameters:
later - is the later latch

await

public EventBean await()
Blcking call that returns only when the earlier latch completed.

Returns:
payload of the latch

done

public void done()
Called to indicate that the latch completed and a later latch can start.


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