Merge pull request #1289 from akka/wip-3166-FSM-initialize-parens-√

#3166 - Adding parenthesis to FSM.initialize
This commit is contained in:
Viktor Klang (√) 2013-04-03 06:44:13 -07:00
commit ae96654062
10 changed files with 12 additions and 14 deletions

View file

@ -91,7 +91,7 @@ object FSMActorSpec {
}
// initialize the lock
initialize
initialize()
private def doLock() {
lockedLatch.open

View file

@ -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" }
}

View file

@ -698,8 +698,7 @@ object SupervisorHierarchySpec {
stop
}
initialize
initialize()
}
}

View file

@ -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)

View file

@ -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")

View file

@ -81,7 +81,7 @@ class FSMDocSpec extends MyFavoriteTestFrameWorkPlusAkkaTestKit {
//#unhandled-elided
//#fsm-body
initialize
initialize()
}
//#simple-fsm
object DemoCode {

View file

@ -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)

View file

@ -257,8 +257,7 @@ private[akka] class ClientFSM(name: RoleName, controllerAddr: InetSocketAddress)
channel.close()
}
initialize
initialize()
}
/**

View file

@ -76,7 +76,7 @@ abstract class GenericBuncher[A: ClassTag, B](val singleTimeout: FiniteDuration,
stop
}
initialize
initialize()
}
object Buncher {

View file

@ -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