Package 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 Class Summary
Nested Classes Modifier and Type Class Description static classBarrierCoordinator.BarrierEmptystatic classBarrierCoordinator.BarrierEmpty$static classBarrierCoordinator.BarrierTimeoutstatic classBarrierCoordinator.BarrierTimeout$static classBarrierCoordinator.ClientLoststatic classBarrierCoordinator.ClientLost$static classBarrierCoordinator.Datastatic classBarrierCoordinator.Data$static classBarrierCoordinator.DuplicateNodestatic classBarrierCoordinator.DuplicateNode$static classBarrierCoordinator.FailedBarrierstatic classBarrierCoordinator.FailedBarrier$static classBarrierCoordinator.Idle$static interfaceBarrierCoordinator.Printerstatic classBarrierCoordinator.RemoveClientstatic classBarrierCoordinator.RemoveClient$static interfaceBarrierCoordinator.Statestatic classBarrierCoordinator.Waiting$static classBarrierCoordinator.WrongBarrierstatic classBarrierCoordinator.WrongBarrier$-
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
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.SilentState<S,D>, FSM.State$, FSM.StateTimeout$, FSM.StopEvent<S,D>, FSM.StopEvent$, FSM.SubscribeTransitionCallBack, FSM.SubscribeTransitionCallBack$, FSM.Timer, FSM.Timer$, FSM.TransformHelper, FSM.Transition<S>, FSM.Transition$, FSM.UnsubscribeTransitionCallBack, FSM.UnsubscribeTransitionCallBack$
-
-
Constructor Summary
Constructors Constructor Description BarrierCoordinator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FSM.$minus$greater$$minus$greater()This extractor is just convenience for matching a (S, S) pair, including a reminder what the new state is.protected voidakka$actor$Actor$_setter_$context_$eq(ActorContext x$1)protected voidakka$actor$Actor$_setter_$self_$eq(ActorRef x$1)The 'self' field holds the ActorRef for this actor.protected voidakka$actor$FSM$_setter_$Event_$eq(FSM.Event$ x$1)protected voidakka$actor$FSM$_setter_$StateTimeout_$eq(FSM.StateTimeout$ x$1)This case object is received in case of a state timeout.protected voidakka$actor$FSM$_setter_$StopEvent_$eq(FSM.StopEvent$ x$1)protected voidakka$actor$LoggingFSM$_setter_$debugEvent_$eq(boolean x$1)protected voidakka$routing$Listeners$_setter_$listeners_$eq(java.util.Set<ActorRef> x$1)ActorContextcontext()Scala API: Stores the context for this actor, including self, and sender.booleandebugEvent()FSM.Event$Event()booleanfailed()voidfailed_$eq(boolean x$1)scala.concurrent.duration.DeadlinegetDeadline(scala.Option<scala.concurrent.duration.FiniteDuration> timeout)FSM.State<BarrierCoordinator.State,BarrierCoordinator.Data>handleBarrier(BarrierCoordinator.Data data)protected java.util.Set<ActorRef>listeners()voidpostRestart(java.lang.Throwable reason)User overridable callback: By default it callspreStart().voidpreRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)Scala API: User overridable callback: '''By default it disposes of all children and then callspostStop().'''ActorRefself()The 'self' field holds the ActorRef for this actor.FSM.StateTimeout$StateTimeout()This case object is received in case of a state timeout.FSM.StopEvent$StopEvent()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, preStart, sender, supervisorStrategy, unhandled
-
Methods inherited from interface akka.actor.ActorLogging
_log_$eq, log
-
Methods inherited from interface akka.actor.FSM
applyState, cancelTimer, currentState_$eq, generation_$eq, handleEvent_$eq, handleTransition, initialize, isStateTimerActive, isTimerActive, logTermination, makeTransition, nextState_$eq, nextStateData, onTermination, onTransition, postStop, processMsg, receive, register, setStateTimeout, setTimer, setTimer$default$4, startWith, startWith$default$3, stateData, stateName, stay, stop, stop, stop, super$postStop, terminate, terminateEvent_$eq, timeoutFuture_$eq, total2pf, transform, transitionEvent_$eq, when, when$default$2, whenUnhandled
-
Methods inherited from interface akka.routing.Listeners
gossip, gossip$default$2, listenerManagement
-
Methods inherited from interface akka.actor.LoggingFSM
advance, full_$eq, getLog, logDepth, pos_$eq, processEvent, super$processEvent
-
-
-
-
Method Detail
-
debugEvent
public boolean debugEvent()
- Specified by:
debugEventin interfaceFSM<BarrierCoordinator.State,BarrierCoordinator.Data>- Specified by:
debugEventin interfaceLoggingFSM<BarrierCoordinator.State,BarrierCoordinator.Data>
-
akka$actor$LoggingFSM$_setter_$debugEvent_$eq
protected void akka$actor$LoggingFSM$_setter_$debugEvent_$eq(boolean x$1)
- Specified by:
akka$actor$LoggingFSM$_setter_$debugEvent_$eqin interfaceLoggingFSM<BarrierCoordinator.State,BarrierCoordinator.Data>
-
Event
public FSM.Event$ Event()
- Specified by:
Eventin interfaceFSM<BarrierCoordinator.State,BarrierCoordinator.Data>
-
StopEvent
public FSM.StopEvent$ StopEvent()
- Specified by:
StopEventin interfaceFSM<BarrierCoordinator.State,BarrierCoordinator.Data>
-
$minus$greater
public FSM.$minus$greater$ $minus$greater()
Description copied from interface:FSMThis extractor is just convenience for matching a (S, S) pair, including a reminder what the new state is.- Specified by:
$minus$greaterin interfaceFSM<BarrierCoordinator.State,BarrierCoordinator.Data>- Returns:
- (undocumented)
-
StateTimeout
public FSM.StateTimeout$ StateTimeout()
Description copied from interface:FSMThis case object is received in case of a state timeout.- Specified by:
StateTimeoutin interfaceFSM<BarrierCoordinator.State,BarrierCoordinator.Data>- Returns:
- (undocumented)
-
akka$actor$FSM$_setter_$Event_$eq
protected void akka$actor$FSM$_setter_$Event_$eq(FSM.Event$ x$1)
- Specified by:
akka$actor$FSM$_setter_$Event_$eqin interfaceFSM<BarrierCoordinator.State,BarrierCoordinator.Data>
-
akka$actor$FSM$_setter_$StopEvent_$eq
protected void akka$actor$FSM$_setter_$StopEvent_$eq(FSM.StopEvent$ x$1)
- Specified by:
akka$actor$FSM$_setter_$StopEvent_$eqin interfaceFSM<BarrierCoordinator.State,BarrierCoordinator.Data>
-
akka$actor$FSM$_setter_$StateTimeout_$eq
protected void akka$actor$FSM$_setter_$StateTimeout_$eq(FSM.StateTimeout$ x$1)
Description copied from interface:FSMThis case object is received in case of a state timeout.- Specified by:
akka$actor$FSM$_setter_$StateTimeout_$eqin interfaceFSM<BarrierCoordinator.State,BarrierCoordinator.Data>- Parameters:
x$1- (undocumented)
-
listeners
protected java.util.Set<ActorRef> listeners()
-
akka$routing$Listeners$_setter_$listeners_$eq
protected void akka$routing$Listeners$_setter_$listeners_$eq(java.util.Set<ActorRef> x$1)
- Specified by:
akka$routing$Listeners$_setter_$listeners_$eqin interfaceListeners
-
context
public ActorContext context()
Description copied from interface:ActorScala API: Stores the context for this actor, including self, and sender. It is implicit to support operations such asforward.WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!
ActorContextis the Scala API.getContextreturns aAbstractActor.ActorContext, which is the Java API of the actor context.
-
self
public final ActorRef self()
Description copied from interface:ActorThe 'self' field holds the ActorRef for this actor. Can be used to send messages to itself:self ! message
-
akka$actor$Actor$_setter_$context_$eq
protected void akka$actor$Actor$_setter_$context_$eq(ActorContext x$1)
- Specified by:
akka$actor$Actor$_setter_$context_$eqin interfaceActor
-
akka$actor$Actor$_setter_$self_$eq
protected final void akka$actor$Actor$_setter_$self_$eq(ActorRef x$1)
Description copied from interface:ActorThe 'self' field holds the ActorRef for this actor. Can be used to send messages to itself:self ! message
- Specified by:
akka$actor$Actor$_setter_$self_$eqin interfaceActor- Parameters:
x$1- (undocumented)
-
failed
public boolean failed()
-
failed_$eq
public void failed_$eq(boolean x$1)
-
preRestart
public void preRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)Description copied from interface:ActorScala API: User overridable callback: '''By default it disposes of all children and then callspostStop().'''- Specified by:
preRestartin interfaceActor- 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:ActorUser overridable callback: By default it callspreStart().- Specified by:
postRestartin interfaceActor- 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)
-
-