groovyx.gpars.actor.impl
Class SequentialProcessingActor.Reaction
java.lang.Object
groovyx.gpars.actor.impl.SequentialProcessingActor.Reaction
- Enclosing class:
- SequentialProcessingActor
private static final class SequentialProcessingActor.Reaction
- extends java.lang.Object
Buffers messages for the next continuation of an event-driven actor, handles timeouts and no-param continuations.
- Author:
- Vaclav Pech, Alex Tkachman
Date: May 22, 2009
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
codeNeedsArgument
private final boolean codeNeedsArgument
isReady
private final java.util.concurrent.atomic.AtomicBoolean isReady
code
private final groovy.lang.Closure code
actor
private final SequentialProcessingActor actor
SequentialProcessingActor.Reaction
SequentialProcessingActor.Reaction(SequentialProcessingActor actor,
boolean codeNeedsArgument,
groovy.lang.Closure code)
- Creates a new instance.
- Parameters:
actor
- actorcodeNeedsArgument
- Indicates, whether the provided code expects an argumentcode
- code to execute
isReady
public boolean isReady()
- Indicates whether a message or a timeout has arrived.
- Returns:
- True, if the next continuation can start.
offer
public void offer(ActorMessage actorMessage)
setTimeout
public void setTimeout(long timeout)