com.espertech.esper.epl.named
Class NamedWindowConsumerLatchWait

java.lang.Object
  extended by com.espertech.esper.epl.named.NamedWindowConsumerLatch
      extended by com.espertech.esper.epl.named.NamedWindowConsumerLatchWait

public class NamedWindowConsumerLatchWait
extends NamedWindowConsumerLatch

A suspend-and-notify implementation of a latch for use in guaranteeing delivery between a named window delta result and consumable by another statement.


Constructor Summary
NamedWindowConsumerLatchWait(NamedWindowConsumerLatchFactory factory)
          Ctor - use for the first and unused latch to indicate completion.
NamedWindowConsumerLatchWait(NamedWindowDeltaData deltaData, java.util.Map<EPStatementAgentInstanceHandle,java.util.List<NamedWindowConsumerView>> dispatchTo, NamedWindowConsumerLatchFactory factory, NamedWindowConsumerLatchWait earlier)
          Ctor.
 
Method Summary
 void 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.
 java.lang.Thread getCurrentThread()
           
 boolean isCompleted()
          Returns true if the dispatch completed for this future.
 void setLater(NamedWindowConsumerLatchWait later)
          Hand a later latch to use for indicating completion via notify.
 
Methods inherited from class com.espertech.esper.epl.named.NamedWindowConsumerLatch
getDeltaData, getDispatchTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedWindowConsumerLatchWait

public NamedWindowConsumerLatchWait(NamedWindowDeltaData deltaData,
                                    java.util.Map<EPStatementAgentInstanceHandle,java.util.List<NamedWindowConsumerView>> dispatchTo,
                                    NamedWindowConsumerLatchFactory factory,
                                    NamedWindowConsumerLatchWait earlier)
Ctor.

Parameters:
earlier - the latch before this latch that this latch should be waiting for

NamedWindowConsumerLatchWait

public NamedWindowConsumerLatchWait(NamedWindowConsumerLatchFactory 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(NamedWindowConsumerLatchWait later)
Hand a later latch to use for indicating completion via notify.

Parameters:
later - is the later latch

await

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

Specified by:
await in class NamedWindowConsumerLatch

getCurrentThread

public java.lang.Thread getCurrentThread()
Specified by:
getCurrentThread in class NamedWindowConsumerLatch

done

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

Specified by:
done in class NamedWindowConsumerLatch

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