Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added more messages which ignores the serialization #2587

Merged
merged 5 commits into from Apr 10, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -37,6 +37,7 @@ public DistributedPubSubMediatorSpecConfig()
CommonConfig = ConfigurationFactory.ParseString(@"
akka.loglevel = INFO
akka.actor.provider = ""Akka.Cluster.ClusterActorRefProvider, Akka.Cluster""
akka.actor.serialize-messages = off
akka.remote.log-remote-lifecycle-events = off
akka.cluster.auto-down-unreachable-after = 0s
akka.cluster.pub-sub.max-delta-elements = 500
@@ -15,7 +15,7 @@ namespace Akka.Cluster.Tools.PublishSubscribe
/// <summary>
/// TBD
/// </summary>
public class DistributedPubSubSettings
public sealed class DistributedPubSubSettings : INoSerializationVerificationNeeded
{
/// <summary>
/// Creates cluster publish/subscribe settings from the default configuration `akka.cluster.pub-sub`.
@@ -14,7 +14,7 @@ namespace Akka.Cluster.Tools.Singleton
/// <summary>
/// TBD
/// </summary>
public sealed class ClusterSingletonProxySettings
public sealed class ClusterSingletonProxySettings : INoSerializationVerificationNeeded
{
/// <summary>
/// TBD
@@ -443,7 +443,7 @@ public override int GetHashCode()
/// for example not access `sender()` reference of an enclosing actor.
/// </summary>
[Serializable]
public sealed class Update : ICommand
public sealed class Update : ICommand, INoSerializationVerificationNeeded
{
private IReplicatedData ModifyWithInitial(IReplicatedData initial, Func<IReplicatedData, IReplicatedData> modifier, IReplicatedData data) =>
modifier(data ?? initial);
@@ -489,7 +489,7 @@ public Update(IKey key, IReplicatedData initial, IWriteConsistency consistency,
/// 2. <see cref="ModifyFailure"/> if a <see cref="Update.Modify"/> delegate has thrown a failure.
/// 3. <see cref="UpdateTimeout"/> if a request couldn't complete withing given timeout and write consistency constraints.
/// </summary>
public interface IUpdateResponse
public interface IUpdateResponse : INoSerializationVerificationNeeded
{
/// <summary>
/// Key, under with updated data is going to be stored.
@@ -705,7 +705,7 @@ public override int GetHashCode()
/// given <see cref="Key"/>. The <see cref="Replicator"/> will reply with one of the <see cref="IDeleteResponse{T}"/> messages.
/// </summary>
[Serializable]
public sealed class Delete : ICommand, IEquatable<Delete>
public sealed class Delete : ICommand, INoSerializationVerificationNeeded, IEquatable<Delete>
{
public IKey Key { get; }
public IWriteConsistency Consistency { get; }
@@ -744,7 +744,7 @@ public override int GetHashCode()
/// 2. <see cref="ReplicationDeletedFailure"/> when delete operation ended with failure.
/// 3. <see cref="DataDeleted"/> when an operation attempted to delete already deleted data.
/// </summary>
public interface IDeleteResponse
public interface IDeleteResponse : INoSerializationVerificationNeeded
{
/// <summary>
/// Key, for which data was deleted.
@@ -192,7 +192,7 @@ namespace Akka.Cluster.Tools.PublishSubscribe
protected override void PreStart() { }
public static Akka.Actor.Props Props(Akka.Cluster.Tools.PublishSubscribe.DistributedPubSubSettings settings) { }
}
public class DistributedPubSubSettings
public sealed class DistributedPubSubSettings : Akka.Actor.INoSerializationVerificationNeeded
{
public DistributedPubSubSettings(string role, Akka.Routing.RoutingLogic routingLogic, System.TimeSpan gossipInterval, System.TimeSpan removedTimeToLive, int maxDeltaElements) { }
public System.TimeSpan GossipInterval { get; }
@@ -354,7 +354,7 @@ namespace Akka.Cluster.Tools.Singleton
protected override void PreStart() { }
public static Akka.Actor.Props Props(string singletonManagerPath, Akka.Cluster.Tools.Singleton.ClusterSingletonProxySettings settings) { }
}
public sealed class ClusterSingletonProxySettings
public sealed class ClusterSingletonProxySettings : Akka.Actor.INoSerializationVerificationNeeded
{
public ClusterSingletonProxySettings(string singletonName, string role, System.TimeSpan singletonIdentificationInterval, int bufferSize) { }
public int BufferSize { get; }
@@ -300,7 +300,7 @@ namespace Akka.Actor
public void Tell(object message, Akka.Actor.IActorRef sender = null) { }
public override string ToString() { }
}
public class ActorSelectionMessage : Akka.Actor.IAutoReceivedMessage, Akka.Actor.INoSerializationVerificationNeeded, Akka.Actor.IPossiblyHarmful
public class ActorSelectionMessage : Akka.Actor.IAutoReceivedMessage, Akka.Actor.IPossiblyHarmful
{
public ActorSelectionMessage(object message, Akka.Actor.SelectionPathElement[] elements, bool wildCardFanOut = False) { }
public Akka.Actor.SelectionPathElement[] Elements { get; }
@@ -963,7 +963,7 @@ namespace Akka.Actor
Akka.Actor.IStash Stash { get; set; }
}
public interface IAdvancedScheduler : Akka.Actor.IActionScheduler { }
public interface IAutoReceivedMessage : Akka.Actor.INoSerializationVerificationNeeded { }
public interface IAutoReceivedMessage { }
public interface ICancelable
{
bool IsCancellationRequested { get; }
@@ -1012,7 +1012,7 @@ namespace Akka.Actor
{
Akka.Actor.Directive Decide(System.Exception cause);
}
public sealed class Identify : Akka.Actor.IAutoReceivedMessage, Akka.Actor.INoSerializationVerificationNeeded, Akka.Actor.INotInfluenceReceiveTimeout
public sealed class Identify : Akka.Actor.IAutoReceivedMessage, Akka.Actor.INotInfluenceReceiveTimeout
{
public Identify(object messageId) { }
public object MessageId { get; }
@@ -1175,7 +1175,7 @@ namespace Akka.Actor
"[0.7.0]")]
public interface IWithBoundedStash : Akka.Actor.IActorStash, Akka.Dispatch.IRequiresMessageQueue<Akka.Dispatch.IBoundedDequeBasedMessageQueueSemantics> { }
public interface IWithUnboundedStash : Akka.Actor.IActorStash, Akka.Dispatch.IRequiresMessageQueue<Akka.Dispatch.IUnboundedDequeBasedMessageQueueSemantics> { }
public sealed class Kill : Akka.Actor.IAutoReceivedMessage, Akka.Actor.INoSerializationVerificationNeeded
public sealed class Kill : Akka.Actor.IAutoReceivedMessage
{
public static Akka.Actor.Kill Instance { get; }
public override string ToString() { }
@@ -1330,7 +1330,7 @@ namespace Akka.Actor
public static System.Threading.Tasks.Task PipeTo<T>(this System.Threading.Tasks.Task<T> taskToPipe, Akka.Actor.ICanTell recipient, Akka.Actor.IActorRef sender = null, System.Func<T, object> success = null, System.Func<System.Exception, object> failure = null) { }
public static System.Threading.Tasks.Task PipeTo(this System.Threading.Tasks.Task taskToPipe, Akka.Actor.ICanTell recipient, Akka.Actor.IActorRef sender = null, System.Func<object> success = null, System.Func<System.Exception, object> failure = null) { }
}
public sealed class PoisonPill : Akka.Actor.IAutoReceivedMessage, Akka.Actor.INoSerializationVerificationNeeded, Akka.Actor.IPossiblyHarmful, Akka.Event.IDeadLetterSuppression
public sealed class PoisonPill : Akka.Actor.IAutoReceivedMessage, Akka.Actor.IPossiblyHarmful, Akka.Event.IDeadLetterSuppression
{
public static Akka.Actor.PoisonPill Instance { get; }
public override string ToString() { }
@@ -4260,7 +4260,7 @@ namespace Akka.Routing
{
public static readonly Akka.Routing.GetRoutees GetRoutees;
}
public abstract class RoutingLogic
public abstract class RoutingLogic : Akka.Actor.INoSerializationVerificationNeeded
{
protected RoutingLogic() { }
public abstract Akka.Routing.Routee Select(object message, Akka.Routing.Routee[] routees);
@@ -903,7 +903,7 @@ namespace Akka.Streams.Actors
public State(Reactive.Streams.ISubscription subscription, long requested, bool isCanceled) { }
}
}
public sealed class Cancel : Akka.Event.IDeadLetterSuppression, Akka.Streams.Actors.IActorPublisherMessage
public sealed class Cancel : Akka.Actor.INoSerializationVerificationNeeded, Akka.Event.IDeadLetterSuppression, Akka.Streams.Actors.IActorPublisherMessage
{
public static readonly Akka.Streams.Actors.Cancel Instance;
}
@@ -960,7 +960,7 @@ namespace Akka.Streams.Actors
public readonly Reactive.Streams.ISubscription Subscription;
public OnSubscribe(Reactive.Streams.ISubscription subscription) { }
}
public sealed class Request : Akka.Event.IDeadLetterSuppression, Akka.Streams.Actors.IActorPublisherMessage
public sealed class Request : Akka.Actor.INoSerializationVerificationNeeded, Akka.Event.IDeadLetterSuppression, Akka.Streams.Actors.IActorPublisherMessage
{
public readonly long Count;
public Request(long count) { }
@@ -970,7 +970,7 @@ namespace Akka.Streams.Actors
public readonly Reactive.Streams.ISubscriber<T> Subscriber;
public Subscribe(Reactive.Streams.ISubscriber<T> subscriber) { }
}
public sealed class SubscriptionTimeoutExceeded : Akka.Event.IDeadLetterSuppression, Akka.Streams.Actors.IActorPublisherMessage
public sealed class SubscriptionTimeoutExceeded : Akka.Actor.INoSerializationVerificationNeeded, Akka.Event.IDeadLetterSuppression, Akka.Streams.Actors.IActorPublisherMessage
{
public static readonly Akka.Streams.Actors.SubscriptionTimeoutExceeded Instance;
}
@@ -38,41 +38,41 @@ internal class ClusterUserAction
/// </summary>
internal abstract class BaseClusterUserAction
{
readonly Address _address;

/// <summary>
/// TBD
/// </summary>
public Address Address { get { return _address; } }

/// <summary>
/// TBD
/// </summary>
/// <param name="address">TBD</param>
protected BaseClusterUserAction(Address address)
{
_address = address;
Address = address;
}

/// <summary>
/// TBD
/// </summary>
/// <param name="obj">TBD</param>
public Address Address { get; }

/// <summary>
/// TBD
/// </summary>
/// <param name="other">TBD</param>
/// <returns>TBD</returns>
public override bool Equals(object obj)
protected bool Equals(BaseClusterUserAction other)
{
var baseUserAction = (BaseClusterUserAction)obj;

This comment has been minimized.

Copy link
@alexvaluyskiy

alexvaluyskiy Apr 7, 2017

Author Member

This could cause an exception in some serializers

return baseUserAction != null && Equals(baseUserAction);
return Equals(Address, other.Address);
}

/// <summary>
/// TBD
/// </summary>
/// <param name="other">TBD</param>
/// <param name="obj">TBD</param>
/// <returns>TBD</returns>
protected bool Equals(BaseClusterUserAction other)
public override bool Equals(object obj)
{
return Equals(_address, other._address);
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != this.GetType()) return false;
return Equals((BaseClusterUserAction)obj);
}

/// <summary>
@@ -81,7 +81,7 @@ protected bool Equals(BaseClusterUserAction other)
/// <returns>TBD</returns>
public override int GetHashCode()
{
return (_address != null ? _address.GetHashCode() : 0);
return (Address != null ? Address.GetHashCode() : 0);
}
}

@@ -55,6 +55,7 @@ private static string GetConfig()
remote {
transport = ""Akka.Remote.Remoting,Akka.Remote""
actor.serialize-messages = off
retry-gate-closed-for = 1 s
log-remote-lifecycle-events = on
@@ -15,21 +15,21 @@ namespace Akka.Streams.TestKit
{
public static class GraphStageMessages
{
public class Push
public class Push : INoSerializationVerificationNeeded
{
public static Push Instance { get; } = new Push();

private Push() { }
}

public class UpstreamFinish
public class UpstreamFinish : INoSerializationVerificationNeeded
{
public static UpstreamFinish Instance { get; } = new UpstreamFinish();

private UpstreamFinish() { }
}

public class Failure
public class Failure : INoSerializationVerificationNeeded
{
public Failure(Exception ex)
{
@@ -39,14 +39,14 @@ public Failure(Exception ex)
public Exception Ex { get; }
}

public class Pull
public class Pull : INoSerializationVerificationNeeded
{
public static Pull Instance { get; } = new Pull();

private Pull() { }
}

public class DownstreamFinish
public class DownstreamFinish : INoSerializationVerificationNeeded
{
public static DownstreamFinish Instance { get; } = new DownstreamFinish();

@@ -83,7 +83,7 @@ public interface IActorPublisherMessage: IDeadLetterSuppression { }
/// subscriber requests more elements.
/// </summary>
[Serializable]
public sealed class Request : IActorPublisherMessage
public sealed class Request : IActorPublisherMessage, INoSerializationVerificationNeeded
{
/// <summary>
/// TBD
@@ -115,7 +115,7 @@ public Request(long count)
/// subscriber cancels the subscription.
/// </summary>
[Serializable]
public sealed class Cancel : IActorPublisherMessage
public sealed class Cancel : IActorPublisherMessage, INoSerializationVerificationNeeded
{
/// <summary>
/// TBD
@@ -130,7 +130,7 @@ public sealed class Cancel : IActorPublisherMessage
/// publisher will already be in cancelled state, thus the actor should clean-up and stop itself.
/// </summary>
[Serializable]
public sealed class SubscriptionTimeoutExceeded : IActorPublisherMessage
public sealed class SubscriptionTimeoutExceeded : IActorPublisherMessage, INoSerializationVerificationNeeded
{
/// <summary>
/// TBD
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.