#3166 - Adding parenthesis to FSM.initialize
This commit is contained in:
parent
88f7e28c6b
commit
48c0b3aa2c
10 changed files with 12 additions and 14 deletions
|
|
@ -91,7 +91,7 @@ object FSMActorSpec {
|
|||
}
|
||||
|
||||
// initialize the lock
|
||||
initialize
|
||||
initialize()
|
||||
|
||||
private def doLock() {
|
||||
lockedLatch.open
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ object FSMTransitionSpec {
|
|||
whenUnhandled {
|
||||
case Event("reply", _) ⇒ stay replying "reply"
|
||||
}
|
||||
initialize
|
||||
initialize()
|
||||
override def preRestart(reason: Throwable, msg: Option[Any]) { target ! "restarted" }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -698,8 +698,7 @@ object SupervisorHierarchySpec {
|
|||
stop
|
||||
}
|
||||
|
||||
initialize
|
||||
|
||||
initialize()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ trait FSM[S, D] extends Listeners with ActorLogging {
|
|||
* Verify existence of initial state and setup timers. This should be the
|
||||
* last call within the constructor.
|
||||
*/
|
||||
final def initialize: Unit = makeTransition(currentState)
|
||||
final def initialize(): Unit = makeTransition(currentState)
|
||||
|
||||
/**
|
||||
* Return current state name (i.e. object of type S)
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ class TimerBasedThrottler(var rate: Rate) extends Actor with Throttler with FSM[
|
|||
case Active -> Idle ⇒ stopTimer()
|
||||
}
|
||||
|
||||
initialize
|
||||
initialize()
|
||||
|
||||
private def startTimer(rate: Rate) = setTimer("morePermits", Tick, rate.duration, true)
|
||||
private def stopTimer() = cancelTimer("morePermits")
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class FSMDocSpec extends MyFavoriteTestFrameWorkPlusAkkaTestKit {
|
|||
//#unhandled-elided
|
||||
//#fsm-body
|
||||
|
||||
initialize
|
||||
initialize()
|
||||
}
|
||||
//#simple-fsm
|
||||
object DemoCode {
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ private[akka] class ServerFSM(val controller: ActorRef, val channel: Channel) ex
|
|||
stay
|
||||
}
|
||||
|
||||
initialize
|
||||
initialize()
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -574,7 +574,7 @@ private[akka] class BarrierCoordinator extends Actor with LoggingFSM[BarrierCoor
|
|||
throw BarrierTimeout(d)
|
||||
}
|
||||
|
||||
initialize
|
||||
initialize()
|
||||
|
||||
def handleBarrier(data: Data): State = {
|
||||
log.debug("handleBarrier({})", data)
|
||||
|
|
|
|||
|
|
@ -257,8 +257,7 @@ private[akka] class ClientFSM(name: RoleName, controllerAddr: InetSocketAddress)
|
|||
channel.close()
|
||||
}
|
||||
|
||||
initialize
|
||||
|
||||
initialize()
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ abstract class GenericBuncher[A: ClassTag, B](val singleTimeout: FiniteDuration,
|
|||
stop
|
||||
}
|
||||
|
||||
initialize
|
||||
initialize()
|
||||
}
|
||||
|
||||
object Buncher {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class Chopstick extends Actor with FSM[ChopstickState, TakenBy] {
|
|||
}
|
||||
|
||||
// Initialze the chopstick
|
||||
initialize
|
||||
initialize()
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -155,7 +155,7 @@ class FSMHakker(name: String, left: ActorRef, right: ActorRef) extends Actor wit
|
|||
}
|
||||
|
||||
// Initialize the hakker
|
||||
initialize
|
||||
initialize()
|
||||
|
||||
private def startThinking(duration: FiniteDuration): State = {
|
||||
goto(Thinking) using TakenChopsticks(None, None) forMax duration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue