Merge pull request #925 from richdougherty/wip-2766-timeractive-rename

Rename FSM and TestFSMRef's timerActive_? to isTimerActive. Fixes #2766
This commit is contained in:
Roland Kuhn 2012-12-07 01:55:25 -08:00
commit d642fab666
8 changed files with 34 additions and 13 deletions

View file

@ -23,4 +23,11 @@ Search Replace with
==================================== ====================================
If you need to convert from Java to ``scala.collection.immutable.Seq`` or ``scala.collection.immutable.Iterable`` you should use ``akka.japi.Util.immutableSeq(…)``,
and if you need to convert from Scala you can simply switch to using immutable collections yourself or use the ``to[immutable.<collection-type>]`` method.
and if you need to convert from Scala you can simply switch to using immutable collections yourself or use the ``to[immutable.<collection-type>]`` method.
API changes to FSM and TestFSMRef
=================================
The ``timerActive_?`` method has been deprecated in both the ``FSM`` trait and the ``TestFSMRef``
class. You should now use the ``isTimerActive`` method instead. The old method will remain
throughout 2.2.x. It will be removed in Akka 2.3.

View file

@ -110,11 +110,11 @@ class TestkitDocSpec extends AkkaSpec with DefaultTimeout with ImplicitSender {
fsm.setState(stateName = 1)
assert(fsm.stateName == 1)
assert(fsm.timerActive_?("test") == false)
assert(fsm.isTimerActive("test") == false)
fsm.setTimer("test", 12, 10 millis, true)
assert(fsm.timerActive_?("test") == true)
assert(fsm.isTimerActive("test") == true)
fsm.cancelTimer("test")
assert(fsm.timerActive_?("test") == false)
assert(fsm.isTimerActive("test") == false)
//#test-fsm-ref
}

View file

@ -371,7 +371,7 @@ which is guaranteed to work immediately, meaning that the scheduled message
will not be processed after this call even if the timer already fired and
queued it. The status of any timer may be inquired with
:func:`timerActive_?(name)`
:func:`isTimerActive(name)`
These named timers complement state timeouts because they are not affected by
intervening reception of other messages.