commit
6af33381b3
5 changed files with 44 additions and 6 deletions
|
|
@ -12,7 +12,16 @@ import scala.concurrent.duration.{ Duration, FiniteDuration }
|
||||||
|
|
||||||
@SerialVersionUID(1L)
|
@SerialVersionUID(1L)
|
||||||
case class Timeout(duration: FiniteDuration) {
|
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))
|
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))
|
def this(length: Long, unit: TimeUnit) = this(Duration(length, unit))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -26,7 +35,15 @@ object Timeout {
|
||||||
*/
|
*/
|
||||||
val zero: Timeout = new Timeout(Duration.Zero)
|
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)
|
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)
|
def apply(length: Long, unit: TimeUnit): Timeout = new Timeout(length, unit)
|
||||||
|
|
||||||
implicit def durationToTimeout(duration: FiniteDuration): Timeout = new Timeout(duration)
|
implicit def durationToTimeout(duration: FiniteDuration): Timeout = new Timeout(duration)
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,10 @@ design decisions:
|
||||||
#. The role of the communicating systems are symmetric in regards to connection patterns: there
|
#. 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.
|
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
|
The consequence of these decisions is that it is not possible to safely create
|
||||||
with predefined roles (violates assumption 2) and using setups involving NAT (violates assumption 1).
|
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.
|
For client-server setups it is better to use HTTP or Akka I/O.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,12 @@
|
||||||
|
|
||||||
For an introduction of remoting capabilities of Akka please see :ref:`remoting`.
|
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
|
.. note::
|
||||||
peer-to-peer fashion and it has limitations for client-server setups.
|
|
||||||
|
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
|
Preparing your ActorSystem for Remoting
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
|
@ -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.
|
``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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,12 @@
|
||||||
|
|
||||||
For an introduction of remoting capabilities of Akka please see :ref:`remoting`.
|
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
|
.. note::
|
||||||
peer-to-peer fashion and it has limitations for client-server setups.
|
|
||||||
|
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
|
Preparing your ActorSystem for Remoting
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue