diff --git a/akka-actor/src/main/scala/akka/util/Timeout.scala b/akka-actor/src/main/scala/akka/util/Timeout.scala index d02681e052..522b24d480 100644 --- a/akka-actor/src/main/scala/akka/util/Timeout.scala +++ b/akka-actor/src/main/scala/akka/util/Timeout.scala @@ -12,7 +12,16 @@ import scala.concurrent.duration.{ Duration, FiniteDuration } @SerialVersionUID(1L) case class Timeout(duration: FiniteDuration) { + + /** + * Construct a Timeout from the given number of milliseconds. + */ + @deprecated("please be explicit about the time unit and use the two-argument version", "2.3") def this(timeout: Long) = this(Duration(timeout, TimeUnit.MILLISECONDS)) + + /** + * Construct a Timeout from the given time unit and factor. + */ def this(length: Long, unit: TimeUnit) = this(Duration(length, unit)) } @@ -26,7 +35,15 @@ object Timeout { */ val zero: Timeout = new Timeout(Duration.Zero) + /** + * Construct a Timeout from the given number of milliseconds. + */ + @deprecated("please be explicit about the time unit and use the two-argument version", "2.3") def apply(timeout: Long): Timeout = new Timeout(timeout) + + /** + * Construct a Timeout from the given time unit and factor. + */ def apply(length: Long, unit: TimeUnit): Timeout = new Timeout(length, unit) implicit def durationToTimeout(duration: FiniteDuration): Timeout = new Timeout(duration) diff --git a/akka-docs/rst/general/remoting.rst b/akka-docs/rst/general/remoting.rst index 3b2cc58554..901f722a4e 100644 --- a/akka-docs/rst/general/remoting.rst +++ b/akka-docs/rst/general/remoting.rst @@ -64,8 +64,10 @@ design decisions: #. The role of the communicating systems are symmetric in regards to connection patterns: there is no system that only accepts connections, and there is no system that only initiates connections. -The consequence of these decisions is that it is not possible to safely create pure client-server setups -with predefined roles (violates assumption 2) and using setups involving NAT (violates assumption 1). +The consequence of these decisions is that it is not possible to safely create +pure client-server setups with predefined roles (violates assumption 2) and +using setups involving Network Address Translation or Load Balancers (violates +assumption 1). For client-server setups it is better to use HTTP or Akka I/O. diff --git a/akka-docs/rst/java/remoting.rst b/akka-docs/rst/java/remoting.rst index 85b48e1a44..135e35e52f 100644 --- a/akka-docs/rst/java/remoting.rst +++ b/akka-docs/rst/java/remoting.rst @@ -6,8 +6,12 @@ For an introduction of remoting capabilities of Akka please see :ref:`remoting`. -As explained in that chapter Akka remoting is designed for communication in a -peer-to-peer fashion and it has limitations for client-server setups. +.. note:: + + As explained in that chapter Akka remoting is designed for communication in a + peer-to-peer fashion and it has limitations for client-server setups. In + particular Akka Remoting does not work with Network Address Translation and + Load Balancers, among others. Preparing your ActorSystem for Remoting ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/akka-docs/rst/project/migration-guide-2.2.x-2.3.x.rst b/akka-docs/rst/project/migration-guide-2.2.x-2.3.x.rst index 4b5e2b6217..285fbf5748 100644 --- a/akka-docs/rst/project/migration-guide-2.2.x-2.3.x.rst +++ b/akka-docs/rst/project/migration-guide-2.2.x-2.3.x.rst @@ -248,3 +248,14 @@ Akka OSGi Aries Blueprint is Removed ``akka-osgi-aries`` has been removed. Similar can be implemented outside of Akka if needed. +TestKit: reworked time dilation +=============================== + +``TestDuration`` has been changed into an implicit value class plus a Java API in JavaTestKit. Please change:: + + import akka.testkit.duration2TestDuration + +into:: + + import akka.testkit.TestDuration + diff --git a/akka-docs/rst/scala/remoting.rst b/akka-docs/rst/scala/remoting.rst index 53cbff2e11..bbd59bd429 100644 --- a/akka-docs/rst/scala/remoting.rst +++ b/akka-docs/rst/scala/remoting.rst @@ -7,8 +7,12 @@ For an introduction of remoting capabilities of Akka please see :ref:`remoting`. -As explained in that chapter Akka remoting is designed for communication in a -peer-to-peer fashion and it has limitations for client-server setups. +.. note:: + + As explained in that chapter Akka remoting is designed for communication in a + peer-to-peer fashion and it has limitations for client-server setups. In + particular Akka Remoting does not work with Network Address Translation and + Load Balancers, among others. Preparing your ActorSystem for Remoting