Skip to content

Commit 9b1736d

Browse files
committed
Remove deprecated IWithBoundedStash
1 parent 9707dbe commit 9b1736d

13 files changed

+72
-494
lines changed

src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveCore.Core.verified.txt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,8 +1166,6 @@ namespace Akka.Actor
11661166
void Become(Akka.Actor.UntypedReceive receive);
11671167
void BecomeStacked(Akka.Actor.UntypedReceive receive);
11681168
}
1169-
[System.ObsoleteAttribute("Use `IWithStash` with a configured BoundedDeque-based mailbox instead.")]
1170-
public interface IWithBoundedStash : Akka.Actor.IActorStash, Akka.Actor.IWithUnrestrictedStash, Akka.Dispatch.IRequiresMessageQueue<Akka.Dispatch.IBoundedDequeBasedMessageQueueSemantics> { }
11711169
public interface IWithStash : Akka.Actor.IActorStash, Akka.Actor.IWithUnrestrictedStash, Akka.Dispatch.IRequiresMessageQueue<Akka.Dispatch.IDequeBasedMessageQueueSemantics> { }
11721170
public interface IWithTimers
11731171
{
@@ -1724,10 +1722,7 @@ namespace Akka.Actor
17241722
}
17251723
public class static StashFactory
17261724
{
1727-
public static Akka.Actor.IStash CreateStash<T>(this Akka.Actor.IActorContext context)
1728-
where T : Akka.Actor.ActorBase { }
1729-
public static Akka.Actor.IStash CreateStash(this Akka.Actor.IActorContext context, Akka.Actor.IActorStash actorInstance) { }
1730-
public static Akka.Actor.IStash CreateStash(this Akka.Actor.IActorContext context, System.Type actorType) { }
1725+
public static Akka.Actor.IStash CreateStash(this Akka.Actor.IActorContext context) { }
17311726
}
17321727
public class StashOverflowException : Akka.Actor.AkkaException
17331728
{
@@ -1983,10 +1978,6 @@ namespace Akka.Actor.Internal
19831978
public override bool TryGetExtension<T>(out T extension)
19841979
where T : class, Akka.Actor.IExtension { }
19851980
}
1986-
public class BoundedStashImpl : Akka.Actor.Internal.AbstractStash
1987-
{
1988-
public BoundedStashImpl(Akka.Actor.IActorContext context) { }
1989-
}
19901981
public class ChildNameReserved : Akka.Actor.Internal.IChildStats
19911982
{
19921983
public static Akka.Actor.Internal.ChildNameReserved Instance { get; }
@@ -2129,10 +2120,6 @@ namespace Akka.Actor.Internal
21292120
public override string ToString() { }
21302121
public override Akka.Actor.Internal.IChildrenContainer Unreserve(string name) { }
21312122
}
2132-
public class UnboundedStashImpl : Akka.Actor.Internal.AbstractStash
2133-
{
2134-
public UnboundedStashImpl(Akka.Actor.IActorContext context) { }
2135-
}
21362123
}
21372124
namespace Akka.Actor.Setup
21382125
{

src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveCore.DotNet.verified.txt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,8 +1168,6 @@ namespace Akka.Actor
11681168
void Become(Akka.Actor.UntypedReceive receive);
11691169
void BecomeStacked(Akka.Actor.UntypedReceive receive);
11701170
}
1171-
[System.ObsoleteAttribute("Use `IWithStash` with a configured BoundedDeque-based mailbox instead.")]
1172-
public interface IWithBoundedStash : Akka.Actor.IActorStash, Akka.Actor.IWithUnrestrictedStash, Akka.Dispatch.IRequiresMessageQueue<Akka.Dispatch.IBoundedDequeBasedMessageQueueSemantics> { }
11731171
public interface IWithStash : Akka.Actor.IActorStash, Akka.Actor.IWithUnrestrictedStash, Akka.Dispatch.IRequiresMessageQueue<Akka.Dispatch.IDequeBasedMessageQueueSemantics> { }
11741172
public interface IWithTimers
11751173
{
@@ -1726,10 +1724,7 @@ namespace Akka.Actor
17261724
}
17271725
public class static StashFactory
17281726
{
1729-
public static Akka.Actor.IStash CreateStash<T>(this Akka.Actor.IActorContext context)
1730-
where T : Akka.Actor.ActorBase { }
1731-
public static Akka.Actor.IStash CreateStash(this Akka.Actor.IActorContext context, Akka.Actor.IActorStash actorInstance) { }
1732-
public static Akka.Actor.IStash CreateStash(this Akka.Actor.IActorContext context, System.Type actorType) { }
1727+
public static Akka.Actor.IStash CreateStash(this Akka.Actor.IActorContext context) { }
17331728
}
17341729
public class StashOverflowException : Akka.Actor.AkkaException
17351730
{
@@ -1985,10 +1980,6 @@ namespace Akka.Actor.Internal
19851980
public override bool TryGetExtension<T>(out T extension)
19861981
where T : class, Akka.Actor.IExtension { }
19871982
}
1988-
public class BoundedStashImpl : Akka.Actor.Internal.AbstractStash
1989-
{
1990-
public BoundedStashImpl(Akka.Actor.IActorContext context) { }
1991-
}
19921983
public class ChildNameReserved : Akka.Actor.Internal.IChildStats
19931984
{
19941985
public static Akka.Actor.Internal.ChildNameReserved Instance { get; }
@@ -2131,10 +2122,6 @@ namespace Akka.Actor.Internal
21312122
public override string ToString() { }
21322123
public override Akka.Actor.Internal.IChildrenContainer Unreserve(string name) { }
21332124
}
2134-
public class UnboundedStashImpl : Akka.Actor.Internal.AbstractStash
2135-
{
2136-
public UnboundedStashImpl(Akka.Actor.IActorContext context) { }
2137-
}
21382125
}
21392126
namespace Akka.Actor.Setup
21402127
{

src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveCore.Net.verified.txt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,8 +1166,6 @@ namespace Akka.Actor
11661166
void Become(Akka.Actor.UntypedReceive receive);
11671167
void BecomeStacked(Akka.Actor.UntypedReceive receive);
11681168
}
1169-
[System.ObsoleteAttribute("Use `IWithStash` with a configured BoundedDeque-based mailbox instead.")]
1170-
public interface IWithBoundedStash : Akka.Actor.IActorStash, Akka.Actor.IWithUnrestrictedStash, Akka.Dispatch.IRequiresMessageQueue<Akka.Dispatch.IBoundedDequeBasedMessageQueueSemantics> { }
11711169
public interface IWithStash : Akka.Actor.IActorStash, Akka.Actor.IWithUnrestrictedStash, Akka.Dispatch.IRequiresMessageQueue<Akka.Dispatch.IDequeBasedMessageQueueSemantics> { }
11721170
public interface IWithTimers
11731171
{
@@ -1724,10 +1722,7 @@ namespace Akka.Actor
17241722
}
17251723
public class static StashFactory
17261724
{
1727-
public static Akka.Actor.IStash CreateStash<T>(this Akka.Actor.IActorContext context)
1728-
where T : Akka.Actor.ActorBase { }
1729-
public static Akka.Actor.IStash CreateStash(this Akka.Actor.IActorContext context, Akka.Actor.IActorStash actorInstance) { }
1730-
public static Akka.Actor.IStash CreateStash(this Akka.Actor.IActorContext context, System.Type actorType) { }
1725+
public static Akka.Actor.IStash CreateStash(this Akka.Actor.IActorContext context) { }
17311726
}
17321727
public class StashOverflowException : Akka.Actor.AkkaException
17331728
{
@@ -1983,10 +1978,6 @@ namespace Akka.Actor.Internal
19831978
public override bool TryGetExtension<T>(out T extension)
19841979
where T : class, Akka.Actor.IExtension { }
19851980
}
1986-
public class BoundedStashImpl : Akka.Actor.Internal.AbstractStash
1987-
{
1988-
public BoundedStashImpl(Akka.Actor.IActorContext context) { }
1989-
}
19901981
public class ChildNameReserved : Akka.Actor.Internal.IChildStats
19911982
{
19921983
public static Akka.Actor.Internal.ChildNameReserved Instance { get; }
@@ -2129,10 +2120,6 @@ namespace Akka.Actor.Internal
21292120
public override string ToString() { }
21302121
public override Akka.Actor.Internal.IChildrenContainer Unreserve(string name) { }
21312122
}
2132-
public class UnboundedStashImpl : Akka.Actor.Internal.AbstractStash
2133-
{
2134-
public UnboundedStashImpl(Akka.Actor.IActorContext context) { }
2135-
}
21362123
}
21372124
namespace Akka.Actor.Setup
21382125
{

src/core/Akka.Persistence/Eventsourced.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ protected Eventsourced()
114114
_instanceId = InstanceCounter.GetAndIncrement();
115115
_writerGuid = Guid.NewGuid().ToString();
116116
_currentState = null;
117-
_internalStash = CreateStash();
117+
_internalStash = Context.CreateStash();
118118
Log = Context.GetLogger();
119119
}
120120

@@ -609,11 +609,6 @@ private void FlushJournalBatch()
609609
}
610610
}
611611

612-
private IStash CreateStash()
613-
{
614-
return Context.CreateStash(GetType());
615-
}
616-
617612
private void StashInternally(object currentMessage)
618613
{
619614
try

src/core/Akka.Tests/Actor/Stash/ActorWithBoundedStashSpec.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
namespace Akka.Tests.Actor.Stash
2020
{
21-
public class StashingActor : UntypedActor, IWithBoundedStash
21+
public class StashingActor : UntypedActor, IWithStash
2222
{
2323
public IStash Stash { get; set; }
2424

@@ -39,7 +39,7 @@ protected override void OnReceive(object message)
3939
private void AfterWorldBehavior(object message) => Stash.Stash();
4040
}
4141

42-
public class StashingActorWithOverflow : UntypedActor, IWithBoundedStash
42+
public class StashingActorWithOverflow : UntypedActor, IWithStash
4343
{
4444
private int numStashed = 0;
4545

0 commit comments

Comments
 (0)