Skip to content

Commit

Permalink
Remove all obsolete methods from Akka.Cluster.Sharding (#6441)
Browse files Browse the repository at this point in the history
* Remove all obsolete methods from Akka.Cluster.Sharding

* Revert recent changes
  • Loading branch information
Arkatufus committed Feb 27, 2023
1 parent 750acb3 commit 99bbd80
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 27 deletions.
11 changes: 0 additions & 11 deletions src/contrib/cluster/Akka.Cluster.Sharding/ShardedDaemonProcess.cs
Expand Up @@ -135,17 +135,6 @@ public class ShardedDaemonProcess : IExtension
public void Init(string name, int numberOfInstances, Func<int, Props> propsFactory, object stopMessage) =>
Init(name, numberOfInstances, propsFactory, ShardedDaemonProcessSettings.Create(_system), stopMessage);

/// <summary>
/// Start a specific number of actors, each with a unique numeric id in the set, that is then kept alive in the cluster.
/// </summary>
/// <param name="name">TBD</param>
/// <param name="numberOfInstances">TBD</param>
/// <param name="propsFactory">Given a unique id of `0` until `numberOfInstance` create an entity actor.</param>
/// <param name="settings">TBD</param>
[Obsolete("Use the overloaded one which accepts a stopMessage instead.")]
public void Init(string name, int numberOfInstances, Func<int, Props> propsFactory, ShardedDaemonProcessSettings settings) =>
Init(name, numberOfInstances, propsFactory, settings, null);

/// <summary>
/// Start a specific number of actors, each with a unique numeric id in the set, that is then kept alive in the cluster.
/// </summary>
Expand Down
8 changes: 4 additions & 4 deletions src/contrib/cluster/Akka.Cluster.Sharding/ShardingMessages.cs
Expand Up @@ -427,12 +427,12 @@ public sealed class ShardRegionStats : IClusterShardingSerializable, IEquatable<
/// Creates a new ShardRegionStats instance.
/// </summary>
/// <param name="stats">the region stats mapping of `ShardId` to number of entities</param>
[Obsolete]
[Obsolete("Use constructor with `failed` argument. Obsolete since 1.5.0-alpha1")]
public ShardRegionStats(IImmutableDictionary<ShardId, int> stats)
: this(stats, ImmutableHashSet<ShardId>.Empty)
{
}

/// <summary>
/// Creates a new ShardRegionStats instance.
/// </summary>
Expand Down Expand Up @@ -520,12 +520,12 @@ public sealed class CurrentShardRegionState : IClusterShardingSerializable, IEqu
/// TBD
/// </summary>
/// <param name="shards">TBD</param>
[Obsolete]
[Obsolete("Use constructor with `failed` argument. Obsolete since 1.5.0-alpha1")]
public CurrentShardRegionState(IImmutableSet<ShardState> shards)
: this(shards, ImmutableHashSet<ShardId>.Empty)
{
}

/// <summary>
/// TBD
/// </summary>
Expand Down
Expand Up @@ -92,7 +92,7 @@ namespace Akka.Cluster.Sharding
{
public readonly System.Collections.Immutable.IImmutableSet<string> Failed;
public readonly System.Collections.Immutable.IImmutableSet<Akka.Cluster.Sharding.ShardState> Shards;
[System.ObsoleteAttribute()]
[System.ObsoleteAttribute("Use constructor with `failed` argument. Obsolete since 1.5.0-alpha1")]
public CurrentShardRegionState(System.Collections.Immutable.IImmutableSet<Akka.Cluster.Sharding.ShardState> shards) { }
public CurrentShardRegionState(System.Collections.Immutable.IImmutableSet<Akka.Cluster.Sharding.ShardState> shards, System.Collections.Immutable.IImmutableSet<string> failed) { }
public override bool Equals(object obj) { }
Expand Down Expand Up @@ -220,7 +220,7 @@ namespace Akka.Cluster.Sharding
{
public readonly System.Collections.Immutable.IImmutableSet<string> Failed;
public readonly System.Collections.Immutable.IImmutableDictionary<string, int> Stats;
[System.ObsoleteAttribute()]
[System.ObsoleteAttribute("Use constructor with `failed` argument. Obsolete since 1.5.0-alpha1")]
public ShardRegionStats(System.Collections.Immutable.IImmutableDictionary<string, int> stats) { }
public ShardRegionStats(System.Collections.Immutable.IImmutableDictionary<string, int> stats, System.Collections.Immutable.IImmutableSet<string> failed) { }
public override bool Equals(object obj) { }
Expand All @@ -246,8 +246,6 @@ namespace Akka.Cluster.Sharding
public static Akka.Cluster.Sharding.ShardedDaemonProcess Get(Akka.Actor.ActorSystem system) { }
public void Init(string name, int numberOfInstances, System.Func<int, Akka.Actor.Props> propsFactory) { }
public void Init(string name, int numberOfInstances, System.Func<int, Akka.Actor.Props> propsFactory, object stopMessage) { }
[System.ObsoleteAttribute("Use the overloaded one which accepts a stopMessage instead.")]
public void Init(string name, int numberOfInstances, System.Func<int, Akka.Actor.Props> propsFactory, Akka.Cluster.Sharding.ShardedDaemonProcessSettings settings) { }
public void Init(string name, int numberOfInstances, System.Func<int, Akka.Actor.Props> propsFactory, Akka.Cluster.Sharding.ShardedDaemonProcessSettings settings, object stopMessage) { }
}
public class ShardedDaemonProcessExtensionProvider : Akka.Actor.ExtensionIdProvider<Akka.Cluster.Sharding.ShardedDaemonProcess>
Expand Down
Expand Up @@ -92,7 +92,7 @@ namespace Akka.Cluster.Sharding
{
public readonly System.Collections.Immutable.IImmutableSet<string> Failed;
public readonly System.Collections.Immutable.IImmutableSet<Akka.Cluster.Sharding.ShardState> Shards;
[System.ObsoleteAttribute()]
[System.ObsoleteAttribute("Use constructor with `failed` argument. Obsolete since 1.5.0-alpha1")]
public CurrentShardRegionState(System.Collections.Immutable.IImmutableSet<Akka.Cluster.Sharding.ShardState> shards) { }
public CurrentShardRegionState(System.Collections.Immutable.IImmutableSet<Akka.Cluster.Sharding.ShardState> shards, System.Collections.Immutable.IImmutableSet<string> failed) { }
public override bool Equals(object obj) { }
Expand Down Expand Up @@ -220,7 +220,7 @@ namespace Akka.Cluster.Sharding
{
public readonly System.Collections.Immutable.IImmutableSet<string> Failed;
public readonly System.Collections.Immutable.IImmutableDictionary<string, int> Stats;
[System.ObsoleteAttribute()]
[System.ObsoleteAttribute("Use constructor with `failed` argument. Obsolete since 1.5.0-alpha1")]
public ShardRegionStats(System.Collections.Immutable.IImmutableDictionary<string, int> stats) { }
public ShardRegionStats(System.Collections.Immutable.IImmutableDictionary<string, int> stats, System.Collections.Immutable.IImmutableSet<string> failed) { }
public override bool Equals(object obj) { }
Expand All @@ -246,8 +246,6 @@ namespace Akka.Cluster.Sharding
public static Akka.Cluster.Sharding.ShardedDaemonProcess Get(Akka.Actor.ActorSystem system) { }
public void Init(string name, int numberOfInstances, System.Func<int, Akka.Actor.Props> propsFactory) { }
public void Init(string name, int numberOfInstances, System.Func<int, Akka.Actor.Props> propsFactory, object stopMessage) { }
[System.ObsoleteAttribute("Use the overloaded one which accepts a stopMessage instead.")]
public void Init(string name, int numberOfInstances, System.Func<int, Akka.Actor.Props> propsFactory, Akka.Cluster.Sharding.ShardedDaemonProcessSettings settings) { }
public void Init(string name, int numberOfInstances, System.Func<int, Akka.Actor.Props> propsFactory, Akka.Cluster.Sharding.ShardedDaemonProcessSettings settings, object stopMessage) { }
}
public class ShardedDaemonProcessExtensionProvider : Akka.Actor.ExtensionIdProvider<Akka.Cluster.Sharding.ShardedDaemonProcess>
Expand Down
Expand Up @@ -92,7 +92,7 @@ namespace Akka.Cluster.Sharding
{
public readonly System.Collections.Immutable.IImmutableSet<string> Failed;
public readonly System.Collections.Immutable.IImmutableSet<Akka.Cluster.Sharding.ShardState> Shards;
[System.ObsoleteAttribute()]
[System.ObsoleteAttribute("Use constructor with `failed` argument. Obsolete since 1.5.0-alpha1")]
public CurrentShardRegionState(System.Collections.Immutable.IImmutableSet<Akka.Cluster.Sharding.ShardState> shards) { }
public CurrentShardRegionState(System.Collections.Immutable.IImmutableSet<Akka.Cluster.Sharding.ShardState> shards, System.Collections.Immutable.IImmutableSet<string> failed) { }
public override bool Equals(object obj) { }
Expand Down Expand Up @@ -220,7 +220,7 @@ namespace Akka.Cluster.Sharding
{
public readonly System.Collections.Immutable.IImmutableSet<string> Failed;
public readonly System.Collections.Immutable.IImmutableDictionary<string, int> Stats;
[System.ObsoleteAttribute()]
[System.ObsoleteAttribute("Use constructor with `failed` argument. Obsolete since 1.5.0-alpha1")]
public ShardRegionStats(System.Collections.Immutable.IImmutableDictionary<string, int> stats) { }
public ShardRegionStats(System.Collections.Immutable.IImmutableDictionary<string, int> stats, System.Collections.Immutable.IImmutableSet<string> failed) { }
public override bool Equals(object obj) { }
Expand All @@ -246,8 +246,6 @@ namespace Akka.Cluster.Sharding
public static Akka.Cluster.Sharding.ShardedDaemonProcess Get(Akka.Actor.ActorSystem system) { }
public void Init(string name, int numberOfInstances, System.Func<int, Akka.Actor.Props> propsFactory) { }
public void Init(string name, int numberOfInstances, System.Func<int, Akka.Actor.Props> propsFactory, object stopMessage) { }
[System.ObsoleteAttribute("Use the overloaded one which accepts a stopMessage instead.")]
public void Init(string name, int numberOfInstances, System.Func<int, Akka.Actor.Props> propsFactory, Akka.Cluster.Sharding.ShardedDaemonProcessSettings settings) { }
public void Init(string name, int numberOfInstances, System.Func<int, Akka.Actor.Props> propsFactory, Akka.Cluster.Sharding.ShardedDaemonProcessSettings settings, object stopMessage) { }
}
public class ShardedDaemonProcessExtensionProvider : Akka.Actor.ExtensionIdProvider<Akka.Cluster.Sharding.ShardedDaemonProcess>
Expand Down

0 comments on commit 99bbd80

Please sign in to comment.