com.espertech.esper.epl.named
Class NamedWindowConsumerLatchSpin

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

public class NamedWindowConsumerLatchSpin
extends NamedWindowConsumerLatch

A spin-locking implementation of a latch for use in guaranteeing delivery between a delta stream produced by a named window and consumable by another statement.


Constructor Summary
NamedWindowConsumerLatchSpin(NamedWindowConsumerLatchFactory factory)
          Ctor - use for the first and unused latch to indicate completion.
NamedWindowConsumerLatchSpin(NamedWindowDeltaData deltaData, java.util.Map<EPStatementAgentInstanceHandle,java.util.List<NamedWindowConsumerView>> dispatchTo, NamedWindowConsumerLatchFactory factory, NamedWindowConsumerLatchSpin earlier)
          Ctor.
 
Method Summary
 void await()
          Blocking 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.
 
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

NamedWindowConsumerLatchSpin

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

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

NamedWindowConsumerLatchSpin

public NamedWindowConsumerLatchSpin(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

await

public void await()
Blocking 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