Package akka.remote.artery
Class SharedTestState
- java.lang.Object
-
- akka.remote.artery.SharedTestState
-
public class SharedTestState extends java.lang.Object
INTERNAL API: Thread safe mutable state that is shared among the test operators.
-
-
Constructor Summary
Constructors Constructor Description SharedTestState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
anyBlackholePresent()
void
blackhole(Address a, Address b, ThrottlerTransportAdapter.Direction direction)
Enable blackholing between given address in given directionvoid
failInboundStreamOnce(java.lang.Throwable ex)
Cause the inbound stream to fail with the given exception.scala.Option<java.lang.Throwable>
getInboundFailureOnce()
Get the exception to fail the inbound stream with and immediately reset the state to not-failed.boolean
isBlackhole(Address from, Address to)
void
passThrough(Address a, Address b, ThrottlerTransportAdapter.Direction direction)
-
-
-
Method Detail
-
anyBlackholePresent
public boolean anyBlackholePresent()
-
blackhole
public void blackhole(Address a, Address b, ThrottlerTransportAdapter.Direction direction)
Enable blackholing between given address in given direction
-
failInboundStreamOnce
public final void failInboundStreamOnce(java.lang.Throwable ex)
Cause the inbound stream to fail with the given exception. Can be used to test inbound stream restart / recovery.
-
getInboundFailureOnce
public final scala.Option<java.lang.Throwable> getInboundFailureOnce()
Get the exception to fail the inbound stream with and immediately reset the state to not-failed. This is used to simulate a single failure on the stream, where a successful restart recovers operations.
-
passThrough
public void passThrough(Address a, Address b, ThrottlerTransportAdapter.Direction direction)
-
-