Interface Conductor
-
- All Known Implementing Classes:
TestConductorExt
public interface Conductor
The conductor is the one orchestrating the test: it governs theController
’s port to which allPlayer
s connect, it issues commands to theirakka.remote.testconductor.NetworkFailureInjector
and provides support for barriers using theBarrierCoordinator
. All of this is bundled inside theTestConductorExt
extension.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
_controller_$eq(ActorRef x$1)
scala.concurrent.Future<akka.remote.testconductor.Done>
abort(RoleName node, RoleName target)
Tell the remote support to TCP_RESET the connection to the given remote peer.scala.concurrent.Future<akka.remote.testconductor.Done>
blackhole(RoleName node, RoleName target, Direction direction)
Switch the Netty pipeline of the remote support into blackhole mode for sending and/or receiving: it will just drop all messages right before submitting them to the Socket or right after receiving them from the Socket.ActorRef
controller()
scala.concurrent.Future<akka.remote.testconductor.Done>
disconnect(RoleName node, RoleName target)
Tell the remote support to shutdown the connection to the given remote peer.scala.concurrent.Future<akka.remote.testconductor.Done>
exit(RoleName node, int exitValue)
Tell the remote node to shut itself down using System.exit with the given exitValue.scala.concurrent.Future<scala.collection.Iterable<RoleName>>
getNodes()
Obtain the list of remote host names currently registered.scala.concurrent.Future<akka.remote.testconductor.Done>
passThrough(RoleName node, RoleName target, Direction direction)
Switch the Netty pipeline of the remote support into pass through mode for sending and/or receiving.scala.concurrent.Future<akka.remote.testconductor.Done>
removeNode(RoleName node)
Remove a remote host from the list, so that the remaining nodes may still pass subsequent barriers.void
requireTestConductorTranport()
scala.concurrent.Future<akka.remote.testconductor.Done>
shutdown(RoleName node)
Tell the actor system at the remote node to shut itself down.scala.concurrent.Future<akka.remote.testconductor.Done>
shutdown(RoleName node, boolean abort)
Tell the actor system at the remote node to shut itself down without awaiting termination of remote-deployed children.scala.concurrent.Future<java.net.InetSocketAddress>
sockAddr()
Obtain the port to which the controller’s socket is actually bound.scala.concurrent.Future<java.net.InetSocketAddress>
startController(int participants, RoleName name, java.net.InetSocketAddress controllerPort)
Start theController
, which in turn will bind to a TCP port as specified in theakka.testconductor.port
config property, where 0 denotes automatic allocation.scala.concurrent.Future<akka.remote.testconductor.Done>
throttle(RoleName node, RoleName target, Direction direction, double rateMBit)
Deprecated.Throttle is not implemented, use blackhole and passThrough.
-
-
-
Method Detail
-
_controller_$eq
void _controller_$eq(ActorRef x$1)
-
abort
scala.concurrent.Future<akka.remote.testconductor.Done> abort(RoleName node, RoleName target)
Tell the remote support to TCP_RESET the connection to the given remote peer. It works regardless of whether the recipient was initiator or responder.- Parameters:
node
- is the symbolic name of the node which is to be affectedtarget
- is the symbolic name of the other node to which connectivity shall be impeded
-
blackhole
scala.concurrent.Future<akka.remote.testconductor.Done> blackhole(RoleName node, RoleName target, Direction direction)
Switch the Netty pipeline of the remote support into blackhole mode for sending and/or receiving: it will just drop all messages right before submitting them to the Socket or right after receiving them from the Socket.====Note==== To use this feature you must activate the failure injector and throttler transport adapters by specifying
testTransport(on = true)
in your MultiNodeConfig.- Parameters:
node
- is the symbolic name of the node which is to be affectedtarget
- is the symbolic name of the other node to which connectivity shall be impededdirection
- can be eitherDirection.Send
,Direction.Receive
orDirection.Both
-
controller
ActorRef controller()
-
disconnect
scala.concurrent.Future<akka.remote.testconductor.Done> disconnect(RoleName node, RoleName target)
Tell the remote support to shutdown the connection to the given remote peer. It works regardless of whether the recipient was initiator or responder.- Parameters:
node
- is the symbolic name of the node which is to be affectedtarget
- is the symbolic name of the other node to which connectivity shall be impeded
-
exit
scala.concurrent.Future<akka.remote.testconductor.Done> exit(RoleName node, int exitValue)
Tell the remote node to shut itself down using System.exit with the given exitValue. The node will also be removed, so that the remaining nodes may still pass subsequent barriers.- Parameters:
node
- is the symbolic name of the node which is to be affectedexitValue
- is the return code which shall be given to System.exit
-
getNodes
scala.concurrent.Future<scala.collection.Iterable<RoleName>> getNodes()
Obtain the list of remote host names currently registered.
-
passThrough
scala.concurrent.Future<akka.remote.testconductor.Done> passThrough(RoleName node, RoleName target, Direction direction)
Switch the Netty pipeline of the remote support into pass through mode for sending and/or receiving.====Note==== To use this feature you must activate the failure injector and throttler transport adapters by specifying
testTransport(on = true)
in your MultiNodeConfig.- Parameters:
node
- is the symbolic name of the node which is to be affectedtarget
- is the symbolic name of the other node to which connectivity shall be impededdirection
- can be eitherDirection.Send
,Direction.Receive
orDirection.Both
-
removeNode
scala.concurrent.Future<akka.remote.testconductor.Done> removeNode(RoleName node)
Remove a remote host from the list, so that the remaining nodes may still pass subsequent barriers. This must be done before the client connection breaks down in order to affect an “orderly” removal (i.e. without failing present and future barriers).- Parameters:
node
- is the symbolic name of the node which is to be removed
-
requireTestConductorTranport
void requireTestConductorTranport()
-
shutdown
scala.concurrent.Future<akka.remote.testconductor.Done> shutdown(RoleName node)
Tell the actor system at the remote node to shut itself down. The node will also be removed, so that the remaining nodes may still pass subsequent barriers.- Parameters:
node
- is the symbolic name of the node which is to be affected
-
shutdown
scala.concurrent.Future<akka.remote.testconductor.Done> shutdown(RoleName node, boolean abort)
Tell the actor system at the remote node to shut itself down without awaiting termination of remote-deployed children. The node will also be removed, so that the remaining nodes may still pass subsequent barriers.- Parameters:
node
- is the symbolic name of the node which is to be affected
-
sockAddr
scala.concurrent.Future<java.net.InetSocketAddress> sockAddr()
Obtain the port to which the controller’s socket is actually bound. This will deviate from the configuration inakka.testconductor.port
in case that was given as zero.
-
startController
scala.concurrent.Future<java.net.InetSocketAddress> startController(int participants, RoleName name, java.net.InetSocketAddress controllerPort)
Start theController
, which in turn will bind to a TCP port as specified in theakka.testconductor.port
config property, where 0 denotes automatic allocation. Since the latter is actually preferred, aFuture[Int]
is returned which will be completed with the port number actually chosen, so that this can then be communicated to the players for their proper start-up.This method also invokes
Player
.startClient, since it is expected that the conductor participates in barriers for overall coordination. The returned Future will only be completed once the client’s start-up finishes, which in fact waits for all other players to connect.- Parameters:
participants
- gives the number of participants which shall connect before any of their startClient() operations complete.
-
throttle
scala.concurrent.Future<akka.remote.testconductor.Done> throttle(RoleName node, RoleName target, Direction direction, double rateMBit)
Deprecated.Throttle is not implemented, use blackhole and passThrough. Since 2.8.0.Make the remoting pipeline on the node throttle data sent to or received from the given remote peer. Throttling works by delaying packet submission within the netty pipeline until the packet would have been completely sent according to the given rate, the previous packet completion and the current packet length. In case of large packets they are split up if the calculated send pause would exceedakka.testconductor.packet-split-threshold
(roughly). All of this uses the system’s scheduler, which is not terribly precise and will execute tasks later than they are schedule (even on average), but that is countered by using the actual execution time for determining how much to send, leading to the correct output rate, but with increased latency.====Note==== To use this feature you must activate the failure injector and throttler transport adapters by specifying
testTransport(on = true)
in your MultiNodeConfig.- Parameters:
node
- is the symbolic name of the node which is to be affectedtarget
- is the symbolic name of the other node to which connectivity shall be throttleddirection
- can be eitherDirection.Send
,Direction.Receive
orDirection.Both
rateMBit
- is the maximum data rate in MBit
-
-