akka.remote.testconductor
Class BarrierCoordinator
java.lang.Object
akka.remote.testconductor.BarrierCoordinator
- All Implemented Interfaces:
- Actor, ActorLogging, FSM<BarrierCoordinator.State,BarrierCoordinator.Data>, LoggingFSM<BarrierCoordinator.State,BarrierCoordinator.Data>, Listeners
public class BarrierCoordinator
- extends java.lang.Object
- implements Actor, LoggingFSM<BarrierCoordinator.State,BarrierCoordinator.Data>
This barrier coordinator gets informed of players connecting (NodeInfo),
players being deliberately removed (RemoveClient) or failing (ClientDisconnected)
by the controller. It also receives EnterBarrier requests, where upon the first
one received the name of the current barrier is set and all other known clients
are expected to join the barrier, whereupon all of the will be sent the successful
EnterBarrier return message. In case of planned removals, this may just happen
earlier, in case of failures the current barrier (and all subsequent ones) will
be failed by sending BarrierFailed responses.
INTERNAL API.
Nested classes/interfaces inherited from interface akka.actor.FSM |
FSM.$minus$greater$, FSM.CurrentState<S>, FSM.CurrentState$, FSM.Event<D>, FSM.Event$, FSM.Failure, FSM.Failure$, FSM.LogEntry<S,D>, FSM.LogEntry$, FSM.Normal$, FSM.NullFunction$, FSM.Reason, FSM.Shutdown$, FSM.State$, FSM.StateTimeout$, FSM.StopEvent<S,D>, FSM.StopEvent$, FSM.SubscribeTransitionCallBack, FSM.SubscribeTransitionCallBack$, FSM.TimeoutMarker, FSM.TimeoutMarker$, FSM.Timer, FSM.Timer$, FSM.TransformHelper, FSM.Transition<S>, FSM.Transition$, FSM.UnsubscribeTransitionCallBack, FSM.UnsubscribeTransitionCallBack$ |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface akka.actor.FSM |
applyState, cancelTimer, currentState, Event, generation, handleEvent, handleEventDefault, handleTransition, initialize, isStateTimerActive, isTimerActive, logTermination, makeTransition, nextState, nextStateData, onTermination, onTransition, processMsg, register, setStateTimeout, setTimer, startWith, stateData, stateFunctions, stateName, StateTimeout, stateTimeouts, stay, stop, stop, stop, StopEvent, terminate, terminateEvent, timeoutFuture, timerGen, timers, total2pf, transform, transitionEvent, when, whenUnhandled |
Methods inherited from interface akka.actor.Actor |
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, preStart, self, sender, supervisorStrategy, unhandled |
BarrierCoordinator
public BarrierCoordinator()
failed
public boolean failed()
preRestart
public void preRestart(java.lang.Throwable reason,
scala.Option<java.lang.Object> message)
- Description copied from interface:
Actor
- User overridable callback: '''By default it disposes of all children and then calls
postStop()
.'''
- Specified by:
preRestart
in interface Actor
- Parameters:
reason
- the Throwable that caused the restart to happenmessage
- optionally the current message the actor processed when failing, if applicable
Is called on a crashed Actor right BEFORE it is restarted to allow clean
up of resources before Actor is terminated.
postRestart
public void postRestart(java.lang.Throwable reason)
- Description copied from interface:
Actor
- User overridable callback: By default it calls
preStart()
.
- Specified by:
postRestart
in interface Actor
- Parameters:
reason
- the Throwable that caused the restart to happen
Is called right AFTER restart on the newly created Actor to allow reinitialization after an Actor crash.
handleBarrier
public FSM.State<BarrierCoordinator.State,BarrierCoordinator.Data> handleBarrier(BarrierCoordinator.Data data)
getDeadline
public scala.concurrent.duration.Deadline getDeadline(scala.Option<scala.concurrent.duration.FiniteDuration> timeout)