diff --git a/src/core/Akka.API.Tests/CoreAPISpec.ApproveRemote.verified.txt b/src/core/Akka.API.Tests/CoreAPISpec.ApproveRemote.verified.txt index ae91c0d0c22..0f8ecc70ccc 100644 --- a/src/core/Akka.API.Tests/CoreAPISpec.ApproveRemote.verified.txt +++ b/src/core/Akka.API.Tests/CoreAPISpec.ApproveRemote.verified.txt @@ -580,6 +580,58 @@ namespace Akka.Remote.Transport public FailureInjectorProvider() { } public Akka.Remote.Transport.Transport Create(Akka.Remote.Transport.Transport wrappedTransport, Akka.Actor.ExtendedActorSystem system) { } } + public class FailureInjectorTransportAdapter : Akka.Remote.Transport.AbstractTransportAdapter, Akka.Remote.Transport.IAssociationEventListener + { + public readonly Akka.Actor.ExtendedActorSystem ExtendedActorSystem; + public const string FailureInjectorSchemeIdentifier = "gremlin"; + protected int MaximumOverhead; + public FailureInjectorTransportAdapter(Akka.Remote.Transport.Transport wrappedTransport, Akka.Actor.ExtendedActorSystem extendedActorSystem) { } + protected override Akka.Remote.Transport.SchemeAugmenter SchemeAugmenter { get; } + protected override void InterceptAssociate(Akka.Actor.Address remoteAddress, System.Threading.Tasks.TaskCompletionSource statusPromise) { } + protected override System.Threading.Tasks.Task InterceptListen(Akka.Actor.Address listenAddress, System.Threading.Tasks.Task listenerTask) { } + public override System.Threading.Tasks.Task ManagementCommand(object message) { } + public void Notify(Akka.Remote.Transport.IAssociationEvent ev) { } + public bool ShouldDropInbound(Akka.Actor.Address remoteAddress, object instance, string debugMessage) { } + public bool ShouldDropOutbound(Akka.Actor.Address remoteAddress, object instance, string debugMessage) { } + public sealed class All + { + public All(Akka.Remote.Transport.FailureInjectorTransportAdapter.IGremlinMode mode) { } + public Akka.Remote.Transport.FailureInjectorTransportAdapter.IGremlinMode Mode { get; } + } + public sealed class Drop : Akka.Remote.Transport.FailureInjectorTransportAdapter.IGremlinMode + { + public Drop(double outboundDropP, double inboundDropP) { } + public double InboundDropP { get; } + public double OutboundDropP { get; } + } + public interface IFailureInjectorCommand { } + public interface IGremlinMode { } + public sealed class One + { + public One(Akka.Actor.Address remoteAddress, Akka.Remote.Transport.FailureInjectorTransportAdapter.IGremlinMode mode) { } + public Akka.Remote.Transport.FailureInjectorTransportAdapter.IGremlinMode Mode { get; } + public Akka.Actor.Address RemoteAddress { get; } + } + public sealed class PassThru : Akka.Remote.Transport.FailureInjectorTransportAdapter.IGremlinMode + { + public static Akka.Remote.Transport.FailureInjectorTransportAdapter.PassThru Instance { get; } + } + } + public sealed class ForceDisassociate + { + public ForceDisassociate(Akka.Actor.Address address) { } + public Akka.Actor.Address Address { get; } + } + public sealed class ForceDisassociateAck + { + public static Akka.Remote.Transport.ForceDisassociateAck Instance { get; } + } + public sealed class ForceDisassociateExplicitly + { + public ForceDisassociateExplicitly(Akka.Actor.Address address, Akka.Remote.Transport.DisassociateInfo reason) { } + public Akka.Actor.Address Address { get; } + public Akka.Remote.Transport.DisassociateInfo Reason { get; } + } public interface IAssociationEvent : Akka.Actor.INoSerializationVerificationNeeded { } public interface IAssociationEventListener { @@ -711,6 +763,16 @@ namespace Akka.Remote.Transport public ThrottlerProvider() { } public Akka.Remote.Transport.Transport Create(Akka.Remote.Transport.Transport wrappedTransport, Akka.Actor.ExtendedActorSystem system) { } } + public sealed class TokenBucket : Akka.Remote.Transport.ThrottleMode + { + public TokenBucket(int capacity, double tokensPerSecond, long nanoTimeOfLastSend, int availableTokens) { } + public override bool Equals(object obj) { } + public override int GetHashCode() { } + public override System.TimeSpan TimeToAvailable(long currentNanoTime, int tokens) { } + public override System.ValueTuple TryConsumeTokens(long nanoTimeOfSend, int tokens) { } + public static bool ==(Akka.Remote.Transport.TokenBucket left, Akka.Remote.Transport.TokenBucket right) { } + public static bool !=(Akka.Remote.Transport.TokenBucket left, Akka.Remote.Transport.TokenBucket right) { } + } public abstract class Transport { protected Transport() { } diff --git a/src/core/Akka.Remote/Transport/FailureInjectorTransportAdapter.cs b/src/core/Akka.Remote/Transport/FailureInjectorTransportAdapter.cs index 61cad66ed6d..2c1092f9ca1 100644 --- a/src/core/Akka.Remote/Transport/FailureInjectorTransportAdapter.cs +++ b/src/core/Akka.Remote/Transport/FailureInjectorTransportAdapter.cs @@ -67,7 +67,7 @@ private FailureInjectorException(SerializationInfo info, StreamingContext contex /// /// TBD /// - internal class FailureInjectorTransportAdapter : AbstractTransportAdapter, IAssociationEventListener + public class FailureInjectorTransportAdapter : AbstractTransportAdapter, IAssociationEventListener { #region Internal message classes diff --git a/src/core/Akka.Remote/Transport/ThrottleTransportAdapter.cs b/src/core/Akka.Remote/Transport/ThrottleTransportAdapter.cs index 3a60ef439cd..b7cad508e3b 100644 --- a/src/core/Akka.Remote/Transport/ThrottleTransportAdapter.cs +++ b/src/core/Akka.Remote/Transport/ThrottleTransportAdapter.cs @@ -139,7 +139,7 @@ public override Task ManagementCommand(object message) /// /// Management command to force disassociation of an address /// - internal sealed class ForceDisassociate + public sealed class ForceDisassociate { /// /// TBD @@ -159,7 +159,7 @@ public ForceDisassociate(Address address) /// /// Management command to force disassociation of an address with an explicit error. /// - internal sealed class ForceDisassociateExplicitly + public sealed class ForceDisassociateExplicitly { /// /// TBD @@ -186,7 +186,7 @@ public ForceDisassociateExplicitly(Address address, DisassociateInfo reason) /// /// INTERNAL API /// - internal sealed class ForceDisassociateAck + public sealed class ForceDisassociateAck { private ForceDisassociateAck() { } // ReSharper disable once InconsistentNaming @@ -653,7 +653,7 @@ public override TimeSpan TimeToAvailable(long currentNanoTime, int tokens) /// /// Applies token-bucket throttling to introduce latency to a connection /// - sealed class TokenBucket : ThrottleMode + public sealed class TokenBucket : ThrottleMode { readonly int _capacity; readonly double _tokensPerSecond; @@ -726,7 +726,6 @@ private bool Equals(TokenBucket other) && _availableTokens == other._availableTokens; } - /// public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; @@ -734,7 +733,6 @@ public override bool Equals(object obj) return obj is TokenBucket && Equals((TokenBucket)obj); } - /// public override int GetHashCode() { unchecked