Skip to content

Commit

Permalink
made Deploy methods virtual (#4868)
Browse files Browse the repository at this point in the history
* made Deploy methods virtual

Made the `Deploy` methods virtual so `Deploy` can be overridden in subsequent systems to carry additional actor information.

* copy IIndirectActorProducer
  • Loading branch information
Aaronontheweb authored Mar 23, 2021
1 parent b3f9f4c commit 37f5575
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 45 deletions.
35 changes: 2 additions & 33 deletions src/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Copyright>Copyright © 2013-2021 Akka.NET Team</Copyright>
<Authors>Akka.NET Team</Authors>
<VersionPrefix>1.4.17</VersionPrefix>
<VersionPrefix>1.4.18</VersionPrefix>
<PackageIconUrl>https://getakka.net/images/akkalogo.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/akkadotnet/akka.net</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/akkadotnet/akka.net/blob/master/LICENSE</PackageLicenseUrl>
Expand All @@ -29,38 +29,7 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<PropertyGroup>
<PackageReleaseNotes>Maintenance Release for Akka.NET 1.4**
This is a more significant release of Akka.NET that solves a number of bugs, introduces new features, and more.
Introduction of Akka.Cluster.SBR - Lightbend's Split Brain Resolvers**
In Akka.NET v1.4.17 we introduce a new set of Akka.Cluster split brain resolvers for Akka.NET, which are based on the recently open sourced Lightbend implementations of the same. We've [documented how to work with each of the new SBR types here](https://getakka.net/articles/clustering/split-brain-resolver.html), but here's the complete list:
`static-quorum`
`keep-majority`
`keep-oldest`
`down-all`
`lease-majority`
`keep-referee` - only available with the legacy split brain resolver (still ships with Akka.NET.)
Other bug fixes:
[Akka: Parse expressions where possible to avoid penalties for `.Compile()`](https://github.com/akkadotnet/akka.net/pull/4712)
[Akka: Ask can't find temporary actor inside async context](https://github.com/akkadotnet/akka.net/issues/4384)
[Akka: Add Serialization.WithTransport overload that takes TState](https://github.com/akkadotnet/akka.net/pull/4764)
[Akka.DependencyInjection: Allow different versions of MS Abstractions nuget package](https://github.com/akkadotnet/akka.net/pull/4739)
[Akka.DependencyInjection: `ServiceProviderProps` did not copy over `Deploy` and `SupervisorStrategy` properties properly](https://github.com/akkadotnet/akka.net/pull/4745)
[Akka.Cluster.Tools: on singleton-proxy setting buffer-size to 0 via Hocon fail on exception](https://github.com/akkadotnet/akka.net/issues/4763)
[Akka.Streams: InputStreamPublisher cannot be cancelled and StreamRef will be blocked](https://github.com/akkadotnet/akka.net/issues/4744)
[Akka.DistributedData: ORDictionary.DeltaGroup.Merge InvalidCastException](https://github.com/akkadotnet/akka.net/issues/4806)
[Akka.TestKit: `Expect(0)` with `EventFilter` does not work](https://github.com/akkadotnet/akka.net/issues/4770)
To see the [full set of fixes in Akka.NET v1.4.17, please see the milestone on Github](https://github.com/akkadotnet/akka.net/milestone/47).
| COMMITS | LOC+ | LOC- | AUTHOR |
| --- | --- | --- | --- |
| 20 | 282 | 237 | IgorFedchenko |
| 14 | 76 | 25 | Aaron Stannard |
| 13 | 17 | 17 | dependabot-preview[bot] |
| 8 | 1031 | 749 | Igor Fedchenko |
| 6 | 225 | 53 | Gregorius Soedharmo |
| 3 | 3 | 3 | Brah McDude |
| 2 | 328 | 21 | Drew |
| 1 | 4053 | 59 | zbynek001 |
| 1 | 2 | 1 | Vagif Abilov |</PackageReleaseNotes>
<PackageReleaseNotes>Placeholder for Nightlies**</PackageReleaseNotes>
</PropertyGroup>
<!-- SourceLink support for all Akka.NET projects -->
<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -612,11 +612,11 @@ namespace Akka.Actor
public Akka.Actor.Scope Scope { get; }
public bool Equals(Akka.Actor.Deploy other) { }
public Akka.Util.ISurrogate ToSurrogate(Akka.Actor.ActorSystem system) { }
public Akka.Actor.Deploy WithDispatcher(string dispatcher) { }
public Akka.Actor.Deploy WithFallback(Akka.Actor.Deploy other) { }
public Akka.Actor.Deploy WithMailbox(string mailbox) { }
public Akka.Actor.Deploy WithRouterConfig(Akka.Routing.RouterConfig routerConfig) { }
public Akka.Actor.Deploy WithScope(Akka.Actor.Scope scope) { }
public virtual Akka.Actor.Deploy WithDispatcher(string dispatcher) { }
public virtual Akka.Actor.Deploy WithFallback(Akka.Actor.Deploy other) { }
public virtual Akka.Actor.Deploy WithMailbox(string mailbox) { }
public virtual Akka.Actor.Deploy WithRouterConfig(Akka.Routing.RouterConfig routerConfig) { }
public virtual Akka.Actor.Deploy WithScope(Akka.Actor.Scope scope) { }
public class DeploySurrogate : Akka.Util.ISurrogate
{
public DeploySurrogate() { }
Expand Down
10 changes: 5 additions & 5 deletions src/core/Akka/Actor/Deploy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public ISurrogate ToSurrogate(ActorSystem system)
/// </summary>
/// <param name="other">The <see cref="Akka.Actor.Deploy" /> used for fallback configuration.</param>
/// <returns>A new <see cref="Akka.Actor.Deploy" /> using <paramref name="other" /> for fallback configuration.</returns>
public Deploy WithFallback(Deploy other)
public virtual Deploy WithFallback(Deploy other)
{
return new Deploy
(
Expand All @@ -259,7 +259,7 @@ public Deploy WithFallback(Deploy other)
/// </summary>
/// <param name="scope">The <see cref="Akka.Actor.Scope" /> used to configure the new <see cref="Akka.Actor.Deploy" />.</param>
/// <returns>A new <see cref="Akka.Actor.Deploy" /> with the provided <paramref name="scope" />.</returns>
public Deploy WithScope(Scope scope)
public virtual Deploy WithScope(Scope scope)
{
return new Deploy
(
Expand All @@ -281,7 +281,7 @@ public Deploy WithScope(Scope scope)
/// </summary>
/// <param name="mailbox">The mailbox used to configure the new <see cref="Akka.Actor.Deploy" />.</param>
/// <returns>A new <see cref="Akka.Actor.Deploy" /> with the provided <paramref name="mailbox" />.</returns>
public Deploy WithMailbox(string mailbox)
public virtual Deploy WithMailbox(string mailbox)
{
return new Deploy
(
Expand All @@ -303,7 +303,7 @@ public Deploy WithMailbox(string mailbox)
/// </summary>
/// <param name="dispatcher">The dispatcher used to configure the new <see cref="Akka.Actor.Deploy" />.</param>
/// <returns>A new <see cref="Akka.Actor.Deploy" /> with the provided <paramref name="dispatcher" />.</returns>
public Deploy WithDispatcher(string dispatcher)
public virtual Deploy WithDispatcher(string dispatcher)
{
return new Deploy
(
Expand All @@ -325,7 +325,7 @@ public Deploy WithDispatcher(string dispatcher)
/// </summary>
/// <param name="routerConfig">The <see cref="Akka.Routing.RouterConfig" /> used to configure the new <see cref="Akka.Actor.Deploy" />.</param>
/// <returns>A new <see cref="Akka.Actor.Deploy" /> with the provided <paramref name="routerConfig" />.</returns>
public Deploy WithRouterConfig(RouterConfig routerConfig)
public virtual Deploy WithRouterConfig(RouterConfig routerConfig)
{
return new Deploy
(
Expand Down
5 changes: 3 additions & 2 deletions src/core/Akka/Actor/Props.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ protected Props()
/// </summary>
/// <param name="copy">The object that is being cloned.</param>
protected Props(Props copy)
: this(copy.Deploy, copy._inputType, copy.SupervisorStrategy, copy.Arguments)
: this(copy._producer, copy.Deploy, copy.Arguments)
{
SupervisorStrategy = copy.SupervisorStrategy;
}

/// <summary>
Expand Down Expand Up @@ -558,7 +559,7 @@ protected virtual Props Copy()
return new Props(_producer, Deploy, Arguments) { SupervisorStrategy = SupervisorStrategy };
}

[Obsolete("we should not be calling this method. Pass in an explicit IIndirectActorProducer reference isntead.")]
[Obsolete("we should not be calling this method. Pass in an explicit IIndirectActorProducer reference instead.")]
private static IIndirectActorProducer CreateProducer(Type type, object[] args)
{
if (type == null) return DefaultProducer.Instance;
Expand Down

0 comments on commit 37f5575

Please sign in to comment.