diff --git a/build.fsx b/build.fsx index d9c027a5d7a..b3883c44559 100644 --- a/build.fsx +++ b/build.fsx @@ -591,7 +591,8 @@ Target "Protobuf" <| fun _ -> ("Persistence.proto", "/src/core/Akka.Persistence/Serialization/Proto/"); ("StreamRefMessages.proto", "/src/core/Akka.Streams/Serialization/Proto/"); ("ReplicatorMessages.proto", "/src/contrib/cluster/Akka.DistributedData/Serialization/Proto/"); - ("ReplicatedDataMessages.proto", "/src/contrib/cluster/Akka.DistributedData/Serialization/Proto/"); ] + ("ReplicatedDataMessages.proto", "/src/contrib/cluster/Akka.DistributedData/Serialization/Proto/") + ("ClusterMetricsMessages.proto", "/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/Proto/") ] printfn "Using proto.exe: %s" protocPath diff --git a/src/contrib/cluster/Akka.Cluster.Metrics/Routing/ClusterMetricsRouting.cs b/src/contrib/cluster/Akka.Cluster.Metrics/Routing/ClusterMetricsRouting.cs index ffe4d5fb256..64b04df08c1 100644 --- a/src/contrib/cluster/Akka.Cluster.Metrics/Routing/ClusterMetricsRouting.cs +++ b/src/contrib/cluster/Akka.Cluster.Metrics/Routing/ClusterMetricsRouting.cs @@ -131,7 +131,7 @@ Option UpdateWeightedRoutees() /// /// The supervision strategy of the router actor can be configured with /// [[#withSupervisorStrategy]]. If no strategy is provided, routers default to - /// a strategy of “always escalate”. This means that errors are passed up to the + /// a strategy of [[always escalate]]. This means that errors are passed up to the /// router's supervisor for handling. /// /// The router's supervisor will treat the error as an error with the router itself. diff --git a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/ClusterMetricMessages.cs b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/ClusterMetricMessages.cs index 5cced18e6d7..65272f209c9 100644 --- a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/ClusterMetricMessages.cs +++ b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/ClusterMetricMessages.cs @@ -25,12 +25,14 @@ public interface IClusterMetricMessage { } /// Envelope adding a sender address to the cluster metrics gossip. /// [InternalApi] - public sealed partial class MetricsGossipEnvelope : IClusterMetricMessage, IDeadLetterSuppression + public sealed class MetricsGossipEnvelope : IClusterMetricMessage, IDeadLetterSuppression { /// /// Akka's actor address /// public Actor.Address FromAddress { get; } + public MetricsGossip Gossip { get; } + public bool Reply { get; } /// /// Creates new instance of diff --git a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/ClusterMetricsMessageSerializer.cs b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/ClusterMetricsMessageSerializer.cs index cf28ca92a8f..63472251daf 100644 --- a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/ClusterMetricsMessageSerializer.cs +++ b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/ClusterMetricsMessageSerializer.cs @@ -6,16 +6,16 @@ //----------------------------------------------------------------------- using System; -using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; using Akka.Actor; using Akka.Cluster.Metrics.Helpers; using Akka.Dispatch; +using Akka.Cluster.Metrics.Serialization.Proto.Msg; +using Akka.Remote.Serialization.Proto.Msg; using Akka.Serialization; using Akka.Util; using Google.Protobuf; -using Google.Protobuf.WellKnownTypes; namespace Akka.Cluster.Metrics.Serialization { @@ -35,15 +35,21 @@ public class ClusterMetricsMessageSerializer : SerializerWithStringManifest private const string HeapMetricsSelectorManifest = "e"; private const string SystemLoadAverageMetricsSelectorManifest = "f"; - private readonly Lazy _serialization; - #endregion + + private readonly ExtendedActorSystem _system; + private Akka.Serialization.Serialization _ser; + + private Akka.Serialization.Serialization Serialization + { + get => _ser ?? (_ser = new Akka.Serialization.Serialization(_system)); + } /// public ClusterMetricsMessageSerializer(ExtendedActorSystem system) : base(system) { - _serialization = new Lazy(() => new Akka.Serialization.Serialization(system)); + _system = system; } /// @@ -52,10 +58,10 @@ public override byte[] ToBinary(object obj) switch (obj) { case MetricsGossipEnvelope m: return Compress(MetricsGossipEnvelopeToProto(m)); // TODO: Add compression here - case Metrics.AdaptiveLoadBalancingPool alb: return AdaptiveLoadBalancingPoolToBinary(alb); - case Metrics.MixMetricsSelector mms: return MixMetricsSelectorToBinary(mms); - case CpuMetricsSelector _: return new byte[0]; - case MemoryMetricsSelector _: return new byte[0]; + case AdaptiveLoadBalancingPool alb: return AdaptiveLoadBalancingPoolToBinary(alb); + case MixMetricsSelector mms: return MixMetricsSelectorToBinary(mms); + case CpuMetricsSelector _: return Array.Empty(); + case MemoryMetricsSelector _: return Array.Empty(); default: throw new ArgumentException($"Can't serialize object of type ${obj.GetType().Name} in [${GetType().Name}]"); } @@ -119,8 +125,8 @@ public override string Manifest(object o) switch (o) { case MetricsGossipEnvelope _: return MetricsGossipEnvelopeManifest; - case Metrics.AdaptiveLoadBalancingPool _: return AdaptiveLoadBalancingPoolManifest; - case Metrics.MixMetricsSelector _: return MixMetricsSelectorManifest; + case AdaptiveLoadBalancingPool _: return AdaptiveLoadBalancingPoolManifest; + case MixMetricsSelector _: return MixMetricsSelectorManifest; case CpuMetricsSelector _: return CpuMetricsSelectorManifest; case MemoryMetricsSelector _: return HeapMetricsSelectorManifest; default: @@ -128,15 +134,15 @@ public override string Manifest(object o) } } - private byte[] AdaptiveLoadBalancingPoolToBinary(Metrics.AdaptiveLoadBalancingPool pool) + private byte[] AdaptiveLoadBalancingPoolToBinary(AdaptiveLoadBalancingPool pool) { - var proto = new AdaptiveLoadBalancingPool() + var proto = new Akka.Cluster.Metrics.Serialization.Proto.Msg.AdaptiveLoadBalancingPool() { NrOfInstances = (uint)pool.NrOfInstances, UsePoolDispatcher = pool.UsePoolDispatcher }; - if (!pool.MetricsSelector.Equals(Metrics.MixMetricsSelector.Instance)) + if (!pool.MetricsSelector.Equals(MixMetricsSelector.Instance)) proto.MetricsSelector = MetricsSelectorToProto(pool.MetricsSelector); if (pool.RouterDispatcher != Dispatchers.DefaultDispatcherId) @@ -147,7 +153,7 @@ private byte[] AdaptiveLoadBalancingPoolToBinary(Metrics.AdaptiveLoadBalancingPo private MetricsSelector MetricsSelectorToProto(IMetricsSelector selector) { - var serializer = _serialization.Value.FindSerializerFor(selector); + var serializer = Serialization.FindSerializerFor(selector); return new MetricsSelector() { @@ -157,9 +163,9 @@ private MetricsSelector MetricsSelectorToProto(IMetricsSelector selector) }; } - private byte[] MixMetricsSelectorToBinary(Metrics.MixMetricsSelector selector) + private byte[] MixMetricsSelectorToBinary(MixMetricsSelector selector) { - var proto = new MixMetricsSelector() + var proto = new Akka.Cluster.Metrics.Serialization.Proto.Msg.MixMetricsSelector { Selectors = { selector.Selectors.Select(MetricsSelectorToProto) } }; @@ -169,7 +175,7 @@ private byte[] MixMetricsSelectorToBinary(Metrics.MixMetricsSelector selector) /// /// Converts Akka.NET type into Protobuf serializable message /// - private AddressData AddressToProto(Actor.Address address) + private AddressData AddressToProto(Address address) { return new AddressData() { @@ -185,9 +191,9 @@ private AddressData AddressToProto(Actor.Address address) /// /// /// - private Akka.Actor.Address AddressFromProto(AddressData address) + private Address AddressFromProto(AddressData address) { - return new Akka.Actor.Address(address.Protocol, address.System, address.Hostname, (int)address.Port); + return new Address(address.Protocol, address.System, address.Hostname, (int)address.Port); } private int MapWithErrorMessage(IImmutableDictionary dict, T value, string unknown) @@ -200,10 +206,10 @@ private int MapWithErrorMessage(IImmutableDictionary dict, T value, s private MetricsGossipEnvelope MetricsGossipEnvelopeFromBinary(byte[] bytes) { - return MetricsGossipEnvelopeFromProto(MetricsGossipEnvelope.Parser.ParseFrom(Decompress(bytes))); + return MetricsGossipEnvelopeFromProto(Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsGossipEnvelope.Parser.ParseFrom(Decompress(bytes))); } - private MetricsGossipEnvelope MetricsGossipEnvelopeToProto(MetricsGossipEnvelope envelope) + private Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsGossipEnvelope MetricsGossipEnvelopeToProto(MetricsGossipEnvelope envelope) { var allNodeMetrics = envelope.Gossip.Nodes; var allAddresses = allNodeMetrics.Select(m => m.Address).ToImmutableArray(); @@ -213,31 +219,31 @@ private MetricsGossipEnvelope MetricsGossipEnvelopeToProto(MetricsGossipEnvelope (set, metrics) => set.Union(metrics.Metrics.Select(m => m.Name))).ToImmutableArray(); var metricNamesMapping = allMetricNames.Select((a, i) => (Index: i, Value: a)).ToImmutableDictionary(p => p.Value, p => p.Index); - int MapAddress(Actor.Address address) => MapWithErrorMessage(addressMapping, address, "address"); + int MapAddress(Address address) => MapWithErrorMessage(addressMapping, address, "address"); int MapName(string name) => MapWithErrorMessage(metricNamesMapping, name, "metric name"); - Option EwmaToProto(Option ewma) - => ewma.Select(e => new NodeMetrics.Types.EWMA(e.Value, e.Alpha)); + Option EwmaToProto(Option ewma) + => ewma.Select(e => new Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.EWMA{Value = e.Value, Alpha = e.Alpha}); - NodeMetrics.Types.Number NumberToProto(AnyNumber number) + Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Number NumberToProto(AnyNumber number) { - var proto = new NodeMetrics.Types.Number(); + var proto = new Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Number(); switch (number.Type) { case AnyNumber.NumberType.Int: - proto.Type = NodeMetrics.Types.NumberType.Integer; + proto.Type = Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Integer; proto.Value32 = Convert.ToUInt32(number.LongValue); break; case AnyNumber.NumberType.Long: - proto.Type = NodeMetrics.Types.NumberType.Long; + proto.Type = Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Long; proto.Value64 = Convert.ToUInt64(number.LongValue); break; case AnyNumber.NumberType.Float: - proto.Type = NodeMetrics.Types.NumberType.Float; + proto.Type = Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Float; proto.Value32 = (uint)BitConverter.ToInt32(BitConverter.GetBytes((float)number.DoubleValue), 0); break; case AnyNumber.NumberType.Double: - proto.Type = NodeMetrics.Types.NumberType.Double; + proto.Type = Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Double; proto.Value64 = (ulong)BitConverter.DoubleToInt64Bits(number.DoubleValue); break; default: @@ -247,9 +253,9 @@ NodeMetrics.Types.Number NumberToProto(AnyNumber number) return proto; } - NodeMetrics.Types.Metric MetricToProto(NodeMetrics.Types.Metric m) + Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Metric MetricToProto(NodeMetrics.Types.Metric m) { - var metric = new NodeMetrics.Types.Metric() + var metric = new Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Metric { NameIndex = MapName(m.Name), Number = NumberToProto(m.Value), @@ -262,9 +268,9 @@ NodeMetrics.Types.Metric MetricToProto(NodeMetrics.Types.Metric m) return metric; } - NodeMetrics NodeMetricsToProto(NodeMetrics nodeMetrics) + Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics NodeMetricsToProto(NodeMetrics nodeMetrics) { - return new NodeMetrics() + return new Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics { AddressIndex = MapAddress(nodeMetrics.Address), Timestamp = nodeMetrics.Timestamp, @@ -274,11 +280,11 @@ NodeMetrics NodeMetricsToProto(NodeMetrics nodeMetrics) var nodeMetricsProto = allNodeMetrics.Select(NodeMetricsToProto); - return new MetricsGossipEnvelope() + return new Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsGossipEnvelope { From = AddressToProto(envelope.FromAddress), Reply = envelope.Reply, - Gossip = new MetricsGossip() + Gossip = new Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsGossip { AllAddresses = { allAddresses.Select(AddressToProto) }, AllMetricNames = { allMetricNames }, @@ -287,28 +293,28 @@ NodeMetrics NodeMetricsToProto(NodeMetrics nodeMetrics) }; } - private MetricsGossipEnvelope MetricsGossipEnvelopeFromProto(MetricsGossipEnvelope envelope) + private MetricsGossipEnvelope MetricsGossipEnvelopeFromProto(Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsGossipEnvelope envelope) { var gossip = envelope.Gossip; var addressMapping = gossip.AllAddresses.Select(AddressFromProto).ToImmutableArray(); var metricNameMapping = gossip.AllMetricNames.ToImmutableArray(); - Option EwmaFromProto(NodeMetrics.Types.EWMA ewma) + Option EwmaFromProto(Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.EWMA ewma) => new NodeMetrics.Types.EWMA(ewma.Value, ewma.Alpha); - AnyNumber NumberFromProto(NodeMetrics.Types.Number number) + AnyNumber NumberFromProto(Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Number number) { switch (number.Type) { - case NodeMetrics.Types.NumberType.Double: + case Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Double: return BitConverter.Int64BitsToDouble((long)number.Value64); - case NodeMetrics.Types.NumberType.Float: + case Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Float: return BitConverter.ToSingle(BitConverter.GetBytes((int)number.Value32), 0); - case NodeMetrics.Types.NumberType.Integer: + case Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Integer: return Convert.ToInt32(number.Value32); - case NodeMetrics.Types.NumberType.Long: + case Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Long: return Convert.ToInt64(number.Value64); - case NodeMetrics.Types.NumberType.Serialized: + case Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Serialized: // TODO: Should we somehow port this? /*val in = new ClassLoaderObjectInputStream( system.dynamicAccess.classLoader, @@ -316,13 +322,13 @@ AnyNumber NumberFromProto(NodeMetrics.Types.Number number) val obj = in.readObject in.close() obj.asInstanceOf[jl.Number]*/ - throw new NotImplementedException($"{NodeMetrics.Types.NumberType.Serialized} number type is not supported"); + throw new NotImplementedException($"{Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Serialized} number type is not supported"); default: throw new ArgumentOutOfRangeException(nameof(number)); } } - NodeMetrics.Types.Metric MetricFromProto(NodeMetrics.Types.Metric metric) + NodeMetrics.Types.Metric MetricFromProto(Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Metric metric) { return new NodeMetrics.Types.Metric( metricNameMapping[metric.NameIndex], @@ -330,7 +336,7 @@ NodeMetrics.Types.Metric MetricFromProto(NodeMetrics.Types.Metric metric) metric.Ewma != null ? EwmaFromProto(metric.Ewma) : Option.None); } - NodeMetrics NodeMetricsFromProto(NodeMetrics metrics) + NodeMetrics NodeMetricsFromProto(Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics metrics) { return new NodeMetrics( addressMapping[metrics.AddressIndex], @@ -343,22 +349,22 @@ NodeMetrics NodeMetricsFromProto(NodeMetrics metrics) return new MetricsGossipEnvelope(AddressFromProto(envelope.From), new MetricsGossip(nodeMetrics), envelope.Reply); } - private Metrics.AdaptiveLoadBalancingPool AdaptiveLoadBalancingPoolFromBinary(byte[] bytes) + private AdaptiveLoadBalancingPool AdaptiveLoadBalancingPoolFromBinary(byte[] bytes) { - var proto = AdaptiveLoadBalancingPool.Parser.ParseFrom(bytes); + var proto = Akka.Cluster.Metrics.Serialization.Proto.Msg.AdaptiveLoadBalancingPool.Parser.ParseFrom(bytes); IMetricsSelector selector; if (proto.MetricsSelector != null) { var s = proto.MetricsSelector; - selector = _serialization.Value.Deserialize(s.Data.ToByteArray(), (int)s.SerializerId, s.Manifest) as IMetricsSelector; + selector = Serialization.Deserialize(s.Data.ToByteArray(), (int)s.SerializerId, s.Manifest) as IMetricsSelector; } else { - selector = Metrics.MixMetricsSelector.Instance; + selector = MixMetricsSelector.Instance; } - return new Metrics.AdaptiveLoadBalancingPool( + return new AdaptiveLoadBalancingPool( metricsSelector: selector, nrOfInstances: (int)proto.NrOfInstances, supervisorStrategy: null, @@ -366,19 +372,19 @@ private Metrics.AdaptiveLoadBalancingPool AdaptiveLoadBalancingPoolFromBinary(by usePoolDispatcher: proto.UsePoolDispatcher); } - private Metrics.MixMetricsSelector MixMetricSelectorFromBinary(byte[] bytes) + private MixMetricsSelector MixMetricSelectorFromBinary(byte[] bytes) { - var proto = MixMetricsSelector.Parser.ParseFrom(bytes); - return new Metrics.MixMetricsSelector(proto.Selectors.Select(s => + var proto = Akka.Cluster.Metrics.Serialization.Proto.Msg.MixMetricsSelector.Parser.ParseFrom(bytes); + return new MixMetricsSelector(proto.Selectors.Select(s => { // should be safe because we serialized only the right subtypes of MetricsSelector - return MetricSelectorFromProto(s) as CapacityMetricsSelector; + return (CapacityMetricsSelector) MetricSelectorFromProto(s); }).ToImmutableArray()); } - private IMetricsSelector MetricSelectorFromProto(Serialization.MetricsSelector selector) + private IMetricsSelector MetricSelectorFromProto(MetricsSelector selector) { - return _serialization.Value.Deserialize(selector.Data.ToByteArray(), (int)selector.SerializerId, selector.Manifest) as IMetricsSelector; + return Serialization.Deserialize(selector.Data.ToByteArray(), (int)selector.SerializerId, selector.Manifest) as IMetricsSelector; } } diff --git a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/EWMA.cs b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/EWMA.cs index b6daa8ed8d6..8c8e3f6d7a9 100644 --- a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/EWMA.cs +++ b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/EWMA.cs @@ -31,8 +31,11 @@ public static partial class Types /// the sampled value resulting from the previous smoothing iteration. /// This value is always used as the previous EWMA to calculate the new EWMA. /// - public sealed partial class EWMA + public sealed class EWMA : IEquatable { + public double Value { get; } + public double Alpha { get; } + /// /// Creates new instance of /// @@ -47,10 +50,10 @@ public sealed partial class EWMA public EWMA(double value, double alpha) { if (alpha < 0 || alpha > 1) - throw new ArgumentException(nameof(alpha), "alpha must be between 0.0 and 1.0"); + throw new ArgumentException("alpha must be between 0.0 and 1.0", nameof(alpha)); - value_ = value; - alpha_ = alpha; + Value = value; + Alpha = alpha; } /// @@ -83,11 +86,31 @@ public static double GetAlpha(TimeSpan halfLife, TimeSpan collectInterval) var halfLifeMillis = halfLife.TotalMilliseconds; if (halfLifeMillis <= 0) - throw new ArgumentException(nameof(halfLife), "halfLife must be > 0 s"); + throw new ArgumentException("halfLife must be > 0 s", nameof(halfLife)); var decayRate = logOf2 / halfLifeMillis; return 1 - Math.Exp(-decayRate * collectInterval.TotalMilliseconds); } + + public bool Equals(EWMA other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + return Value.Equals(other.Value) && Alpha.Equals(other.Alpha); + } + + public override bool Equals(object obj) + { + return obj is EWMA other && Equals(other); + } + + public override int GetHashCode() + { + unchecked + { + return (Value.GetHashCode() * 397) ^ Alpha.GetHashCode(); + } + } } } } diff --git a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/Metric.cs b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/Metric.cs index 2ffee4a17d4..b56934ac515 100644 --- a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/Metric.cs +++ b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/Metric.cs @@ -23,7 +23,7 @@ public static partial class Types /// /// Equality of Metric is based on its name index. /// - public sealed partial class Metric + public sealed class Metric: IEquatable { /// /// Metric average value @@ -79,7 +79,6 @@ public Metric(string name, AnyNumber value, Option average) Name = name; Value = value; Average = average; - ewma_ = average.HasValue ? average.Value : default(EWMA); } /// @@ -163,21 +162,15 @@ public static Either ConvertNumber(AnyNumber number) } } - /* - * Two methods below, Equals and GetHashCode, should be used instead of generated in ClusterMetrics.Messages.g.cs - * file. Since we do not have an option to not generate those methods for this particular class, - * just stip them from generated code and paste here, with adding Address property check - */ + public override bool Equals(object obj) + => obj is Metric other && Equals(other); - - public bool Equals(Metric other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; - return Name == other.Name; + return Name.Equals(other.Name); } - public override int GetHashCode() { diff --git a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/MetricsGossip.cs b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/MetricsGossip.cs index 85a30cd634c..ff5d48f8893 100644 --- a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/MetricsGossip.cs +++ b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/MetricsGossip.cs @@ -21,9 +21,9 @@ namespace Akka.Cluster.Metrics.Serialization /// Metrics gossip message /// [InternalApi] - public sealed partial class MetricsGossip + public sealed class MetricsGossip { - public IImmutableSet Nodes { get; private set; } = ImmutableHashSet.Empty; + public IImmutableSet Nodes { get; } /// /// Empty metrics gossip diff --git a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/NodeMetrics.cs b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/NodeMetrics.cs index 43d40df77f5..17f22e71346 100644 --- a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/NodeMetrics.cs +++ b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/NodeMetrics.cs @@ -10,7 +10,6 @@ using System.Collections.Immutable; using System.Linq; using Akka.Util; -using Google.Protobuf.Collections; namespace Akka.Cluster.Metrics.Serialization { @@ -20,9 +19,11 @@ namespace Akka.Cluster.Metrics.Serialization /// /// Equality of NodeMetrics is based on its address. /// - public sealed partial class NodeMetrics + public sealed partial class NodeMetrics : IEquatable { - public Actor.Address Address { get; private set; } + public Actor.Address Address { get; } + public ImmutableList Metrics { get; } + public long Timestamp { get; } /// /// Creates new instance of @@ -33,9 +34,8 @@ public sealed partial class NodeMetrics public NodeMetrics(Actor.Address address, long timestamp, IEnumerable metrics) { Address = address; - timestamp_ = timestamp; - metrics_ = new RepeatedField(); - metrics_.AddRange(metrics); + Timestamp = timestamp; + Metrics = metrics.ToImmutableList(); } /// @@ -93,19 +93,19 @@ public NodeMetrics Update(NodeMetrics that) * just stip them from generated code and paste here, with adding Address property check */ - + public override bool Equals(object obj) + => obj is NodeMetrics other && Equals(other); public bool Equals(NodeMetrics other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; - return Equals(Address, other.Address); + return Address.Equals(other.Address); } - public override int GetHashCode() { - return (Address != null ? Address.GetHashCode() : 0); + return Address.GetHashCode(); } } } diff --git a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/ClusterMetricsMessages.g.cs b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/Proto/ClusterMetricsMessages.g.cs similarity index 59% rename from src/contrib/cluster/Akka.Cluster.Metrics/Serialization/ClusterMetricsMessages.g.cs rename to src/contrib/cluster/Akka.Cluster.Metrics/Serialization/Proto/ClusterMetricsMessages.g.cs index 01368becd2a..7f74de62007 100644 --- a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/ClusterMetricsMessages.g.cs +++ b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/Proto/ClusterMetricsMessages.g.cs @@ -1,25 +1,18 @@ -//----------------------------------------------------------------------- -// -// Copyright (C) 2009-2021 Lightbend Inc. -// Copyright (C) 2013-2021 .NET Foundation -// -//----------------------------------------------------------------------- - // // Generated by the protocol buffer compiler. DO NOT EDIT! // source: ClusterMetricsMessages.proto // -#pragma warning disable 1591, 0612, 3021 +#pragma warning disable 1591, 0612, 3021, 8981 #region Designer generated code using pb = global::Google.Protobuf; using pbc = global::Google.Protobuf.Collections; using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; -namespace Akka.Cluster.Metrics.Serialization { +namespace Akka.Cluster.Metrics.Serialization.Proto.Msg { /// Holder for reflection information generated from ClusterMetricsMessages.proto - public static partial class ClusterMetricsMessagesReflection { + internal static partial class ClusterMetricsMessagesReflection { #region Descriptor /// File descriptor for ClusterMetricsMessages.proto @@ -31,42 +24,50 @@ public static partial class ClusterMetricsMessagesReflection { static ClusterMetricsMessagesReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChxDbHVzdGVyTWV0cmljc01lc3NhZ2VzLnByb3RvImIKFU1ldHJpY3NHb3Nz", - "aXBFbnZlbG9wZRIaCgRmcm9tGAEgASgLMgwuQWRkcmVzc0RhdGESHgoGZ29z", - "c2lwGAIgASgLMg4uTWV0cmljc0dvc3NpcBINCgVyZXBseRgDIAEoCCJuCg1N", - "ZXRyaWNzR29zc2lwEiIKDGFsbEFkZHJlc3NlcxgBIAMoCzIMLkFkZHJlc3NE", - "YXRhEhYKDmFsbE1ldHJpY05hbWVzGAIgAygJEiEKC25vZGVNZXRyaWNzGAMg", - "AygLMgwuTm9kZU1ldHJpY3MimAMKC05vZGVNZXRyaWNzEhQKDGFkZHJlc3NJ", - "bmRleBgBIAEoBRIRCgl0aW1lc3RhbXAYAiABKAMSJAoHbWV0cmljcxgDIAMo", - "CzITLk5vZGVNZXRyaWNzLk1ldHJpYxplCgZOdW1iZXISJQoEdHlwZRgBIAEo", - "DjIXLk5vZGVNZXRyaWNzLk51bWJlclR5cGUSDwoHdmFsdWUzMhgCIAEoDRIP", - "Cgd2YWx1ZTY0GAMgASgEEhIKCnNlcmlhbGl6ZWQYBCABKAwaJAoERVdNQRIN", - "CgV2YWx1ZRgBIAEoARINCgVhbHBoYRgCIAEoARphCgZNZXRyaWMSEQoJbmFt", - "ZUluZGV4GAEgASgFEiMKBm51bWJlchgCIAEoCzITLk5vZGVNZXRyaWNzLk51", - "bWJlchIfCgRld21hGAMgASgLMhEuTm9kZU1ldHJpY3MuRVdNQSJKCgpOdW1i", - "ZXJUeXBlEg4KClNlcmlhbGl6ZWQQABIKCgZEb3VibGUQARIJCgVGbG9hdBAC", - "EgsKB0ludGVnZXIQAxIICgRMb25nEAQiTwoLQWRkcmVzc0RhdGESDgoGc3lz", - "dGVtGAEgASgJEhAKCGhvc3RuYW1lGAIgASgJEgwKBHBvcnQYAyABKA0SEAoI", - "cHJvdG9jb2wYBCABKAkikgEKGUFkYXB0aXZlTG9hZEJhbGFuY2luZ1Bvb2wS", - "KQoPbWV0cmljc1NlbGVjdG9yGAEgASgLMhAuTWV0cmljc1NlbGVjdG9yEhUK", - "DW5yT2ZJbnN0YW5jZXMYAiABKA0SGAoQcm91dGVyRGlzcGF0Y2hlchgDIAEo", - "CRIZChF1c2VQb29sRGlzcGF0Y2hlchgEIAEoCCJHCg9NZXRyaWNzU2VsZWN0", - "b3ISFAoMc2VyaWFsaXplcklkGAEgASgNEhAKCG1hbmlmZXN0GAIgASgJEgwK", - "BGRhdGEYAyABKAwiOQoSTWl4TWV0cmljc1NlbGVjdG9yEiMKCXNlbGVjdG9y", - "cxgBIAMoCzIQLk1ldHJpY3NTZWxlY3RvckInSAGqAiJBa2thLkNsdXN0ZXIu", - "TWV0cmljcy5TZXJpYWxpemF0aW9uYgZwcm90bzM=")); + "ChxDbHVzdGVyTWV0cmljc01lc3NhZ2VzLnByb3RvEixBa2thLkNsdXN0ZXIu", + "TWV0cmljcy5TZXJpYWxpemF0aW9uLlByb3RvLk1zZxoWQ29udGFpbmVyRm9y", + "bWF0cy5wcm90byKzAQoVTWV0cmljc0dvc3NpcEVudmVsb3BlEj4KBGZyb20Y", + "ASABKAsyMC5Ba2thLlJlbW90ZS5TZXJpYWxpemF0aW9uLlByb3RvLk1zZy5B", + "ZGRyZXNzRGF0YRJLCgZnb3NzaXAYAiABKAsyOy5Ba2thLkNsdXN0ZXIuTWV0", + "cmljcy5TZXJpYWxpemF0aW9uLlByb3RvLk1zZy5NZXRyaWNzR29zc2lwEg0K", + "BXJlcGx5GAMgASgIIr8BCg1NZXRyaWNzR29zc2lwEkYKDGFsbEFkZHJlc3Nl", + "cxgBIAMoCzIwLkFra2EuUmVtb3RlLlNlcmlhbGl6YXRpb24uUHJvdG8uTXNn", + "LkFkZHJlc3NEYXRhEhYKDmFsbE1ldHJpY05hbWVzGAIgAygJEk4KC25vZGVN", + "ZXRyaWNzGAMgAygLMjkuQWtrYS5DbHVzdGVyLk1ldHJpY3MuU2VyaWFsaXph", + "dGlvbi5Qcm90by5Nc2cuTm9kZU1ldHJpY3MizgQKC05vZGVNZXRyaWNzEhQK", + "DGFkZHJlc3NJbmRleBgBIAEoBRIRCgl0aW1lc3RhbXAYAiABKAMSUQoHbWV0", + "cmljcxgDIAMoCzJALkFra2EuQ2x1c3Rlci5NZXRyaWNzLlNlcmlhbGl6YXRp", + "b24uUHJvdG8uTXNnLk5vZGVNZXRyaWNzLk1ldHJpYxqSAQoGTnVtYmVyElIK", + "BHR5cGUYASABKA4yRC5Ba2thLkNsdXN0ZXIuTWV0cmljcy5TZXJpYWxpemF0", + "aW9uLlByb3RvLk1zZy5Ob2RlTWV0cmljcy5OdW1iZXJUeXBlEg8KB3ZhbHVl", + "MzIYAiABKA0SDwoHdmFsdWU2NBgDIAEoBBISCgpzZXJpYWxpemVkGAQgASgM", + "GiQKBEVXTUESDQoFdmFsdWUYASABKAESDQoFYWxwaGEYAiABKAEauwEKBk1l", + "dHJpYxIRCgluYW1lSW5kZXgYASABKAUSUAoGbnVtYmVyGAIgASgLMkAuQWtr", + "YS5DbHVzdGVyLk1ldHJpY3MuU2VyaWFsaXphdGlvbi5Qcm90by5Nc2cuTm9k", + "ZU1ldHJpY3MuTnVtYmVyEkwKBGV3bWEYAyABKAsyPi5Ba2thLkNsdXN0ZXIu", + "TWV0cmljcy5TZXJpYWxpemF0aW9uLlByb3RvLk1zZy5Ob2RlTWV0cmljcy5F", + "V01BIkoKCk51bWJlclR5cGUSDgoKU2VyaWFsaXplZBAAEgoKBkRvdWJsZRAB", + "EgkKBUZsb2F0EAISCwoHSW50ZWdlchADEggKBExvbmcQBCK/AQoZQWRhcHRp", + "dmVMb2FkQmFsYW5jaW5nUG9vbBJWCg9tZXRyaWNzU2VsZWN0b3IYASABKAsy", + "PS5Ba2thLkNsdXN0ZXIuTWV0cmljcy5TZXJpYWxpemF0aW9uLlByb3RvLk1z", + "Zy5NZXRyaWNzU2VsZWN0b3ISFQoNbnJPZkluc3RhbmNlcxgCIAEoDRIYChBy", + "b3V0ZXJEaXNwYXRjaGVyGAMgASgJEhkKEXVzZVBvb2xEaXNwYXRjaGVyGAQg", + "ASgIIkcKD01ldHJpY3NTZWxlY3RvchIUCgxzZXJpYWxpemVySWQYASABKA0S", + "EAoIbWFuaWZlc3QYAiABKAkSDAoEZGF0YRgDIAEoDCJmChJNaXhNZXRyaWNz", + "U2VsZWN0b3ISUAoJc2VsZWN0b3JzGAEgAygLMj0uQWtrYS5DbHVzdGVyLk1l", + "dHJpY3MuU2VyaWFsaXphdGlvbi5Qcm90by5Nc2cuTWV0cmljc1NlbGVjdG9y", + "QgJIAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { }, + new pbr::FileDescriptor[] { global::Akka.Remote.Serialization.Proto.Msg.ContainerFormatsReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.MetricsGossipEnvelope), global::Akka.Cluster.Metrics.Serialization.MetricsGossipEnvelope.Parser, new[]{ "From", "Gossip", "Reply" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.MetricsGossip), global::Akka.Cluster.Metrics.Serialization.MetricsGossip.Parser, new[]{ "AllAddresses", "AllMetricNames", "NodeMetrics" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.NodeMetrics), global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Parser, new[]{ "AddressIndex", "Timestamp", "Metrics" }, null, new[]{ typeof(global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.NumberType) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Number), global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Number.Parser, new[]{ "Type", "Value32", "Value64", "Serialized" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.EWMA), global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.EWMA.Parser, new[]{ "Value", "Alpha" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Metric), global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Metric.Parser, new[]{ "NameIndex", "Number", "Ewma" }, null, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.AddressData), global::Akka.Cluster.Metrics.Serialization.AddressData.Parser, new[]{ "System", "Hostname", "Port", "Protocol" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.AdaptiveLoadBalancingPool), global::Akka.Cluster.Metrics.Serialization.AdaptiveLoadBalancingPool.Parser, new[]{ "MetricsSelector", "NrOfInstances", "RouterDispatcher", "UsePoolDispatcher" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.MetricsSelector), global::Akka.Cluster.Metrics.Serialization.MetricsSelector.Parser, new[]{ "SerializerId", "Manifest", "Data" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.MixMetricsSelector), global::Akka.Cluster.Metrics.Serialization.MixMetricsSelector.Parser, new[]{ "Selectors" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsGossipEnvelope), global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsGossipEnvelope.Parser, new[]{ "From", "Gossip", "Reply" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsGossip), global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsGossip.Parser, new[]{ "AllAddresses", "AllMetricNames", "NodeMetrics" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics), global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Parser, new[]{ "AddressIndex", "Timestamp", "Metrics" }, null, new[]{ typeof(global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Number), global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Number.Parser, new[]{ "Type", "Value32", "Value64", "Serialized" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.EWMA), global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.EWMA.Parser, new[]{ "Value", "Alpha" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Metric), global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Metric.Parser, new[]{ "NameIndex", "Number", "Ewma" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.Proto.Msg.AdaptiveLoadBalancingPool), global::Akka.Cluster.Metrics.Serialization.Proto.Msg.AdaptiveLoadBalancingPool.Parser, new[]{ "MetricsSelector", "NrOfInstances", "RouterDispatcher", "UsePoolDispatcher" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsSelector), global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsSelector.Parser, new[]{ "SerializerId", "Manifest", "Data" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MixMetricsSelector), global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MixMetricsSelector.Parser, new[]{ "Selectors" }, null, null, null, null) })); } #endregion @@ -77,23 +78,31 @@ static ClusterMetricsMessagesReflection() { ///* /// Metrics Gossip Envelope /// - public sealed partial class MetricsGossipEnvelope : pb::IMessage { + internal sealed partial class MetricsGossipEnvelope : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MetricsGossipEnvelope()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Akka.Cluster.Metrics.Serialization.ClusterMetricsMessagesReflection.Descriptor.MessageTypes[0]; } + get { return global::Akka.Cluster.Metrics.Serialization.Proto.Msg.ClusterMetricsMessagesReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MetricsGossipEnvelope() { OnConstruction(); } @@ -101,6 +110,7 @@ public MetricsGossipEnvelope() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MetricsGossipEnvelope(MetricsGossipEnvelope other) : this() { from_ = other.from_ != null ? other.from_.Clone() : null; gossip_ = other.gossip_ != null ? other.gossip_.Clone() : null; @@ -109,15 +119,17 @@ public MetricsGossipEnvelope(MetricsGossipEnvelope other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MetricsGossipEnvelope Clone() { return new MetricsGossipEnvelope(this); } /// Field number for the "from" field. public const int FromFieldNumber = 1; - private global::Akka.Cluster.Metrics.Serialization.AddressData from_; + private global::Akka.Remote.Serialization.Proto.Msg.AddressData from_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Akka.Cluster.Metrics.Serialization.AddressData From { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Akka.Remote.Serialization.Proto.Msg.AddressData From { get { return from_; } set { from_ = value; @@ -126,9 +138,10 @@ public MetricsGossipEnvelope Clone() { /// Field number for the "gossip" field. public const int GossipFieldNumber = 2; - private global::Akka.Cluster.Metrics.Serialization.MetricsGossip gossip_; + private global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsGossip gossip_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Akka.Cluster.Metrics.Serialization.MetricsGossip Gossip { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsGossip Gossip { get { return gossip_; } set { gossip_ = value; @@ -139,6 +152,7 @@ public MetricsGossipEnvelope Clone() { public const int ReplyFieldNumber = 3; private bool reply_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Reply { get { return reply_; } set { @@ -147,11 +161,13 @@ public bool Reply { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as MetricsGossipEnvelope); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(MetricsGossipEnvelope other) { if (ReferenceEquals(other, null)) { return false; @@ -166,6 +182,7 @@ public bool Equals(MetricsGossipEnvelope other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (from_ != null) hash ^= From.GetHashCode(); @@ -178,12 +195,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (from_ != null) { output.WriteRawTag(10); output.WriteMessage(From); @@ -199,9 +221,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (from_ != null) { + output.WriteRawTag(10); + output.WriteMessage(From); + } + if (gossip_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Gossip); + } + if (Reply != false) { + output.WriteRawTag(24); + output.WriteBool(Reply); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (from_ != null) { @@ -220,19 +266,20 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(MetricsGossipEnvelope other) { if (other == null) { return; } if (other.from_ != null) { if (from_ == null) { - From = new global::Akka.Cluster.Metrics.Serialization.AddressData(); + From = new global::Akka.Remote.Serialization.Proto.Msg.AddressData(); } From.MergeFrom(other.From); } if (other.gossip_ != null) { if (gossip_ == null) { - Gossip = new global::Akka.Cluster.Metrics.Serialization.MetricsGossip(); + Gossip = new global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsGossip(); } Gossip.MergeFrom(other.Gossip); } @@ -243,7 +290,11 @@ public void MergeFrom(MetricsGossipEnvelope other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { @@ -252,14 +303,47 @@ public void MergeFrom(pb::CodedInputStream input) { break; case 10: { if (from_ == null) { - From = new global::Akka.Cluster.Metrics.Serialization.AddressData(); + From = new global::Akka.Remote.Serialization.Proto.Msg.AddressData(); + } + input.ReadMessage(From); + break; + } + case 18: { + if (gossip_ == null) { + Gossip = new global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsGossip(); + } + input.ReadMessage(Gossip); + break; + } + case 24: { + Reply = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (from_ == null) { + From = new global::Akka.Remote.Serialization.Proto.Msg.AddressData(); } input.ReadMessage(From); break; } case 18: { if (gossip_ == null) { - Gossip = new global::Akka.Cluster.Metrics.Serialization.MetricsGossip(); + Gossip = new global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsGossip(); } input.ReadMessage(Gossip); break; @@ -271,6 +355,7 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } @@ -278,23 +363,31 @@ public void MergeFrom(pb::CodedInputStream input) { ///* /// Metrics Gossip /// - public sealed partial class MetricsGossip : pb::IMessage { + internal sealed partial class MetricsGossip : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MetricsGossip()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Akka.Cluster.Metrics.Serialization.ClusterMetricsMessagesReflection.Descriptor.MessageTypes[1]; } + get { return global::Akka.Cluster.Metrics.Serialization.Proto.Msg.ClusterMetricsMessagesReflection.Descriptor.MessageTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MetricsGossip() { OnConstruction(); } @@ -302,6 +395,7 @@ public MetricsGossip() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MetricsGossip(MetricsGossip other) : this() { allAddresses_ = other.allAddresses_.Clone(); allMetricNames_ = other.allMetricNames_.Clone(); @@ -310,17 +404,19 @@ public MetricsGossip(MetricsGossip other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MetricsGossip Clone() { return new MetricsGossip(this); } /// Field number for the "allAddresses" field. public const int AllAddressesFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_allAddresses_codec - = pb::FieldCodec.ForMessage(10, global::Akka.Cluster.Metrics.Serialization.AddressData.Parser); - private readonly pbc::RepeatedField allAddresses_ = new pbc::RepeatedField(); + private static readonly pb::FieldCodec _repeated_allAddresses_codec + = pb::FieldCodec.ForMessage(10, global::Akka.Remote.Serialization.Proto.Msg.AddressData.Parser); + private readonly pbc::RepeatedField allAddresses_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField AllAddresses { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AllAddresses { get { return allAddresses_; } } @@ -330,26 +426,30 @@ public MetricsGossip Clone() { = pb::FieldCodec.ForString(18); private readonly pbc::RepeatedField allMetricNames_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField AllMetricNames { get { return allMetricNames_; } } /// Field number for the "nodeMetrics" field. public const int NodeMetricsFieldNumber = 3; - private static readonly pb::FieldCodec _repeated_nodeMetrics_codec - = pb::FieldCodec.ForMessage(26, global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Parser); - private readonly pbc::RepeatedField nodeMetrics_ = new pbc::RepeatedField(); + private static readonly pb::FieldCodec _repeated_nodeMetrics_codec + = pb::FieldCodec.ForMessage(26, global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Parser); + private readonly pbc::RepeatedField nodeMetrics_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField NodeMetrics { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField NodeMetrics { get { return nodeMetrics_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as MetricsGossip); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(MetricsGossip other) { if (ReferenceEquals(other, null)) { return false; @@ -364,6 +464,7 @@ public bool Equals(MetricsGossip other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= allAddresses_.GetHashCode(); @@ -376,21 +477,41 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else allAddresses_.WriteTo(output, _repeated_allAddresses_codec); allMetricNames_.WriteTo(output, _repeated_allMetricNames_codec); nodeMetrics_.WriteTo(output, _repeated_nodeMetrics_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + allAddresses_.WriteTo(ref output, _repeated_allAddresses_codec); + allMetricNames_.WriteTo(ref output, _repeated_allMetricNames_codec); + nodeMetrics_.WriteTo(ref output, _repeated_nodeMetrics_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += allAddresses_.CalculateSize(_repeated_allAddresses_codec); @@ -403,6 +524,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(MetricsGossip other) { if (other == null) { return; @@ -414,7 +536,11 @@ public void MergeFrom(MetricsGossip other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { @@ -435,7 +561,35 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + allAddresses_.AddEntriesFrom(ref input, _repeated_allAddresses_codec); + break; + } + case 18: { + allMetricNames_.AddEntriesFrom(ref input, _repeated_allMetricNames_codec); + break; + } + case 26: { + nodeMetrics_.AddEntriesFrom(ref input, _repeated_nodeMetrics_codec); + break; + } + } + } } + #endif } @@ -443,23 +597,31 @@ public void MergeFrom(pb::CodedInputStream input) { ///* /// Node Metrics /// - public sealed partial class NodeMetrics : pb::IMessage { + internal sealed partial class NodeMetrics : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NodeMetrics()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Akka.Cluster.Metrics.Serialization.ClusterMetricsMessagesReflection.Descriptor.MessageTypes[2]; } + get { return global::Akka.Cluster.Metrics.Serialization.Proto.Msg.ClusterMetricsMessagesReflection.Descriptor.MessageTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public NodeMetrics() { OnConstruction(); } @@ -467,6 +629,7 @@ public NodeMetrics() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public NodeMetrics(NodeMetrics other) : this() { addressIndex_ = other.addressIndex_; timestamp_ = other.timestamp_; @@ -475,6 +638,7 @@ public NodeMetrics(NodeMetrics other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public NodeMetrics Clone() { return new NodeMetrics(this); } @@ -483,6 +647,7 @@ public NodeMetrics Clone() { public const int AddressIndexFieldNumber = 1; private int addressIndex_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int AddressIndex { get { return addressIndex_; } set { @@ -494,6 +659,7 @@ public int AddressIndex { public const int TimestampFieldNumber = 2; private long timestamp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long Timestamp { get { return timestamp_; } set { @@ -503,21 +669,61 @@ public long Timestamp { /// Field number for the "metrics" field. public const int MetricsFieldNumber = 3; - private static readonly pb::FieldCodec _repeated_metrics_codec - = pb::FieldCodec.ForMessage(26, global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Metric.Parser); - private readonly pbc::RepeatedField metrics_ = new pbc::RepeatedField(); + private static readonly pb::FieldCodec _repeated_metrics_codec + = pb::FieldCodec.ForMessage(26, global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Metric.Parser); + private readonly pbc::RepeatedField metrics_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Metrics { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Metrics { get { return metrics_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as NodeMetrics); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(NodeMetrics other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AddressIndex != other.AddressIndex) return false; + if (Timestamp != other.Timestamp) return false; + if(!metrics_.Equals(other.metrics_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (AddressIndex != 0) hash ^= AddressIndex.GetHashCode(); + if (Timestamp != 0L) hash ^= Timestamp.GetHashCode(); + hash ^= metrics_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (AddressIndex != 0) { output.WriteRawTag(8); output.WriteInt32(AddressIndex); @@ -530,9 +736,30 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AddressIndex != 0) { + output.WriteRawTag(8); + output.WriteInt32(AddressIndex); + } + if (Timestamp != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Timestamp); + } + metrics_.WriteTo(ref output, _repeated_metrics_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (AddressIndex != 0) { @@ -549,6 +776,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(NodeMetrics other) { if (other == null) { return; @@ -564,7 +792,11 @@ public void MergeFrom(NodeMetrics other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { @@ -585,13 +817,42 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + AddressIndex = input.ReadInt32(); + break; + } + case 16: { + Timestamp = input.ReadInt64(); + break; + } + case 26: { + metrics_.AddEntriesFrom(ref input, _repeated_metrics_codec); + break; + } + } + } } + #endif #region Nested types /// Container for nested types declared in the NodeMetrics message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static partial class Types { - public enum NumberType { + internal enum NumberType { [pbr::OriginalName("Serialized")] Serialized = 0, [pbr::OriginalName("Double")] Double = 1, [pbr::OriginalName("Float")] Float = 2, @@ -599,23 +860,31 @@ public enum NumberType { [pbr::OriginalName("Long")] Long = 4, } - public sealed partial class Number : pb::IMessage { + internal sealed partial class Number : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Number()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Descriptor.NestedTypes[0]; } + get { return global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Descriptor.NestedTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Number() { OnConstruction(); } @@ -623,6 +892,7 @@ public Number() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Number(Number other) : this() { type_ = other.type_; value32_ = other.value32_; @@ -632,15 +902,17 @@ public Number(Number other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Number Clone() { return new Number(this); } /// Field number for the "type" field. public const int TypeFieldNumber = 1; - private global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.NumberType type_ = global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.NumberType.Serialized; + private global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType type_ = global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Serialized; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.NumberType Type { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType Type { get { return type_; } set { type_ = value; @@ -651,6 +923,7 @@ public Number Clone() { public const int Value32FieldNumber = 2; private uint value32_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public uint Value32 { get { return value32_; } set { @@ -662,6 +935,7 @@ public uint Value32 { public const int Value64FieldNumber = 3; private ulong value64_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ulong Value64 { get { return value64_; } set { @@ -673,6 +947,7 @@ public ulong Value64 { public const int SerializedFieldNumber = 4; private pb::ByteString serialized_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString Serialized { get { return serialized_; } set { @@ -681,11 +956,13 @@ public ulong Value64 { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as Number); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(Number other) { if (ReferenceEquals(other, null)) { return false; @@ -701,9 +978,10 @@ public bool Equals(Number other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Type != global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.NumberType.Serialized) hash ^= Type.GetHashCode(); + if (Type != global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Serialized) hash ^= Type.GetHashCode(); if (Value32 != 0) hash ^= Value32.GetHashCode(); if (Value64 != 0UL) hash ^= Value64.GetHashCode(); if (Serialized.Length != 0) hash ^= Serialized.GetHashCode(); @@ -714,13 +992,18 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Type != global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.NumberType.Serialized) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Type != global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Serialized) { output.WriteRawTag(8); output.WriteEnum((int) Type); } @@ -739,12 +1022,40 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Type != global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Serialized) { + output.WriteRawTag(8); + output.WriteEnum((int) Type); + } + if (Value32 != 0) { + output.WriteRawTag(16); + output.WriteUInt32(Value32); + } + if (Value64 != 0UL) { + output.WriteRawTag(24); + output.WriteUInt64(Value64); + } + if (Serialized.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Serialized); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Type != global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.NumberType.Serialized) { + if (Type != global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Serialized) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); } if (Value32 != 0) { @@ -763,11 +1074,12 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(Number other) { if (other == null) { return; } - if (other.Type != global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.NumberType.Serialized) { + if (other.Type != global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType.Serialized) { Type = other.Type; } if (other.Value32 != 0) { @@ -783,7 +1095,11 @@ public void MergeFrom(Number other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { @@ -791,7 +1107,38 @@ public void MergeFrom(pb::CodedInputStream input) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - Type = (global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.NumberType) input.ReadEnum(); + Type = (global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType) input.ReadEnum(); + break; + } + case 16: { + Value32 = input.ReadUInt32(); + break; + } + case 24: { + Value64 = input.ReadUInt64(); + break; + } + case 34: { + Serialized = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Type = (global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.NumberType) input.ReadEnum(); break; } case 16: { @@ -809,26 +1156,35 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } - public sealed partial class EWMA : pb::IMessage { + internal sealed partial class EWMA : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EWMA()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Descriptor.NestedTypes[1]; } + get { return global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Descriptor.NestedTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EWMA() { OnConstruction(); } @@ -836,6 +1192,7 @@ public EWMA() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EWMA(EWMA other) : this() { value_ = other.value_; alpha_ = other.alpha_; @@ -843,6 +1200,7 @@ public EWMA(EWMA other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EWMA Clone() { return new EWMA(this); } @@ -851,6 +1209,7 @@ public EWMA Clone() { public const int ValueFieldNumber = 1; private double value_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public double Value { get { return value_; } set { @@ -862,6 +1221,7 @@ public double Value { public const int AlphaFieldNumber = 2; private double alpha_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public double Alpha { get { return alpha_; } set { @@ -870,11 +1230,13 @@ public double Alpha { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as EWMA); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(EWMA other) { if (ReferenceEquals(other, null)) { return false; @@ -888,6 +1250,7 @@ public bool Equals(EWMA other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Value != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Value); @@ -899,12 +1262,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Value != 0D) { output.WriteRawTag(9); output.WriteDouble(Value); @@ -916,9 +1284,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Value != 0D) { + output.WriteRawTag(9); + output.WriteDouble(Value); + } + if (Alpha != 0D) { + output.WriteRawTag(17); + output.WriteDouble(Alpha); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Value != 0D) { @@ -934,6 +1322,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(EWMA other) { if (other == null) { return; @@ -948,7 +1337,11 @@ public void MergeFrom(EWMA other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { @@ -965,27 +1358,59 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 9: { + Value = input.ReadDouble(); + break; + } + case 17: { + Alpha = input.ReadDouble(); + break; + } + } + } } + #endif } - public sealed partial class Metric : pb::IMessage { + internal sealed partial class Metric : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Metric()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Descriptor.NestedTypes[2]; } + get { return global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Descriptor.NestedTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Metric() { OnConstruction(); } @@ -993,6 +1418,7 @@ public Metric() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Metric(Metric other) : this() { nameIndex_ = other.nameIndex_; number_ = other.number_ != null ? other.number_.Clone() : null; @@ -1001,6 +1427,7 @@ public Metric(Metric other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Metric Clone() { return new Metric(this); } @@ -1009,6 +1436,7 @@ public Metric Clone() { public const int NameIndexFieldNumber = 1; private int nameIndex_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int NameIndex { get { return nameIndex_; } set { @@ -1018,9 +1446,10 @@ public int NameIndex { /// Field number for the "number" field. public const int NumberFieldNumber = 2; - private global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Number number_; + private global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Number number_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Number Number { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Number Number { get { return number_; } set { number_ = value; @@ -1029,9 +1458,10 @@ public int NameIndex { /// Field number for the "ewma" field. public const int EwmaFieldNumber = 3; - private global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.EWMA ewma_; + private global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.EWMA ewma_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.EWMA Ewma { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.EWMA Ewma { get { return ewma_; } set { ewma_ = value; @@ -1039,12 +1469,51 @@ public int NameIndex { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Metric); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Metric other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NameIndex != other.NameIndex) return false; + if (!object.Equals(Number, other.Number)) return false; + if (!object.Equals(Ewma, other.Ewma)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (NameIndex != 0) hash ^= NameIndex.GetHashCode(); + if (number_ != null) hash ^= Number.GetHashCode(); + if (ewma_ != null) hash ^= Ewma.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (NameIndex != 0) { output.WriteRawTag(8); output.WriteInt32(NameIndex); @@ -1060,9 +1529,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (NameIndex != 0) { + output.WriteRawTag(8); + output.WriteInt32(NameIndex); + } + if (number_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Number); + } + if (ewma_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Ewma); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (NameIndex != 0) { @@ -1081,6 +1574,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(Metric other) { if (other == null) { return; @@ -1090,13 +1584,13 @@ public void MergeFrom(Metric other) { } if (other.number_ != null) { if (number_ == null) { - Number = new global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Number(); + Number = new global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Number(); } Number.MergeFrom(other.Number); } if (other.ewma_ != null) { if (ewma_ == null) { - Ewma = new global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.EWMA(); + Ewma = new global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.EWMA(); } Ewma.MergeFrom(other.Ewma); } @@ -1104,7 +1598,11 @@ public void MergeFrom(Metric other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { @@ -1117,263 +1615,88 @@ public void MergeFrom(pb::CodedInputStream input) { } case 18: { if (number_ == null) { - Number = new global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Number(); + Number = new global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Number(); } input.ReadMessage(Number); break; } case 26: { if (ewma_ == null) { - Ewma = new global::Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.EWMA(); + Ewma = new global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.EWMA(); } input.ReadMessage(Ewma); break; } } } + #endif } - } - - } - #endregion - - } - - /// - ///* - /// Defines a remote address. - /// - public sealed partial class AddressData : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AddressData()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Akka.Cluster.Metrics.Serialization.ClusterMetricsMessagesReflection.Descriptor.MessageTypes[3]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public AddressData() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public AddressData(AddressData other) : this() { - system_ = other.system_; - hostname_ = other.hostname_; - port_ = other.port_; - protocol_ = other.protocol_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public AddressData Clone() { - return new AddressData(this); - } - - /// Field number for the "system" field. - public const int SystemFieldNumber = 1; - private string system_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string System { - get { return system_; } - set { - system_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "hostname" field. - public const int HostnameFieldNumber = 2; - private string hostname_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Hostname { - get { return hostname_; } - set { - hostname_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "port" field. - public const int PortFieldNumber = 3; - private uint port_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public uint Port { - get { return port_; } - set { - port_ = value; - } - } - - /// Field number for the "protocol" field. - public const int ProtocolFieldNumber = 4; - private string protocol_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Protocol { - get { return protocol_; } - set { - protocol_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as AddressData); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(AddressData other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (System != other.System) return false; - if (Hostname != other.Hostname) return false; - if (Port != other.Port) return false; - if (Protocol != other.Protocol) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (System.Length != 0) hash ^= System.GetHashCode(); - if (Hostname.Length != 0) hash ^= Hostname.GetHashCode(); - if (Port != 0) hash ^= Port.GetHashCode(); - if (Protocol.Length != 0) hash ^= Protocol.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (System.Length != 0) { - output.WriteRawTag(10); - output.WriteString(System); - } - if (Hostname.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Hostname); - } - if (Port != 0) { - output.WriteRawTag(24); - output.WriteUInt32(Port); - } - if (Protocol.Length != 0) { - output.WriteRawTag(34); - output.WriteString(Protocol); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (System.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(System); - } - if (Hostname.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Hostname); - } - if (Port != 0) { - size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Port); - } - if (Protocol.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Protocol); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(AddressData other) { - if (other == null) { - return; - } - if (other.System.Length != 0) { - System = other.System; - } - if (other.Hostname.Length != 0) { - Hostname = other.Hostname; - } - if (other.Port != 0) { - Port = other.Port; - } - if (other.Protocol.Length != 0) { - Protocol = other.Protocol; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 10: { - System = input.ReadString(); - break; - } - case 18: { - Hostname = input.ReadString(); - break; - } - case 24: { - Port = input.ReadUInt32(); - break; - } - case 34: { - Protocol = input.ReadString(); - break; + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + NameIndex = input.ReadInt32(); + break; + } + case 18: { + if (number_ == null) { + Number = new global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.Number(); + } + input.ReadMessage(Number); + break; + } + case 26: { + if (ewma_ == null) { + Ewma = new global::Akka.Cluster.Metrics.Serialization.Proto.Msg.NodeMetrics.Types.EWMA(); + } + input.ReadMessage(Ewma); + break; + } + } } } + #endif + } + } + #endregion } - public sealed partial class AdaptiveLoadBalancingPool : pb::IMessage { + internal sealed partial class AdaptiveLoadBalancingPool : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AdaptiveLoadBalancingPool()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Akka.Cluster.Metrics.Serialization.ClusterMetricsMessagesReflection.Descriptor.MessageTypes[4]; } + get { return global::Akka.Cluster.Metrics.Serialization.Proto.Msg.ClusterMetricsMessagesReflection.Descriptor.MessageTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AdaptiveLoadBalancingPool() { OnConstruction(); } @@ -1381,6 +1704,7 @@ public AdaptiveLoadBalancingPool() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AdaptiveLoadBalancingPool(AdaptiveLoadBalancingPool other) : this() { metricsSelector_ = other.metricsSelector_ != null ? other.metricsSelector_.Clone() : null; nrOfInstances_ = other.nrOfInstances_; @@ -1390,18 +1714,20 @@ public AdaptiveLoadBalancingPool(AdaptiveLoadBalancingPool other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AdaptiveLoadBalancingPool Clone() { return new AdaptiveLoadBalancingPool(this); } /// Field number for the "metricsSelector" field. public const int MetricsSelectorFieldNumber = 1; - private global::Akka.Cluster.Metrics.Serialization.MetricsSelector metricsSelector_; + private global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsSelector metricsSelector_; /// /// omitted if default /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Akka.Cluster.Metrics.Serialization.MetricsSelector MetricsSelector { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsSelector MetricsSelector { get { return metricsSelector_; } set { metricsSelector_ = value; @@ -1412,6 +1738,7 @@ public AdaptiveLoadBalancingPool Clone() { public const int NrOfInstancesFieldNumber = 2; private uint nrOfInstances_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public uint NrOfInstances { get { return nrOfInstances_; } set { @@ -1426,6 +1753,7 @@ public uint NrOfInstances { /// omitted if default /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string RouterDispatcher { get { return routerDispatcher_; } set { @@ -1437,6 +1765,7 @@ public string RouterDispatcher { public const int UsePoolDispatcherFieldNumber = 4; private bool usePoolDispatcher_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool UsePoolDispatcher { get { return usePoolDispatcher_; } set { @@ -1445,11 +1774,13 @@ public bool UsePoolDispatcher { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as AdaptiveLoadBalancingPool); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(AdaptiveLoadBalancingPool other) { if (ReferenceEquals(other, null)) { return false; @@ -1465,6 +1796,7 @@ public bool Equals(AdaptiveLoadBalancingPool other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (metricsSelector_ != null) hash ^= MetricsSelector.GetHashCode(); @@ -1478,12 +1810,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (metricsSelector_ != null) { output.WriteRawTag(10); output.WriteMessage(MetricsSelector); @@ -1503,9 +1840,37 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (metricsSelector_ != null) { + output.WriteRawTag(10); + output.WriteMessage(MetricsSelector); + } + if (NrOfInstances != 0) { + output.WriteRawTag(16); + output.WriteUInt32(NrOfInstances); + } + if (RouterDispatcher.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RouterDispatcher); + } + if (UsePoolDispatcher != false) { + output.WriteRawTag(32); + output.WriteBool(UsePoolDispatcher); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (metricsSelector_ != null) { @@ -1527,13 +1892,14 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(AdaptiveLoadBalancingPool other) { if (other == null) { return; } if (other.metricsSelector_ != null) { if (metricsSelector_ == null) { - MetricsSelector = new global::Akka.Cluster.Metrics.Serialization.MetricsSelector(); + MetricsSelector = new global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsSelector(); } MetricsSelector.MergeFrom(other.MetricsSelector); } @@ -1550,7 +1916,11 @@ public void MergeFrom(AdaptiveLoadBalancingPool other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { @@ -1559,7 +1929,41 @@ public void MergeFrom(pb::CodedInputStream input) { break; case 10: { if (metricsSelector_ == null) { - MetricsSelector = new global::Akka.Cluster.Metrics.Serialization.MetricsSelector(); + MetricsSelector = new global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsSelector(); + } + input.ReadMessage(MetricsSelector); + break; + } + case 16: { + NrOfInstances = input.ReadUInt32(); + break; + } + case 26: { + RouterDispatcher = input.ReadString(); + break; + } + case 32: { + UsePoolDispatcher = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (metricsSelector_ == null) { + MetricsSelector = new global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsSelector(); } input.ReadMessage(MetricsSelector); break; @@ -1579,29 +1983,38 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } /// /// couldn't figure out how to import Payload /// - public sealed partial class MetricsSelector : pb::IMessage { + internal sealed partial class MetricsSelector : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MetricsSelector()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Akka.Cluster.Metrics.Serialization.ClusterMetricsMessagesReflection.Descriptor.MessageTypes[5]; } + get { return global::Akka.Cluster.Metrics.Serialization.Proto.Msg.ClusterMetricsMessagesReflection.Descriptor.MessageTypes[4]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MetricsSelector() { OnConstruction(); } @@ -1609,6 +2022,7 @@ public MetricsSelector() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MetricsSelector(MetricsSelector other) : this() { serializerId_ = other.serializerId_; manifest_ = other.manifest_; @@ -1617,6 +2031,7 @@ public MetricsSelector(MetricsSelector other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MetricsSelector Clone() { return new MetricsSelector(this); } @@ -1625,6 +2040,7 @@ public MetricsSelector Clone() { public const int SerializerIdFieldNumber = 1; private uint serializerId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public uint SerializerId { get { return serializerId_; } set { @@ -1636,6 +2052,7 @@ public uint SerializerId { public const int ManifestFieldNumber = 2; private string manifest_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Manifest { get { return manifest_; } set { @@ -1647,6 +2064,7 @@ public string Manifest { public const int DataFieldNumber = 3; private pb::ByteString data_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString Data { get { return data_; } set { @@ -1655,11 +2073,13 @@ public string Manifest { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as MetricsSelector); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(MetricsSelector other) { if (ReferenceEquals(other, null)) { return false; @@ -1674,6 +2094,7 @@ public bool Equals(MetricsSelector other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (SerializerId != 0) hash ^= SerializerId.GetHashCode(); @@ -1686,12 +2107,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (SerializerId != 0) { output.WriteRawTag(8); output.WriteUInt32(SerializerId); @@ -1707,9 +2133,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SerializerId != 0) { + output.WriteRawTag(8); + output.WriteUInt32(SerializerId); + } + if (Manifest.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Manifest); + } + if (Data.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(Data); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (SerializerId != 0) { @@ -1728,6 +2178,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(MetricsSelector other) { if (other == null) { return; @@ -1745,7 +2196,11 @@ public void MergeFrom(MetricsSelector other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { @@ -1766,27 +2221,63 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SerializerId = input.ReadUInt32(); + break; + } + case 18: { + Manifest = input.ReadString(); + break; + } + case 26: { + Data = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class MixMetricsSelector : pb::IMessage { + internal sealed partial class MixMetricsSelector : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MixMetricsSelector()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Akka.Cluster.Metrics.Serialization.ClusterMetricsMessagesReflection.Descriptor.MessageTypes[6]; } + get { return global::Akka.Cluster.Metrics.Serialization.Proto.Msg.ClusterMetricsMessagesReflection.Descriptor.MessageTypes[5]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MixMetricsSelector() { OnConstruction(); } @@ -1794,32 +2285,37 @@ public MixMetricsSelector() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MixMetricsSelector(MixMetricsSelector other) : this() { selectors_ = other.selectors_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MixMetricsSelector Clone() { return new MixMetricsSelector(this); } /// Field number for the "selectors" field. public const int SelectorsFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_selectors_codec - = pb::FieldCodec.ForMessage(10, global::Akka.Cluster.Metrics.Serialization.MetricsSelector.Parser); - private readonly pbc::RepeatedField selectors_ = new pbc::RepeatedField(); + private static readonly pb::FieldCodec _repeated_selectors_codec + = pb::FieldCodec.ForMessage(10, global::Akka.Cluster.Metrics.Serialization.Proto.Msg.MetricsSelector.Parser); + private readonly pbc::RepeatedField selectors_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Selectors { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Selectors { get { return selectors_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as MixMetricsSelector); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(MixMetricsSelector other) { if (ReferenceEquals(other, null)) { return false; @@ -1832,6 +2328,7 @@ public bool Equals(MixMetricsSelector other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= selectors_.GetHashCode(); @@ -1842,19 +2339,37 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else selectors_.WriteTo(output, _repeated_selectors_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + selectors_.WriteTo(ref output, _repeated_selectors_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += selectors_.CalculateSize(_repeated_selectors_codec); @@ -1865,6 +2380,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(MixMetricsSelector other) { if (other == null) { return; @@ -1874,7 +2390,11 @@ public void MergeFrom(MixMetricsSelector other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { @@ -1887,7 +2407,27 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + selectors_.AddEntriesFrom(ref input, _repeated_selectors_codec); + break; + } + } + } } + #endif } diff --git a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/Proto/generate.bat b/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/Proto/generate.bat deleted file mode 100644 index 636b5cec1e5..00000000000 --- a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/Proto/generate.bat +++ /dev/null @@ -1 +0,0 @@ -..\..\..\..\..\..\tools\Google.Protobuf.Tools\tools\windows_x64\protoc.exe --csharp_out=.. --csharp_opt=file_extension=.g.cs --proto_path=. ClusterMetricsMessages.proto \ No newline at end of file diff --git a/src/core/Akka.API.Tests/CoreAPISpec.ApproveClusterMetrics.verified.txt b/src/core/Akka.API.Tests/CoreAPISpec.ApproveClusterMetrics.verified.txt index 4fab075a254..fd6cd8dbdd0 100644 --- a/src/core/Akka.API.Tests/CoreAPISpec.ApproveClusterMetrics.verified.txt +++ b/src/core/Akka.API.Tests/CoreAPISpec.ApproveClusterMetrics.verified.txt @@ -276,54 +276,6 @@ namespace Akka.Cluster.Metrics.Helpers } namespace Akka.Cluster.Metrics.Serialization { - public sealed class AdaptiveLoadBalancingPool : Google.Protobuf.IDeepCloneable, Google.Protobuf.IMessage, Google.Protobuf.IMessage, System.IEquatable - { - public const int MetricsSelectorFieldNumber = 1; - public const int NrOfInstancesFieldNumber = 2; - public const int RouterDispatcherFieldNumber = 3; - public const int UsePoolDispatcherFieldNumber = 4; - public AdaptiveLoadBalancingPool() { } - public AdaptiveLoadBalancingPool(Akka.Cluster.Metrics.Serialization.AdaptiveLoadBalancingPool other) { } - public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; } - public Akka.Cluster.Metrics.Serialization.MetricsSelector MetricsSelector { get; set; } - public uint NrOfInstances { get; set; } - public static Google.Protobuf.MessageParser Parser { get; } - public string RouterDispatcher { get; set; } - public bool UsePoolDispatcher { get; set; } - public int CalculateSize() { } - public Akka.Cluster.Metrics.Serialization.AdaptiveLoadBalancingPool Clone() { } - public override bool Equals(object other) { } - public bool Equals(Akka.Cluster.Metrics.Serialization.AdaptiveLoadBalancingPool other) { } - public override int GetHashCode() { } - public void MergeFrom(Akka.Cluster.Metrics.Serialization.AdaptiveLoadBalancingPool other) { } - public void MergeFrom(Google.Protobuf.CodedInputStream input) { } - public override string ToString() { } - public void WriteTo(Google.Protobuf.CodedOutputStream output) { } - } - public sealed class AddressData : Google.Protobuf.IDeepCloneable, Google.Protobuf.IMessage, Google.Protobuf.IMessage, System.IEquatable - { - public const int HostnameFieldNumber = 2; - public const int PortFieldNumber = 3; - public const int ProtocolFieldNumber = 4; - public const int SystemFieldNumber = 1; - public AddressData() { } - public AddressData(Akka.Cluster.Metrics.Serialization.AddressData other) { } - public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; } - public string Hostname { get; set; } - public static Google.Protobuf.MessageParser Parser { get; } - public uint Port { get; set; } - public string Protocol { get; set; } - public string System { get; set; } - public int CalculateSize() { } - public Akka.Cluster.Metrics.Serialization.AddressData Clone() { } - public override bool Equals(object other) { } - public bool Equals(Akka.Cluster.Metrics.Serialization.AddressData other) { } - public override int GetHashCode() { } - public void MergeFrom(Akka.Cluster.Metrics.Serialization.AddressData other) { } - public void MergeFrom(Google.Protobuf.CodedInputStream input) { } - public override string ToString() { } - public void WriteTo(Google.Protobuf.CodedOutputStream output) { } - } public class ClusterMetricsMessageSerializer : Akka.Serialization.SerializerWithStringManifest { public ClusterMetricsMessageSerializer(Akka.Actor.ExtendedActorSystem system) { } @@ -331,180 +283,63 @@ namespace Akka.Cluster.Metrics.Serialization public override string Manifest(object o) { } public override byte[] ToBinary(object obj) { } } - public class static ClusterMetricsMessagesReflection - { - public static Google.Protobuf.Reflection.FileDescriptor Descriptor { get; } - } [Akka.Annotations.InternalApiAttribute()] public interface IClusterMetricMessage { } [Akka.Annotations.InternalApiAttribute()] - public sealed class MetricsGossip : Google.Protobuf.IDeepCloneable, Google.Protobuf.IMessage, Google.Protobuf.IMessage, System.IEquatable + public sealed class MetricsGossip { - public const int AllAddressesFieldNumber = 1; - public const int AllMetricNamesFieldNumber = 2; public static readonly Akka.Cluster.Metrics.Serialization.MetricsGossip Empty; - public const int NodeMetricsFieldNumber = 3; - public MetricsGossip() { } - public MetricsGossip(Akka.Cluster.Metrics.Serialization.MetricsGossip other) { } public MetricsGossip(System.Collections.Immutable.IImmutableSet nodes) { } - public Google.Protobuf.Collections.RepeatedField AllAddresses { get; } - public Google.Protobuf.Collections.RepeatedField AllMetricNames { get; } - public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; } - public Google.Protobuf.Collections.RepeatedField NodeMetrics { get; } public System.Collections.Immutable.IImmutableSet Nodes { get; } - public static Google.Protobuf.MessageParser Parser { get; } - public int CalculateSize() { } - public Akka.Cluster.Metrics.Serialization.MetricsGossip Clone() { } - public override bool Equals(object other) { } - public bool Equals(Akka.Cluster.Metrics.Serialization.MetricsGossip other) { } public Akka.Cluster.Metrics.Serialization.MetricsGossip Filter(System.Collections.Immutable.IImmutableSet includeNodes) { } - public override int GetHashCode() { } public Akka.Cluster.Metrics.Serialization.MetricsGossip Merge(Akka.Cluster.Metrics.Serialization.MetricsGossip otherGossip) { } - public void MergeFrom(Akka.Cluster.Metrics.Serialization.MetricsGossip other) { } - public void MergeFrom(Google.Protobuf.CodedInputStream input) { } public Akka.Util.Option NodeMetricsFor(Akka.Actor.Address address) { } public Akka.Cluster.Metrics.Serialization.MetricsGossip Remove(Akka.Actor.Address node) { } - public override string ToString() { } - public void WriteTo(Google.Protobuf.CodedOutputStream output) { } public static Akka.Cluster.Metrics.Serialization.MetricsGossip +(Akka.Cluster.Metrics.Serialization.MetricsGossip gossip, Akka.Cluster.Metrics.Serialization.NodeMetrics newNodeMetrics) { } } [Akka.Annotations.InternalApiAttribute()] - public sealed class MetricsGossipEnvelope : Akka.Cluster.Metrics.Serialization.IClusterMetricMessage, Akka.Event.IDeadLetterSuppression, Google.Protobuf.IDeepCloneable, Google.Protobuf.IMessage, Google.Protobuf.IMessage, System.IEquatable + public sealed class MetricsGossipEnvelope : Akka.Cluster.Metrics.Serialization.IClusterMetricMessage, Akka.Event.IDeadLetterSuppression { - public const int FromFieldNumber = 1; - public const int GossipFieldNumber = 2; - public const int ReplyFieldNumber = 3; public MetricsGossipEnvelope(Akka.Actor.Address fromAddress, Akka.Cluster.Metrics.Serialization.MetricsGossip gossip, bool reply) { } - public MetricsGossipEnvelope() { } - public MetricsGossipEnvelope(Akka.Cluster.Metrics.Serialization.MetricsGossipEnvelope other) { } - public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; } - public Akka.Cluster.Metrics.Serialization.AddressData From { get; set; } public Akka.Actor.Address FromAddress { get; } - public Akka.Cluster.Metrics.Serialization.MetricsGossip Gossip { get; set; } - public static Google.Protobuf.MessageParser Parser { get; } - public bool Reply { get; set; } - public int CalculateSize() { } - public Akka.Cluster.Metrics.Serialization.MetricsGossipEnvelope Clone() { } - public override bool Equals(object other) { } - public bool Equals(Akka.Cluster.Metrics.Serialization.MetricsGossipEnvelope other) { } - public override int GetHashCode() { } - public void MergeFrom(Akka.Cluster.Metrics.Serialization.MetricsGossipEnvelope other) { } - public void MergeFrom(Google.Protobuf.CodedInputStream input) { } - public override string ToString() { } - public void WriteTo(Google.Protobuf.CodedOutputStream output) { } + public Akka.Cluster.Metrics.Serialization.MetricsGossip Gossip { get; } + public bool Reply { get; } } - public sealed class MetricsSelector : Google.Protobuf.IDeepCloneable, Google.Protobuf.IMessage, Google.Protobuf.IMessage, System.IEquatable + public sealed class NodeMetrics : System.IEquatable { - public const int DataFieldNumber = 3; - public const int ManifestFieldNumber = 2; - public const int SerializerIdFieldNumber = 1; - public MetricsSelector() { } - public MetricsSelector(Akka.Cluster.Metrics.Serialization.MetricsSelector other) { } - public Google.Protobuf.ByteString Data { get; set; } - public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; } - public string Manifest { get; set; } - public static Google.Protobuf.MessageParser Parser { get; } - public uint SerializerId { get; set; } - public int CalculateSize() { } - public Akka.Cluster.Metrics.Serialization.MetricsSelector Clone() { } - public override bool Equals(object other) { } - public bool Equals(Akka.Cluster.Metrics.Serialization.MetricsSelector other) { } - public override int GetHashCode() { } - public void MergeFrom(Akka.Cluster.Metrics.Serialization.MetricsSelector other) { } - public void MergeFrom(Google.Protobuf.CodedInputStream input) { } - public override string ToString() { } - public void WriteTo(Google.Protobuf.CodedOutputStream output) { } - } - public sealed class MixMetricsSelector : Google.Protobuf.IDeepCloneable, Google.Protobuf.IMessage, Google.Protobuf.IMessage, System.IEquatable - { - public const int SelectorsFieldNumber = 1; - public MixMetricsSelector() { } - public MixMetricsSelector(Akka.Cluster.Metrics.Serialization.MixMetricsSelector other) { } - public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; } - public static Google.Protobuf.MessageParser Parser { get; } - public Google.Protobuf.Collections.RepeatedField Selectors { get; } - public int CalculateSize() { } - public Akka.Cluster.Metrics.Serialization.MixMetricsSelector Clone() { } - public override bool Equals(object other) { } - public bool Equals(Akka.Cluster.Metrics.Serialization.MixMetricsSelector other) { } - public override int GetHashCode() { } - public void MergeFrom(Akka.Cluster.Metrics.Serialization.MixMetricsSelector other) { } - public void MergeFrom(Google.Protobuf.CodedInputStream input) { } - public override string ToString() { } - public void WriteTo(Google.Protobuf.CodedOutputStream output) { } - } - public sealed class NodeMetrics : Google.Protobuf.IDeepCloneable, Google.Protobuf.IMessage, Google.Protobuf.IMessage, System.IEquatable - { - public const int AddressIndexFieldNumber = 1; - public const int MetricsFieldNumber = 3; - public const int TimestampFieldNumber = 2; - public NodeMetrics() { } - public NodeMetrics(Akka.Cluster.Metrics.Serialization.NodeMetrics other) { } public NodeMetrics(Akka.Actor.Address address, long timestamp, System.Collections.Generic.IEnumerable metrics) { } public Akka.Actor.Address Address { get; } - public int AddressIndex { get; set; } - public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; } - public Google.Protobuf.Collections.RepeatedField Metrics { get; } - public static Google.Protobuf.MessageParser Parser { get; } - public long Timestamp { get; set; } - public int CalculateSize() { } - public Akka.Cluster.Metrics.Serialization.NodeMetrics Clone() { } + public System.Collections.Immutable.ImmutableList Metrics { get; } + public long Timestamp { get; } + public override bool Equals(object obj) { } public bool Equals(Akka.Cluster.Metrics.Serialization.NodeMetrics other) { } public override int GetHashCode() { } public Akka.Cluster.Metrics.Serialization.NodeMetrics Merge(Akka.Cluster.Metrics.Serialization.NodeMetrics that) { } - public void MergeFrom(Akka.Cluster.Metrics.Serialization.NodeMetrics other) { } - public void MergeFrom(Google.Protobuf.CodedInputStream input) { } public Akka.Util.Option Metric(string name) { } public bool SameAs(Akka.Cluster.Metrics.Serialization.NodeMetrics that) { } - public override string ToString() { } public Akka.Cluster.Metrics.Serialization.NodeMetrics Update(Akka.Cluster.Metrics.Serialization.NodeMetrics that) { } - public void WriteTo(Google.Protobuf.CodedOutputStream output) { } public class static Types { - public sealed class EWMA : Google.Protobuf.IDeepCloneable, Google.Protobuf.IMessage, Google.Protobuf.IMessage, System.IEquatable + public sealed class EWMA : System.IEquatable { - public const int AlphaFieldNumber = 2; - public const int ValueFieldNumber = 1; - public EWMA() { } - public EWMA(Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.EWMA other) { } public EWMA(double value, double alpha) { } - public double Alpha { get; set; } - public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; } - public static Google.Protobuf.MessageParser Parser { get; } - public double Value { get; set; } - public int CalculateSize() { } - public Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.EWMA Clone() { } - public override bool Equals(object other) { } + public double Alpha { get; } + public double Value { get; } public bool Equals(Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.EWMA other) { } + public override bool Equals(object obj) { } public static double GetAlpha(System.TimeSpan halfLife, System.TimeSpan collectInterval) { } public override int GetHashCode() { } - public void MergeFrom(Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.EWMA other) { } - public void MergeFrom(Google.Protobuf.CodedInputStream input) { } - public override string ToString() { } - public void WriteTo(Google.Protobuf.CodedOutputStream output) { } public static Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.EWMA +(Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.EWMA current, double xn) { } } - public sealed class Metric : Google.Protobuf.IDeepCloneable, Google.Protobuf.IMessage, Google.Protobuf.IMessage, System.IEquatable + public sealed class Metric : System.IEquatable { - public const int EwmaFieldNumber = 3; - public const int NameIndexFieldNumber = 1; - public const int NumberFieldNumber = 2; - public Metric() { } - public Metric(Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Metric other) { } public Metric(string name, Akka.Cluster.Metrics.Helpers.AnyNumber value, Akka.Util.Option average) { } public Akka.Util.Option Average { get; } - public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; } - public Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.EWMA Ewma { get; set; } public bool IsSmooth { get; } public string Name { get; } - public int NameIndex { get; set; } - public Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Number Number { get; set; } - public static Google.Protobuf.MessageParser Parser { get; } public double SmoothValue { get; } public Akka.Cluster.Metrics.Helpers.AnyNumber Value { get; } public Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Metric Add(Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Metric latest) { } - public int CalculateSize() { } - public Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Metric Clone() { } [Akka.Annotations.InternalApiAttribute()] public static Akka.Util.Either ConvertNumber(Akka.Cluster.Metrics.Helpers.AnyNumber number) { } public static Akka.Util.Option Create(string name, Akka.Cluster.Metrics.Helpers.AnyNumber value) { } @@ -513,52 +348,12 @@ namespace Akka.Cluster.Metrics.Serialization public static Akka.Util.Option CreateEWMA(Akka.Cluster.Metrics.Helpers.AnyNumber value, Akka.Util.Option decayFactor) { } [Akka.Annotations.InternalApiAttribute()] public static bool Defined(Akka.Cluster.Metrics.Helpers.AnyNumber value) { } + public override bool Equals(object obj) { } public bool Equals(Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Metric other) { } public override int GetHashCode() { } - public void MergeFrom(Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Metric other) { } - public void MergeFrom(Google.Protobuf.CodedInputStream input) { } public bool SameAs(Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Metric that) { } - public override string ToString() { } - public void WriteTo(Google.Protobuf.CodedOutputStream output) { } public static Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Metric +(Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Metric m1, Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Metric m2) { } } - public sealed class Number : Google.Protobuf.IDeepCloneable, Google.Protobuf.IMessage, Google.Protobuf.IMessage, System.IEquatable - { - public const int SerializedFieldNumber = 4; - public const int TypeFieldNumber = 1; - public const int Value32FieldNumber = 2; - public const int Value64FieldNumber = 3; - public Number() { } - public Number(Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Number other) { } - public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; } - public static Google.Protobuf.MessageParser Parser { get; } - public Google.Protobuf.ByteString Serialized { get; set; } - public Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.NumberType Type { get; set; } - public uint Value32 { get; set; } - public ulong Value64 { get; set; } - public int CalculateSize() { } - public Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Number Clone() { } - public override bool Equals(object other) { } - public bool Equals(Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Number other) { } - public override int GetHashCode() { } - public void MergeFrom(Akka.Cluster.Metrics.Serialization.NodeMetrics.Types.Number other) { } - public void MergeFrom(Google.Protobuf.CodedInputStream input) { } - public override string ToString() { } - public void WriteTo(Google.Protobuf.CodedOutputStream output) { } - } - public enum NumberType - { - [Google.Protobuf.Reflection.OriginalNameAttribute("Serialized")] - Serialized = 0, - [Google.Protobuf.Reflection.OriginalNameAttribute("Double")] - Double = 1, - [Google.Protobuf.Reflection.OriginalNameAttribute("Float")] - Float = 2, - [Google.Protobuf.Reflection.OriginalNameAttribute("Integer")] - Integer = 3, - [Google.Protobuf.Reflection.OriginalNameAttribute("Long")] - Long = 4, - } } } } \ No newline at end of file diff --git a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/Proto/ClusterMetricsMessages.proto b/src/protobuf/ClusterMetricsMessages.proto similarity index 79% rename from src/contrib/cluster/Akka.Cluster.Metrics/Serialization/Proto/ClusterMetricsMessages.proto rename to src/protobuf/ClusterMetricsMessages.proto index 86d66f3b206..f703ebc5f07 100644 --- a/src/contrib/cluster/Akka.Cluster.Metrics/Serialization/Proto/ClusterMetricsMessages.proto +++ b/src/protobuf/ClusterMetricsMessages.proto @@ -3,10 +3,12 @@ */ syntax = "proto3"; +package Akka.Cluster.Metrics.Serialization.Proto.Msg; -option csharp_namespace = "Akka.Cluster.Metrics.Serialization"; option optimize_for = SPEED; +import "ContainerFormats.proto"; + /**************************************** * Metrics Gossip Messages ****************************************/ @@ -15,7 +17,7 @@ option optimize_for = SPEED; * Metrics Gossip Envelope */ message MetricsGossipEnvelope { - AddressData from = 1; + Akka.Remote.Serialization.Proto.Msg.AddressData from = 1; MetricsGossip gossip = 2; bool reply = 3; } @@ -24,7 +26,7 @@ message MetricsGossipEnvelope { * Metrics Gossip */ message MetricsGossip { - repeated AddressData allAddresses = 1; + repeated Akka.Remote.Serialization.Proto.Msg.AddressData allAddresses = 1; repeated string allMetricNames = 2; repeated NodeMetrics nodeMetrics = 3; } @@ -60,20 +62,6 @@ message NodeMetrics { repeated Metric metrics = 3; } -/**************************************** - * Common Datatypes and Messages - ****************************************/ - -/** - * Defines a remote address. - */ -message AddressData { - string system = 1; - string hostname = 2; - uint32 port = 3; - string protocol = 4; -} - /**************************************** * Router pool (for remote deployment ****************************************/