-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Akka.Actor: IStash
API and configuration enhancements
#6660
Akka.Actor: IStash
API and configuration enhancements
#6660
Conversation
Add APIs to track content of Stash
Have the data APIs and use cases ready to go, as those were pretty easy. Working on the deployment / configuration pieces now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Detailed my changes
@@ -1134,6 +1134,11 @@ namespace Akka.Actor | |||
} | |||
public interface IStash | |||
{ | |||
int Capacity { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New stashing APIs. Pretty self-explanatory.
@@ -695,6 +695,12 @@ public void Prepend(IEnumerable<Envelope> envelopes) | |||
{ | |||
_userStash.Prepend(envelopes); | |||
} | |||
|
|||
public int Count => _userStash.Count; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the Eventsourced
stash, we use the values provided for the user stash rather than the internal one (since the user can't really affect the internal stash anyway.)
} | ||
|
||
[Fact] | ||
public async Task ShouldGetAccurateStashReadingForUnboundedStash() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basic happy path stash spec. Going to add one for dealing with bounded stashes once I get the other half of #6658
I'll document the new config API in a separate PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Changes
close #6658 - expose data about the contents of the stash and make it easier to configure bounded stashes.
Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):
IStash
improvements - programmatic bounded stash configuration and stash capacity APIs #6658