diff --git a/src/contrib/persistence/Akka.Persistence.Query.InMemory.Tests/InMemoryEventsByTagSpec.cs b/src/contrib/persistence/Akka.Persistence.Query.InMemory.Tests/InMemoryEventsByTagSpec.cs index b85629be893..613635f078a 100644 --- a/src/contrib/persistence/Akka.Persistence.Query.InMemory.Tests/InMemoryEventsByTagSpec.cs +++ b/src/contrib/persistence/Akka.Persistence.Query.InMemory.Tests/InMemoryEventsByTagSpec.cs @@ -14,7 +14,7 @@ namespace Akka.Persistence.Query.InMemory.Tests public class InMemoryEventsByTagSpec : EventsByTagSpec { private static Config Config() => ConfigurationFactory.ParseString(@" - akka.loglevel = INFO + akka.loglevel = DEBUG akka.persistence.journal.inmem { event-adapters { color-tagger = ""Akka.Persistence.TCK.Query.ColorFruitTagger, Akka.Persistence.TCK"" diff --git a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApprovePersistence.Core.verified.txt b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApprovePersistence.Core.verified.txt deleted file mode 100644 index 0f5939a1aef..00000000000 --- a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApprovePersistence.Core.verified.txt +++ /dev/null @@ -1,1200 +0,0 @@ -[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/akkadotnet/akka.net")] -[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("Akka.Cluster.Sharding")] -[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("Akka.Persistence.TCK")] -[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("Akka.Persistence.Tests")] -[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] -[assembly: System.Runtime.InteropServices.GuidAttribute("e3bcba88-003c-4cda-8a60-f0c2553fe3c8")] -[assembly: System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.0", FrameworkDisplayName=".NET Standard 2.0")] -namespace Akka.Persistence -{ - public sealed class AsyncHandlerInvocation : Akka.Persistence.IPendingHandlerInvocation - { - public AsyncHandlerInvocation(object evt, System.Action handler) { } - public object Event { get; } - public System.Action Handler { get; } - } - public abstract class AtLeastOnceDeliveryActor : Akka.Persistence.PersistentActor - { - protected AtLeastOnceDeliveryActor() { } - protected AtLeastOnceDeliveryActor(Akka.Persistence.PersistenceSettings.AtLeastOnceDeliverySettings settings) { } - protected AtLeastOnceDeliveryActor(System.Func overrideSettings) { } - public int MaxUnconfirmedMessages { get; } - public System.TimeSpan RedeliverInterval { get; } - public int RedeliveryBurstLimit { get; } - public int UnconfirmedCount { get; } - public int WarnAfterNumberOfUnconfirmedAttempts { get; } - public override void AroundPostStop() { } - public override void AroundPreRestart(System.Exception cause, object message) { } - protected override bool AroundReceive(Akka.Actor.Receive receive, object message) { } - public bool ConfirmDelivery(long deliveryId) { } - public void Deliver(Akka.Actor.ActorPath destination, System.Func deliveryMessageMapper) { } - public void Deliver(Akka.Actor.ActorSelection destination, System.Func deliveryMessageMapper) { } - public Akka.Persistence.AtLeastOnceDeliverySnapshot GetDeliverySnapshot() { } - protected override void OnReplaySuccess() { } - public void SetDeliverySnapshot(Akka.Persistence.AtLeastOnceDeliverySnapshot snapshot) { } - } - public abstract class AtLeastOnceDeliveryReceiveActor : Akka.Persistence.ReceivePersistentActor - { - protected AtLeastOnceDeliveryReceiveActor() { } - protected AtLeastOnceDeliveryReceiveActor(Akka.Persistence.PersistenceSettings.AtLeastOnceDeliverySettings settings) { } - protected AtLeastOnceDeliveryReceiveActor(System.Func overrideSettings) { } - public int MaxUnconfirmedMessages { get; } - public System.TimeSpan RedeliverInterval { get; } - public int RedeliveryBurstLimit { get; } - public int UnconfirmedCount { get; } - public int WarnAfterNumberOfUnconfirmedAttempts { get; } - public override void AroundPostStop() { } - public override void AroundPreRestart(System.Exception cause, object message) { } - protected override bool AroundReceive(Akka.Actor.Receive receive, object message) { } - public bool ConfirmDelivery(long deliveryId) { } - public void Deliver(Akka.Actor.ActorPath destination, System.Func deliveryMessageMapper) { } - public void Deliver(Akka.Actor.ActorSelection destination, System.Func deliveryMessageMapper) { } - public Akka.Persistence.AtLeastOnceDeliverySnapshot GetDeliverySnapshot() { } - protected override void OnReplaySuccess() { } - public void SetDeliverySnapshot(Akka.Persistence.AtLeastOnceDeliverySnapshot snapshot) { } - } - public class AtLeastOnceDeliverySemantic - { - public AtLeastOnceDeliverySemantic(Akka.Actor.IActorContext context, Akka.Persistence.PersistenceSettings.AtLeastOnceDeliverySettings settings) { } - public int MaxUnconfirmedMessages { get; } - public System.TimeSpan RedeliverInterval { get; } - public int RedeliveryBurstLimit { get; } - public int UnconfirmedCount { get; } - public int WarnAfterNumberOfUnconfirmedAttempts { get; } - public bool AroundReceive(Akka.Actor.Receive receive, object message) { } - public void Cancel() { } - public bool ConfirmDelivery(long deliveryId) { } - public void Deliver(Akka.Actor.ActorPath destination, System.Func deliveryMessageMapper, bool isRecovering) { } - public Akka.Persistence.AtLeastOnceDeliverySnapshot GetDeliverySnapshot() { } - public void OnReplaySuccess() { } - public void SetDeliverySnapshot(Akka.Persistence.AtLeastOnceDeliverySnapshot snapshot) { } - public sealed class Delivery : System.IEquatable - { - public Delivery(Akka.Actor.ActorPath destination, object message, System.DateTime timestamp, int attempt) { } - public int Attempt { get; } - public Akka.Actor.ActorPath Destination { get; } - public object Message { get; } - public System.DateTime Timestamp { get; } - public bool Equals(Akka.Persistence.AtLeastOnceDeliverySemantic.Delivery other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public Akka.Persistence.AtLeastOnceDeliverySemantic.Delivery IncrementedCopy() { } - public override string ToString() { } - } - public sealed class RedeliveryTick : Akka.Actor.INotInfluenceReceiveTimeout, Akka.Event.IDeadLetterSuppression - { - public static Akka.Persistence.AtLeastOnceDeliverySemantic.RedeliveryTick Instance { get; } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - } - } - public sealed class AtLeastOnceDeliverySnapshot : Akka.Persistence.Serialization.IMessage, System.IEquatable - { - public AtLeastOnceDeliverySnapshot(long currentDeliveryId, Akka.Persistence.UnconfirmedDelivery[] unconfirmedDeliveries) { } - public long CurrentDeliveryId { get; } - public Akka.Persistence.UnconfirmedDelivery[] UnconfirmedDeliveries { get; } - public bool Equals(Akka.Persistence.AtLeastOnceDeliverySnapshot other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class AtomicWrite : Akka.Persistence.IPersistentEnvelope, Akka.Persistence.Serialization.IMessage - { - public AtomicWrite(Akka.Persistence.IPersistentRepresentation @event) { } - public AtomicWrite(System.Collections.Immutable.IImmutableList payload) { } - public long HighestSequenceNr { get; } - public long LowestSequenceNr { get; } - public object Payload { get; } - public string PersistenceId { get; } - public Akka.Actor.IActorRef Sender { get; } - public int Size { get; } - public bool Equals(Akka.Persistence.AtomicWrite other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class DeleteMessagesFailure : Akka.Actor.INoSerializationVerificationNeeded, System.IEquatable - { - public DeleteMessagesFailure(System.Exception cause, long toSequenceNr) { } - public System.Exception Cause { get; } - public long ToSequenceNr { get; } - public bool Equals(Akka.Persistence.DeleteMessagesFailure other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class DeleteMessagesSuccess : System.IEquatable - { - public DeleteMessagesSuccess(long toSequenceNr) { } - public long ToSequenceNr { get; } - public bool Equals(Akka.Persistence.DeleteMessagesSuccess other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class DeleteMessagesTo : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalRequest, Akka.Persistence.IPersistenceMessage, System.IEquatable - { - public DeleteMessagesTo(string persistenceId, long toSequenceNr, Akka.Actor.IActorRef persistentActor) { } - public string PersistenceId { get; } - public Akka.Actor.IActorRef PersistentActor { get; } - public long ToSequenceNr { get; } - public bool Equals(Akka.Persistence.DeleteMessagesTo other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class DeleteSnapshot : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage, Akka.Persistence.ISnapshotMessage, Akka.Persistence.ISnapshotRequest, System.IEquatable - { - public DeleteSnapshot(Akka.Persistence.SnapshotMetadata metadata) { } - public Akka.Persistence.SnapshotMetadata Metadata { get; } - public bool Equals(Akka.Persistence.DeleteSnapshot other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class DeleteSnapshotFailure : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage, Akka.Persistence.ISnapshotMessage, Akka.Persistence.ISnapshotResponse, System.IEquatable - { - public DeleteSnapshotFailure(Akka.Persistence.SnapshotMetadata metadata, System.Exception cause) { } - public System.Exception Cause { get; } - public Akka.Persistence.SnapshotMetadata Metadata { get; } - public bool Equals(Akka.Persistence.DeleteSnapshotFailure other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class DeleteSnapshotSuccess : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage, Akka.Persistence.ISnapshotMessage, Akka.Persistence.ISnapshotResponse, System.IEquatable - { - public DeleteSnapshotSuccess(Akka.Persistence.SnapshotMetadata metadata) { } - public Akka.Persistence.SnapshotMetadata Metadata { get; } - public bool Equals(Akka.Persistence.DeleteSnapshotSuccess other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class DeleteSnapshots : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage, Akka.Persistence.ISnapshotMessage, Akka.Persistence.ISnapshotRequest, System.IEquatable - { - public DeleteSnapshots(string persistenceId, Akka.Persistence.SnapshotSelectionCriteria criteria) { } - public Akka.Persistence.SnapshotSelectionCriteria Criteria { get; } - public string PersistenceId { get; } - public bool Equals(Akka.Persistence.DeleteSnapshots other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class DeleteSnapshotsFailure : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage, Akka.Persistence.ISnapshotMessage, Akka.Persistence.ISnapshotResponse, System.IEquatable - { - public DeleteSnapshotsFailure(Akka.Persistence.SnapshotSelectionCriteria criteria, System.Exception cause) { } - public System.Exception Cause { get; } - public Akka.Persistence.SnapshotSelectionCriteria Criteria { get; } - public bool Equals(Akka.Persistence.DeleteSnapshotsFailure other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class DeleteSnapshotsSuccess : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage, Akka.Persistence.ISnapshotMessage, Akka.Persistence.ISnapshotResponse, System.IEquatable - { - public DeleteSnapshotsSuccess(Akka.Persistence.SnapshotSelectionCriteria criteria) { } - public Akka.Persistence.SnapshotSelectionCriteria Criteria { get; } - public bool Equals(Akka.Persistence.DeleteSnapshotsSuccess other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class DiscardConfigurator : Akka.Persistence.IStashOverflowStrategyConfigurator - { - public DiscardConfigurator() { } - public Akka.Persistence.IStashOverflowStrategy Create(Akka.Configuration.Config config) { } - } - public class DiscardToDeadLetterStrategy : Akka.Persistence.IStashOverflowStrategy - { - public static Akka.Persistence.DiscardToDeadLetterStrategy Instance { get; } - } - public abstract class Eventsourced : Akka.Actor.ActorBase, Akka.Actor.IActorStash, Akka.Actor.IWithUnboundedStash, Akka.Actor.IWithUnrestrictedStash, Akka.Dispatch.IRequiresMessageQueue, Akka.Persistence.IPersistenceRecovery, Akka.Persistence.IPersistenceStash, Akka.Persistence.IPersistentIdentity - { - public static readonly System.Func UnstashFilterPredicate; - protected Eventsourced() { } - protected Akka.Persistence.PersistenceExtension Extension { get; } - public virtual Akka.Persistence.IStashOverflowStrategy InternalStashOverflowStrategy { get; } - public bool IsRecovering { get; } - public bool IsRecoveryFinished { get; } - public Akka.Actor.IActorRef Journal { get; } - public string JournalPluginId { get; set; } - public long LastSequenceNr { get; } - protected virtual Akka.Event.ILoggingAdapter Log { get; } - public abstract string PersistenceId { get; } - public virtual Akka.Persistence.Recovery Recovery { get; } - public string SnapshotPluginId { get; set; } - public long SnapshotSequenceNr { get; } - public Akka.Actor.IActorRef SnapshotStore { get; } - public string SnapshotterId { get; } - public Akka.Actor.IStash Stash { get; set; } - public override void AroundPostRestart(System.Exception reason, object message) { } - public override void AroundPostStop() { } - public override void AroundPreRestart(System.Exception cause, object message) { } - public override void AroundPreStart() { } - protected override bool AroundReceive(Akka.Actor.Receive receive, object message) { } - public void DeferAsync(TEvent evt, System.Action handler) { } - public void DeleteMessages(long toSequenceNr) { } - public void DeleteSnapshot(long sequenceNr) { } - public void DeleteSnapshots(Akka.Persistence.SnapshotSelectionCriteria criteria) { } - public void LoadSnapshot(string persistenceId, Akka.Persistence.SnapshotSelectionCriteria criteria, long toSequenceNr) { } - protected virtual void OnPersistFailure(System.Exception cause, object @event, long sequenceNr) { } - protected virtual void OnPersistRejected(System.Exception cause, object @event, long sequenceNr) { } - protected virtual void OnRecoveryFailure(System.Exception reason, object message = null) { } - protected virtual void OnReplaySuccess() { } - public void Persist(TEvent @event, System.Action handler) { } - public void PersistAll(System.Collections.Generic.IEnumerable events, System.Action handler) { } - public void PersistAllAsync(System.Collections.Generic.IEnumerable events, System.Action handler) { } - public void PersistAsync(TEvent @event, System.Action handler) { } - protected abstract bool ReceiveCommand(object message); - protected abstract bool ReceiveRecover(object message); - protected void RunTask(System.Func action) { } - public void SaveSnapshot(object snapshot) { } - protected override void Unhandled(object message) { } - } - public interface IJournalMessage : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage { } - public interface IJournalPlugin - { - Akka.Configuration.Config DefaultConfig { get; } - string JournalPath { get; } - } - public interface IJournalRequest : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IJournalMessage, Akka.Persistence.IPersistenceMessage { } - public interface IJournalResponse : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IJournalMessage, Akka.Persistence.IPersistenceMessage { } - public interface IPendingHandlerInvocation - { - object Event { get; } - System.Action Handler { get; } - } - public interface IPersistenceMessage : Akka.Actor.INoSerializationVerificationNeeded { } - public interface IPersistenceRecovery - { - Akka.Persistence.Recovery Recovery { get; } - } - public interface IPersistenceStash : Akka.Actor.IActorStash, Akka.Actor.IWithUnboundedStash, Akka.Actor.IWithUnrestrictedStash, Akka.Dispatch.IRequiresMessageQueue - { - Akka.Persistence.IStashOverflowStrategy InternalStashOverflowStrategy { get; } - } - public interface IPersistentEnvelope - { - object Payload { get; } - Akka.Actor.IActorRef Sender { get; } - int Size { get; } - } - public interface IPersistentIdentity - { - string JournalPluginId { get; } - string PersistenceId { get; } - string SnapshotPluginId { get; } - } - public interface IPersistentRepresentation : Akka.Persistence.Serialization.IMessage - { - bool IsDeleted { get; } - string Manifest { get; } - object Payload { get; } - string PersistenceId { get; } - Akka.Actor.IActorRef Sender { get; } - long SequenceNr { get; } - long Timestamp { get; } - string WriterGuid { get; } - Akka.Persistence.IPersistentRepresentation Update(long sequenceNr, string persistenceId, bool isDeleted, Akka.Actor.IActorRef sender, string writerGuid); - Akka.Persistence.IPersistentRepresentation WithManifest(string manifest); - Akka.Persistence.IPersistentRepresentation WithPayload(object payload); - Akka.Persistence.IPersistentRepresentation WithTimestamp(long timestamp); - } - public interface ISnapshotMessage : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage { } - public interface ISnapshotRequest : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage, Akka.Persistence.ISnapshotMessage { } - public interface ISnapshotResponse : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage, Akka.Persistence.ISnapshotMessage { } - public interface ISnapshotter - { - long SnapshotSequenceNr { get; } - string SnapshotterId { get; } - void DeleteSnapshot(long sequenceNr); - void DeleteSnapshots(Akka.Persistence.SnapshotSelectionCriteria criteria); - void LoadSnapshot(string persistenceId, Akka.Persistence.SnapshotSelectionCriteria criteria, long toSequenceNr); - void SaveSnapshot(object snapshot); - } - public interface IStashOverflowStrategy { } - public interface IStashOverflowStrategyConfigurator - { - Akka.Persistence.IStashOverflowStrategy Create(Akka.Configuration.Config config); - } - public sealed class LoadSnapshot : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage, Akka.Persistence.ISnapshotMessage, Akka.Persistence.ISnapshotRequest, System.IEquatable - { - public LoadSnapshot(string persistenceId, Akka.Persistence.SnapshotSelectionCriteria criteria, long toSequenceNr) { } - public Akka.Persistence.SnapshotSelectionCriteria Criteria { get; } - public string PersistenceId { get; } - public long ToSequenceNr { get; } - public bool Equals(Akka.Persistence.LoadSnapshot other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class LoadSnapshotFailed : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage, Akka.Persistence.ISnapshotMessage, Akka.Persistence.ISnapshotResponse - { - public LoadSnapshotFailed(System.Exception cause) { } - public System.Exception Cause { get; } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class LoadSnapshotResult : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage, Akka.Persistence.ISnapshotMessage, Akka.Persistence.ISnapshotResponse, System.IEquatable - { - public LoadSnapshotResult(Akka.Persistence.SelectedSnapshot snapshot, long toSequenceNr) { } - public Akka.Persistence.SelectedSnapshot Snapshot { get; } - public long ToSequenceNr { get; } - public bool Equals(Akka.Persistence.LoadSnapshotResult other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class LoopMessageSuccess : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalResponse, Akka.Persistence.IPersistenceMessage, System.IEquatable - { - public LoopMessageSuccess(object message, int actorInstanceId) { } - public int ActorInstanceId { get; } - public object Message { get; } - public bool Equals(Akka.Persistence.LoopMessageSuccess other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public class MaxUnconfirmedMessagesExceededException : System.Exception - { - public MaxUnconfirmedMessagesExceededException() { } - public MaxUnconfirmedMessagesExceededException(string message) { } - public MaxUnconfirmedMessagesExceededException(string message, System.Exception innerException) { } - protected MaxUnconfirmedMessagesExceededException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } - } - public class Persistence : Akka.Actor.ExtensionIdProvider - { - public Persistence() { } - public static Akka.Persistence.Persistence Instance { get; } - public override Akka.Persistence.PersistenceExtension CreateExtension(Akka.Actor.ExtendedActorSystem system) { } - public static Akka.Configuration.Config DefaultConfig() { } - } - public class PersistenceExtension : Akka.Actor.IExtension - { - public PersistenceExtension(Akka.Actor.ExtendedActorSystem system) { } - public Akka.Persistence.IStashOverflowStrategy DefaultInternalStashOverflowStrategy { get; } - public Akka.Persistence.PersistenceSettings Settings { get; } - public Akka.Persistence.Journal.EventAdapters AdaptersFor(string journalPluginId) { } - public Akka.Actor.IActorRef JournalFor(string journalPluginId) { } - public string PersistenceId(Akka.Actor.IActorRef actor) { } - public Akka.Actor.IActorRef SnapshotStoreFor(string snapshotPluginId) { } - } - public sealed class PersistenceSettings : Akka.Actor.Settings - { - public PersistenceSettings(Akka.Actor.ActorSystem system, Akka.Configuration.Config config) { } - public Akka.Persistence.PersistenceSettings.AtLeastOnceDeliverySettings AtLeastOnceDelivery { get; set; } - public Akka.Persistence.PersistenceSettings.InternalSettings Internal { get; } - public Akka.Persistence.PersistenceSettings.ViewSettings View { get; } - public sealed class AtLeastOnceDeliverySettings - { - public AtLeastOnceDeliverySettings(System.TimeSpan redeliverInterval, int redeliveryBurstLimit, int warnAfterNumberOfUnconfirmedAttempts, int maxUnconfirmedMessages) { } - public AtLeastOnceDeliverySettings(Akka.Configuration.Config config) { } - public int MaxUnconfirmedMessages { get; } - public System.TimeSpan RedeliverInterval { get; } - public int RedeliveryBurstLimit { get; } - public int WarnAfterNumberOfUnconfirmedAttempts { get; } - public Akka.Persistence.PersistenceSettings.AtLeastOnceDeliverySettings WithMaxUnconfirmedMessages(int maxUnconfirmedMessages) { } - public Akka.Persistence.PersistenceSettings.AtLeastOnceDeliverySettings WithRedeliverInterval(System.TimeSpan redeliverInterval) { } - public Akka.Persistence.PersistenceSettings.AtLeastOnceDeliverySettings WithRedeliveryBurstLimit(int redeliveryBurstLimit) { } - public Akka.Persistence.PersistenceSettings.AtLeastOnceDeliverySettings WithUnconfirmedAttemptsToWarn(int unconfirmedAttemptsToWarn) { } - } - public sealed class InternalSettings - { - public InternalSettings(Akka.Configuration.Config config) { } - public bool PublishConfirmations { get; } - public bool PublishPluginCommands { get; } - } - public sealed class ViewSettings - { - public ViewSettings(Akka.Configuration.Config config) { } - public bool AutoUpdate { get; } - public System.TimeSpan AutoUpdateInterval { get; } - public long AutoUpdateReplayMax { get; } - } - } - [Akka.Annotations.InternalApiAttribute()] - public class Persistent : Akka.Persistence.IPersistentRepresentation, Akka.Persistence.Serialization.IMessage, System.IEquatable - { - public Persistent(object payload, long sequenceNr = 0, string persistenceId = null, string manifest = null, bool isDeleted = False, Akka.Actor.IActorRef sender = null, string writerGuid = null, long timestamp = 0) { } - public bool IsDeleted { get; } - public string Manifest { get; } - public object Payload { get; } - public string PersistenceId { get; } - public Akka.Actor.IActorRef Sender { get; } - public long SequenceNr { get; } - public long Timestamp { get; } - public static string Undefined { get; } - public string WriterGuid { get; } - public bool Equals(Akka.Persistence.IPersistentRepresentation other) { } - public override bool Equals(object obj) { } - public bool Equals(Akka.Persistence.Persistent other) { } - public override int GetHashCode() { } - public override string ToString() { } - public Akka.Persistence.IPersistentRepresentation Update(long sequenceNr, string persistenceId, bool isDeleted, Akka.Actor.IActorRef sender, string writerGuid) { } - public Akka.Persistence.IPersistentRepresentation WithManifest(string manifest) { } - public Akka.Persistence.IPersistentRepresentation WithPayload(object payload) { } - public Akka.Persistence.IPersistentRepresentation WithTimestamp(long newTimestamp) { } - } - public abstract class PersistentActor : Akka.Persistence.Eventsourced - { - protected PersistentActor() { } - protected override bool Receive(object message) { } - } - public abstract class ReceivePersistentActor : Akka.Persistence.UntypedPersistentActor, Akka.Actor.Internal.IInitializableActor - { - protected ReceivePersistentActor() { } - protected void Become(System.Action configure) { } - protected void BecomeStacked(System.Action configure) { } - protected void Command(System.Action handler, System.Predicate shouldHandle = null) { } - protected void Command(System.Predicate shouldHandle, System.Action handler) { } - protected void Command(System.Type messageType, System.Action handler, System.Predicate shouldHandle = null) { } - protected void Command(System.Type messageType, System.Predicate shouldHandle, System.Action handler) { } - protected void Command(System.Func handler) { } - protected void Command(System.Type messageType, System.Func handler) { } - protected void Command(System.Action handler) { } - protected void CommandAny(System.Action handler) { } - protected void CommandAnyAsync(System.Func handler) { } - protected void CommandAsync(System.Func handler, System.Predicate shouldHandle = null) { } - protected void CommandAsync(System.Predicate shouldHandle, System.Func handler) { } - protected void CommandAsync(System.Type messageType, System.Func handler, System.Predicate shouldHandle = null) { } - protected void CommandAsync(System.Type messageType, System.Predicate shouldHandle, System.Func handler) { } - protected virtual void OnCommand(object message) { } - protected virtual void OnRecover(object message) { } - protected void Recover(System.Action handler, System.Predicate shouldHandle = null) { } - protected void Recover(System.Predicate shouldHandle, System.Action handler) { } - protected void Recover(System.Type messageType, System.Action handler, System.Predicate shouldHandle = null) { } - protected void Recover(System.Type messageType, System.Predicate shouldHandle, System.Action handler) { } - protected void Recover(System.Func handler) { } - protected void Recover(System.Type messageType, System.Func handler) { } - protected void RecoverAny(System.Action handler) { } - } - public sealed class Recovery - { - public Recovery() { } - public Recovery(Akka.Persistence.SnapshotSelectionCriteria fromSnapshot) { } - public Recovery(Akka.Persistence.SnapshotSelectionCriteria fromSnapshot, long toSequenceNr) { } - public Recovery(Akka.Persistence.SnapshotSelectionCriteria fromSnapshot = null, long toSequenceNr = 9223372036854775807, long replayMax = 9223372036854775807) { } - public static Akka.Persistence.Recovery Default { get; } - public Akka.Persistence.SnapshotSelectionCriteria FromSnapshot { get; } - public static Akka.Persistence.Recovery None { get; } - public long ReplayMax { get; } - public long ToSequenceNr { get; } - } - public sealed class RecoveryCompleted - { - public static readonly Akka.Persistence.RecoveryCompleted Instance; - public override bool Equals(object obj) { } - public override int GetHashCode() { } - } - public sealed class RecoverySuccess : Akka.Actor.INoSerializationVerificationNeeded, Akka.Event.IDeadLetterSuppression, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalResponse, Akka.Persistence.IPersistenceMessage, System.IEquatable - { - public RecoverySuccess(long highestSequenceNr) { } - public long HighestSequenceNr { get; } - public bool Equals(Akka.Persistence.RecoverySuccess other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class RecoveryTick - { - public RecoveryTick(bool snapshot) { } - public bool Snapshot { get; } - } - public sealed class RecoveryTimedOutException : Akka.Actor.AkkaException - { - public RecoveryTimedOutException() { } - public RecoveryTimedOutException(string message, System.Exception cause = null) { } - public RecoveryTimedOutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } - } - public sealed class ReplayMessages : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalRequest, Akka.Persistence.IPersistenceMessage, System.IEquatable - { - public ReplayMessages(long fromSequenceNr, long toSequenceNr, long max, string persistenceId, Akka.Actor.IActorRef persistentActor) { } - public long FromSequenceNr { get; } - public long Max { get; } - public string PersistenceId { get; } - public Akka.Actor.IActorRef PersistentActor { get; } - public long ToSequenceNr { get; } - public bool Equals(Akka.Persistence.ReplayMessages other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class ReplayMessagesFailure : Akka.Actor.INoSerializationVerificationNeeded, Akka.Event.IDeadLetterSuppression, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalResponse, Akka.Persistence.IPersistenceMessage, System.IEquatable - { - public ReplayMessagesFailure(System.Exception cause) { } - public System.Exception Cause { get; } - public bool Equals(Akka.Persistence.ReplayMessagesFailure other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class ReplayedMessage : Akka.Actor.INoSerializationVerificationNeeded, Akka.Event.IDeadLetterSuppression, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalResponse, Akka.Persistence.IPersistenceMessage, System.IEquatable - { - public ReplayedMessage(Akka.Persistence.IPersistentRepresentation persistent) { } - public Akka.Persistence.IPersistentRepresentation Persistent { get; } - public bool Equals(Akka.Persistence.ReplayedMessage other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class ReplyToStrategy : Akka.Persistence.IStashOverflowStrategy - { - public ReplyToStrategy(object response) { } - public object Response { get; } - } - public sealed class SaveSnapshot : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage, Akka.Persistence.ISnapshotMessage, Akka.Persistence.ISnapshotRequest, System.IEquatable - { - public SaveSnapshot(Akka.Persistence.SnapshotMetadata metadata, object snapshot) { } - public Akka.Persistence.SnapshotMetadata Metadata { get; } - public object Snapshot { get; } - public bool Equals(Akka.Persistence.SaveSnapshot other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class SaveSnapshotFailure : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage, Akka.Persistence.ISnapshotMessage, Akka.Persistence.ISnapshotResponse, System.IEquatable - { - public SaveSnapshotFailure(Akka.Persistence.SnapshotMetadata metadata, System.Exception cause) { } - public System.Exception Cause { get; } - public Akka.Persistence.SnapshotMetadata Metadata { get; } - public bool Equals(Akka.Persistence.SaveSnapshotFailure other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class SaveSnapshotSuccess : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IPersistenceMessage, Akka.Persistence.ISnapshotMessage, Akka.Persistence.ISnapshotResponse, System.IEquatable - { - public SaveSnapshotSuccess(Akka.Persistence.SnapshotMetadata metadata) { } - public Akka.Persistence.SnapshotMetadata Metadata { get; } - public bool Equals(Akka.Persistence.SaveSnapshotSuccess other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class SelectedSnapshot : System.IEquatable - { - public SelectedSnapshot(Akka.Persistence.SnapshotMetadata metadata, object snapshot) { } - public Akka.Persistence.SnapshotMetadata Metadata { get; } - public object Snapshot { get; } - public bool Equals(Akka.Persistence.SelectedSnapshot other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class SnapshotMetadata : System.IEquatable - { - public static System.DateTime TimestampNotSpecified; - public SnapshotMetadata(string persistenceId, long sequenceNr) { } - [Newtonsoft.Json.JsonConstructorAttribute()] - public SnapshotMetadata(string persistenceId, long sequenceNr, System.DateTime timestamp) { } - public static System.Collections.Generic.IComparer Comparer { get; } - public string PersistenceId { get; } - public long SequenceNr { get; } - public System.DateTime Timestamp { get; } - public override bool Equals(object obj) { } - public bool Equals(Akka.Persistence.SnapshotMetadata other) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class SnapshotOffer : System.IEquatable - { - public SnapshotOffer(Akka.Persistence.SnapshotMetadata metadata, object snapshot) { } - public Akka.Persistence.SnapshotMetadata Metadata { get; } - public object Snapshot { get; } - public bool Equals(Akka.Persistence.SnapshotOffer other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class SnapshotSelectionCriteria : System.IEquatable - { - [Newtonsoft.Json.JsonConstructorAttribute()] - public SnapshotSelectionCriteria(long maxSequenceNr, System.DateTime maxTimeStamp, long minSequenceNr = 0, System.Nullable minTimestamp = null) { } - public SnapshotSelectionCriteria(long maxSequenceNr) { } - public static Akka.Persistence.SnapshotSelectionCriteria Latest { get; } - public long MaxSequenceNr { get; } - public System.DateTime MaxTimeStamp { get; } - public long MinSequenceNr { get; } - public System.Nullable MinTimestamp { get; } - public static Akka.Persistence.SnapshotSelectionCriteria None { get; } - public bool Equals(Akka.Persistence.SnapshotSelectionCriteria other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class StashingHandlerInvocation : Akka.Persistence.IPendingHandlerInvocation - { - public StashingHandlerInvocation(object evt, System.Action handler) { } - public object Event { get; } - public System.Action Handler { get; } - } - public sealed class ThrowExceptionConfigurator : Akka.Persistence.IStashOverflowStrategyConfigurator - { - public ThrowExceptionConfigurator() { } - public Akka.Persistence.IStashOverflowStrategy Create(Akka.Configuration.Config config) { } - } - public class ThrowOverflowExceptionStrategy : Akka.Persistence.IStashOverflowStrategy - { - public static Akka.Persistence.ThrowOverflowExceptionStrategy Instance { get; } - } - public sealed class UnconfirmedDelivery : System.IEquatable - { - public UnconfirmedDelivery(long deliveryId, Akka.Actor.ActorPath destination, object message) { } - public long DeliveryId { get; } - public Akka.Actor.ActorPath Destination { get; } - public object Message { get; } - public bool Equals(Akka.Persistence.UnconfirmedDelivery other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class UnconfirmedWarning : System.IEquatable - { - public UnconfirmedWarning(Akka.Persistence.UnconfirmedDelivery[] unconfirmedDeliveries) { } - public Akka.Persistence.UnconfirmedDelivery[] UnconfirmedDeliveries { get; } - public bool Equals(Akka.Persistence.UnconfirmedWarning other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public abstract class UntypedPersistentActor : Akka.Persistence.Eventsourced - { - protected UntypedPersistentActor() { } - protected static Akka.Actor.IUntypedActorContext Context { get; } - protected void Become(Akka.Actor.UntypedReceive receive) { } - protected void BecomeStacked(Akka.Actor.UntypedReceive receive) { } - protected abstract void OnCommand(object message); - protected abstract void OnRecover(object message); - protected override bool Receive(object message) { } - protected virtual bool ReceiveCommand(object message) { } - protected virtual bool ReceiveRecover(object message) { } - } - public sealed class WriteMessageFailure : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalResponse, Akka.Persistence.IPersistenceMessage, System.IEquatable - { - public WriteMessageFailure(Akka.Persistence.IPersistentRepresentation persistent, System.Exception cause, int actorInstanceId) { } - public int ActorInstanceId { get; } - public System.Exception Cause { get; } - public Akka.Persistence.IPersistentRepresentation Persistent { get; } - public bool Equals(Akka.Persistence.WriteMessageFailure other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class WriteMessageRejected : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalResponse, Akka.Persistence.IPersistenceMessage, System.IEquatable - { - public WriteMessageRejected(Akka.Persistence.IPersistentRepresentation persistent, System.Exception cause, int actorInstanceId) { } - public int ActorInstanceId { get; } - public System.Exception Cause { get; } - public Akka.Persistence.IPersistentRepresentation Persistent { get; } - public bool Equals(Akka.Persistence.WriteMessageRejected other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class WriteMessageSuccess : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalResponse, Akka.Persistence.IPersistenceMessage, System.IEquatable - { - public WriteMessageSuccess(Akka.Persistence.IPersistentRepresentation persistent, int actorInstanceId) { } - public int ActorInstanceId { get; } - public Akka.Persistence.IPersistentRepresentation Persistent { get; } - public bool Equals(Akka.Persistence.WriteMessageSuccess other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class WriteMessages : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalRequest, Akka.Persistence.IPersistenceMessage, System.IEquatable - { - public WriteMessages(System.Collections.Generic.IEnumerable messages, Akka.Actor.IActorRef persistentActor, int actorInstanceId) { } - public int ActorInstanceId { get; } - public System.Collections.Generic.IEnumerable Messages { get; } - public Akka.Actor.IActorRef PersistentActor { get; } - public bool Equals(Akka.Persistence.WriteMessages other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class WriteMessagesFailed : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalResponse, Akka.Persistence.IPersistenceMessage, System.IEquatable - { - public WriteMessagesFailed(System.Exception cause, int writeCount) { } - public System.Exception Cause { get; } - public int WriteCount { get; } - public bool Equals(Akka.Persistence.WriteMessagesFailed other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class WriteMessagesSuccessful : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalResponse, Akka.Persistence.IPersistenceMessage - { - public static Akka.Persistence.WriteMessagesSuccessful Instance { get; } - } -} -namespace Akka.Persistence.Fsm -{ - public class static PersistentFSM - { - public interface IFsmState - { - string Identifier { get; } - } - public class PersistentFSMSnapshot : Akka.Persistence.Serialization.IMessage - { - public PersistentFSMSnapshot(string stateIdentifier, TD data, System.Nullable timeout) { } - public TD Data { get; } - public string StateIdentifier { get; } - public System.Nullable Timeout { get; } - protected bool Equals(Akka.Persistence.Fsm.PersistentFSM.PersistentFSMSnapshot other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - } - public class StateChangeEvent : Akka.Persistence.Serialization.IMessage - { - public StateChangeEvent(string stateIdentifier, System.Nullable timeout) { } - public string StateIdentifier { get; } - public System.Nullable Timeout { get; } - } - public class State - { - public State(TS stateName, TD stateData, System.Nullable timeout = null, Akka.Actor.FSMBase.Reason stopReason = null, System.Collections.Generic.IReadOnlyList replies = null, System.Collections.Generic.IReadOnlyList domainEvents = null, System.Action afterTransitionDo = null, bool notifies = True) { } - public System.Action AfterTransitionDo { get; } - public System.Collections.Generic.IReadOnlyList DomainEvents { get; } - public System.Collections.Generic.IReadOnlyList Replies { get; set; } - public TD StateData { get; } - public TS StateName { get; } - public Akka.Actor.FSMBase.Reason StopReason { get; } - public System.Nullable Timeout { get; } - public Akka.Persistence.Fsm.PersistentFSM.State AndThen(System.Action handler) { } - public Akka.Persistence.Fsm.PersistentFSM.State Applying(params TE[] events) { } - public Akka.Persistence.Fsm.PersistentFSM.State ForMax(System.TimeSpan timeout) { } - public Akka.Persistence.Fsm.PersistentFSM.State Replying(object replyValue) { } - public override string ToString() { } - [System.ObsoleteAttribute("Internal API easily to be confused with regular FSM\'s using. Use regular events (" + - "`Applying`). Internally, `copy` can be used instead.")] - public Akka.Persistence.Fsm.PersistentFSM.State Using(TD nextStateData) { } - } - } - public abstract class PersistentFSMBase : Akka.Persistence.PersistentActor, Akka.Routing.IListeners - { - protected PersistentFSMBase() { } - public Akka.Routing.ListenerSupport Listeners { get; } - public TData NextStateData { get; } - public TData StateData { get; } - public TState StateName { get; } - protected System.Collections.Generic.IEnumerable StateNames { get; } - protected virtual void ApplyState(Akka.Persistence.Fsm.PersistentFSM.State nextState) { } - public void CancelTimer(string name) { } - public Akka.Persistence.Fsm.PersistentFSM.State GoTo(TState nextStateName) { } - public bool IsTimerActive(string name) { } - protected virtual void LogTermination(Akka.Actor.FSMBase.Reason reason) { } - public void OnTermination(System.Action> terminationHandler) { } - public void OnTransition(Akka.Persistence.Fsm.PersistentFSMBase.TransitionHandler transitionHandler) { } - protected override void PostStop() { } - protected override bool ReceiveCommand(object message) { } - public void SetStateTimeout(TState state, System.Nullable timeout) { } - public void SetTimer(string name, object msg, System.TimeSpan timeout, bool repeat = False) { } - public void StartWith(TState stateName, TData stateData, System.Nullable timeout = null) { } - public Akka.Persistence.Fsm.PersistentFSM.State Stay() { } - public Akka.Persistence.Fsm.PersistentFSM.State Stop() { } - public Akka.Persistence.Fsm.PersistentFSM.State Stop(Akka.Actor.FSMBase.Reason reason) { } - public Akka.Persistence.Fsm.PersistentFSM.State Stop(Akka.Actor.FSMBase.Reason reason, TData stateData) { } - public Akka.Persistence.Fsm.PersistentFSMBase.TransformHelper Transform(Akka.Persistence.Fsm.PersistentFSMBase.StateFunction func) { } - public void When(TState stateName, Akka.Persistence.Fsm.PersistentFSMBase.StateFunction func, System.Nullable timeout = null) { } - public void WhenUnhandled(Akka.Persistence.Fsm.PersistentFSMBase.StateFunction stateFunction) { } - public delegate Akka.Persistence.Fsm.PersistentFSM.State StateFunction(Akka.Actor.FSMBase.Event fsmEvent, Akka.Persistence.Fsm.PersistentFSM.State state = null); - public sealed class TransformHelper - { - public TransformHelper(Akka.Persistence.Fsm.PersistentFSMBase.StateFunction func) { } - public Akka.Persistence.Fsm.PersistentFSMBase.StateFunction Func { get; } - public Akka.Persistence.Fsm.PersistentFSMBase.StateFunction Using(System.Func, Akka.Persistence.Fsm.PersistentFSM.State> andThen) { } - } - public delegate void TransitionHandler(TState initialState, TState nextState); - } - public abstract class PersistentFSM : Akka.Persistence.Fsm.PersistentFSMBase - where TState : Akka.Persistence.Fsm.PersistentFSM.IFsmState - { - protected PersistentFSM() { } - protected abstract TData ApplyEvent(TEvent domainEvent, TData currentData); - protected override void ApplyState(Akka.Persistence.Fsm.PersistentFSM.State nextState) { } - protected virtual void OnRecoveryCompleted() { } - protected override bool ReceiveRecover(object message) { } - public void SaveStateSnapshot() { } - } -} -namespace Akka.Persistence.Journal -{ - public class AsyncReplayTimeoutException : Akka.Actor.AkkaException - { - public AsyncReplayTimeoutException() { } - public AsyncReplayTimeoutException(string message) { } - protected AsyncReplayTimeoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } - } - public abstract class AsyncWriteJournal : Akka.Persistence.Journal.WriteJournalBase, Akka.Persistence.Journal.IAsyncRecovery - { - protected readonly bool CanPublish; - protected AsyncWriteJournal() { } - protected abstract System.Threading.Tasks.Task DeleteMessagesToAsync(string persistenceId, long toSequenceNr); - public abstract System.Threading.Tasks.Task ReadHighestSequenceNrAsync(string persistenceId, long fromSequenceNr); - protected virtual bool Receive(object message) { } - protected virtual bool ReceivePluginInternal(object message) { } - protected bool ReceiveWriteJournal(object message) { } - public abstract System.Threading.Tasks.Task ReplayMessagesAsync(Akka.Actor.IActorContext context, string persistenceId, long fromSequenceNr, long toSequenceNr, long max, System.Action recoveryCallback); - protected static System.Exception TryUnwrapException(System.Exception e) { } - protected abstract System.Threading.Tasks.Task> WriteMessagesAsync(System.Collections.Generic.IEnumerable messages); - } - public abstract class AsyncWriteProxy : Akka.Persistence.Journal.AsyncWriteJournal, Akka.Actor.IActorStash, Akka.Actor.IWithUnboundedStash, Akka.Actor.IWithUnrestrictedStash, Akka.Dispatch.IRequiresMessageQueue - { - protected AsyncWriteProxy() { } - public Akka.Actor.IStash Stash { get; set; } - public abstract System.TimeSpan Timeout { get; } - public override void AroundPreStart() { } - protected override bool AroundReceive(Akka.Actor.Receive receive, object message) { } - protected override System.Threading.Tasks.Task DeleteMessagesToAsync(string persistenceId, long toSequenceNr) { } - public override System.Threading.Tasks.Task ReadHighestSequenceNrAsync(string persistenceId, long fromSequenceNr) { } - public override System.Threading.Tasks.Task ReplayMessagesAsync(Akka.Actor.IActorContext context, string persistenceId, long fromSequenceNr, long toSequenceNr, long max, System.Action recoveryCallback) { } - protected override System.Threading.Tasks.Task> WriteMessagesAsync(System.Collections.Generic.IEnumerable messages) { } - public class InitTimeout - { - public static Akka.Persistence.Journal.AsyncWriteProxy.InitTimeout Instance { get; } - } - } - public class static AsyncWriteTarget - { - public sealed class DeleteMessagesTo : System.IEquatable - { - public DeleteMessagesTo(string persistenceId, long toSequenceNr) { } - public string PersistenceId { get; } - public long ToSequenceNr { get; } - public bool Equals(Akka.Persistence.Journal.AsyncWriteTarget.DeleteMessagesTo other) { } - } - public sealed class ReplayFailure - { - public ReplayFailure(System.Exception cause) { } - public System.Exception Cause { get; } - } - public sealed class ReplayMessages : System.IEquatable - { - public ReplayMessages(string persistenceId, long fromSequenceNr, long toSequenceNr, long max) { } - public long FromSequenceNr { get; } - public long Max { get; } - public string PersistenceId { get; } - public long ToSequenceNr { get; } - public bool Equals(Akka.Persistence.Journal.AsyncWriteTarget.ReplayMessages other) { } - } - public sealed class ReplaySuccess : System.IEquatable - { - public ReplaySuccess(long highestSequenceNr) { } - public long HighestSequenceNr { get; } - public bool Equals(Akka.Persistence.Journal.AsyncWriteTarget.ReplaySuccess other) { } - } - public sealed class WriteMessages - { - public WriteMessages(System.Collections.Generic.IEnumerable messages) { } - public Akka.Persistence.AtomicWrite[] Messages { get; } - } - } - public sealed class CombinedReadEventAdapter : Akka.Persistence.Journal.IEventAdapter, Akka.Persistence.Journal.IReadEventAdapter, Akka.Persistence.Journal.IWriteEventAdapter - { - public CombinedReadEventAdapter(System.Collections.Generic.IEnumerable adapters) { } - public System.Collections.Generic.IEnumerable Adapters { get; } - public Akka.Persistence.Journal.IEventSequence FromJournal(object evt, string manifest) { } - public string Manifest(object evt) { } - public object ToJournal(object evt) { } - } - public sealed class EmptyEventSequence : Akka.Persistence.Journal.IEmptyEventSequence, Akka.Persistence.Journal.IEventSequence, System.IEquatable - { - public static readonly Akka.Persistence.Journal.EmptyEventSequence Instance; - public System.Collections.Generic.IEnumerable Events { get; } - public bool Equals(Akka.Persistence.Journal.IEventSequence other) { } - public override bool Equals(object obj) { } - } - public class EventAdapters - { - protected EventAdapters(System.Collections.Concurrent.ConcurrentDictionary map, System.Collections.Generic.IEnumerable> bindings, Akka.Event.ILoggingAdapter log) { } - public static Akka.Persistence.Journal.EventAdapters Create(Akka.Actor.ExtendedActorSystem system, Akka.Configuration.Config config) { } - public Akka.Persistence.Journal.IEventAdapter Get() { } - public virtual Akka.Persistence.Journal.IEventAdapter Get(System.Type type) { } - } - public class static EventSequence - { - public static Akka.Persistence.Journal.IEventSequence Empty; - public static Akka.Persistence.Journal.IEventSequence Create(params object[] events) { } - public static Akka.Persistence.Journal.IEventSequence Create(System.Collections.Generic.IEnumerable events) { } - public static Akka.Persistence.Journal.IEventSequence Single(object e) { } - } - public class EventSequence : Akka.Persistence.Journal.IEventSequence, System.IEquatable - { - public EventSequence(System.Collections.Generic.IEnumerable events) { } - public System.Collections.Generic.IEnumerable Events { get; } - public bool Equals(Akka.Persistence.Journal.IEventSequence other) { } - public override bool Equals(object obj) { } - } - public interface IAsyncRecovery - { - System.Threading.Tasks.Task ReadHighestSequenceNrAsync(string persistenceId, long fromSequenceNr); - System.Threading.Tasks.Task ReplayMessagesAsync(Akka.Actor.IActorContext context, string persistenceId, long fromSequenceNr, long toSequenceNr, long max, System.Action recoveryCallback); - } - public interface IEmptyEventSequence : Akka.Persistence.Journal.IEventSequence { } - public interface IEventAdapter : Akka.Persistence.Journal.IReadEventAdapter, Akka.Persistence.Journal.IWriteEventAdapter { } - public interface IEventSequence - { - System.Collections.Generic.IEnumerable Events { get; } - } - public interface IMemoryMessages - { - System.Collections.Generic.IDictionary> Add(Akka.Persistence.IPersistentRepresentation persistent); - System.Collections.Generic.IDictionary> Delete(string pid, long seqNr); - long HighestSequenceNr(string pid); - System.Collections.Generic.IEnumerable Read(string pid, long fromSeqNr, long toSeqNr, long max); - System.Collections.Generic.IDictionary> Update(string pid, long seqNr, System.Func updater); - } - public interface IReadEventAdapter - { - Akka.Persistence.Journal.IEventSequence FromJournal(object evt, string manifest); - } - public interface IWriteEventAdapter - { - string Manifest(object evt); - object ToJournal(object evt); - } - public sealed class IdentityEventAdapter : Akka.Persistence.Journal.IEventAdapter, Akka.Persistence.Journal.IReadEventAdapter, Akka.Persistence.Journal.IWriteEventAdapter - { - public static Akka.Persistence.Journal.IdentityEventAdapter Instance { get; } - public Akka.Persistence.Journal.IEventSequence FromJournal(object evt, string manifest) { } - public string Manifest(object evt) { } - public object ToJournal(object evt) { } - } - public class MemoryJournal : Akka.Persistence.Journal.AsyncWriteJournal - { - public MemoryJournal() { } - protected virtual System.Collections.Concurrent.ConcurrentDictionary> Messages { get; } - public System.Collections.Generic.IDictionary> Add(Akka.Persistence.IPersistentRepresentation persistent) { } - public System.Collections.Generic.IDictionary> Delete(string pid, long seqNr) { } - protected override System.Threading.Tasks.Task DeleteMessagesToAsync(string persistenceId, long toSequenceNr) { } - public long HighestSequenceNr(string pid) { } - public System.Collections.Generic.IEnumerable Read(string pid, long fromSeqNr, long toSeqNr, long max) { } - public override System.Threading.Tasks.Task ReadHighestSequenceNrAsync(string persistenceId, long fromSequenceNr) { } - protected override bool ReceivePluginInternal(object message) { } - public override System.Threading.Tasks.Task ReplayMessagesAsync(Akka.Actor.IActorContext context, string persistenceId, long fromSequenceNr, long toSequenceNr, long max, System.Action recoveryCallback) { } - public System.Collections.Generic.IDictionary> Update(string pid, long seqNr, System.Func updater) { } - protected override System.Threading.Tasks.Task> WriteMessagesAsync(System.Collections.Generic.IEnumerable messages) { } - public sealed class CurrentPersistenceIds : Akka.Event.IDeadLetterSuppression - { - public readonly System.Collections.Generic.IEnumerable AllPersistenceIds; - public readonly int HighestOrderingNumber; - public CurrentPersistenceIds(System.Collections.Generic.IEnumerable allPersistenceIds, int highestOrderingNumber) { } - } - public sealed class EventReplayFailure - { - public EventReplayFailure(System.Exception cause) { } - public System.Exception Cause { get; } - public bool Equals(Akka.Persistence.Journal.MemoryJournal.EventReplayFailure other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class EventReplaySuccess - { - public EventReplaySuccess(int highestSequenceNr) { } - public int HighestSequenceNr { get; } - public bool Equals(Akka.Persistence.Journal.MemoryJournal.EventReplaySuccess other) { } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - public override string ToString() { } - } - public sealed class ReplayAllEvents : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalRequest, Akka.Persistence.IPersistenceMessage - { - public readonly int FromOffset; - public readonly long Max; - public readonly Akka.Actor.IActorRef ReplyTo; - public readonly int ToOffset; - public ReplayAllEvents(int fromOffset, int toOffset, long max, Akka.Actor.IActorRef replyTo) { } - } - public sealed class ReplayTaggedMessages : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalRequest, Akka.Persistence.IPersistenceMessage - { - public readonly int FromOffset; - public readonly int Max; - public readonly Akka.Actor.IActorRef ReplyTo; - public readonly string Tag; - public readonly int ToOffset; - public ReplayTaggedMessages(int fromOffset, int toOffset, int max, string tag, Akka.Actor.IActorRef replyTo) { } - } - public sealed class ReplayTaggedMessagesSuccess - { - public ReplayTaggedMessagesSuccess(int highestSequenceNr) { } - public int HighestSequenceNr { get; } - } - public sealed class ReplayedEvent : Akka.Actor.INoSerializationVerificationNeeded, Akka.Event.IDeadLetterSuppression - { - public readonly int Offset; - public readonly Akka.Persistence.IPersistentRepresentation Persistent; - public ReplayedEvent(Akka.Persistence.IPersistentRepresentation persistent, int offset) { } - } - public sealed class ReplayedTaggedMessage : Akka.Actor.INoSerializationVerificationNeeded, Akka.Event.IDeadLetterSuppression - { - public readonly int Offset; - public readonly Akka.Persistence.IPersistentRepresentation Persistent; - public readonly string Tag; - public ReplayedTaggedMessage(Akka.Persistence.IPersistentRepresentation persistent, string tag, int offset) { } - } - public sealed class SelectCurrentPersistenceIds : Akka.Actor.INoSerializationVerificationNeeded, Akka.Persistence.IJournalMessage, Akka.Persistence.IJournalRequest, Akka.Persistence.IPersistenceMessage - { - public SelectCurrentPersistenceIds(int offset, Akka.Actor.IActorRef replyTo) { } - public int Offset { get; } - public Akka.Actor.IActorRef ReplyTo { get; } - } - } - public class PersistencePluginProxy : Akka.Actor.ActorBase, Akka.Actor.IActorStash, Akka.Actor.IWithUnboundedStash, Akka.Actor.IWithUnrestrictedStash, Akka.Dispatch.IRequiresMessageQueue - { - public PersistencePluginProxy(Akka.Configuration.Config config) { } - public Akka.Actor.IStash Stash { get; set; } - protected override void PreStart() { } - protected override bool Receive(object message) { } - public static void SetTargetLocation(Akka.Actor.ActorSystem system, Akka.Actor.Address address) { } - public static void Start(Akka.Actor.ActorSystem system) { } - public sealed class TargetLocation - { - public TargetLocation(Akka.Actor.Address address) { } - public Akka.Actor.Address Address { get; } - } - } - public class PersistencePluginProxyExtension : Akka.Actor.ExtensionIdProvider, Akka.Actor.IExtension - { - public PersistencePluginProxyExtension(Akka.Actor.ActorSystem system) { } - public override Akka.Persistence.Journal.PersistencePluginProxyExtension CreateExtension(Akka.Actor.ExtendedActorSystem system) { } - } - public class ReplayFilter : Akka.Actor.ActorBase - { - public ReplayFilter(Akka.Actor.IActorRef persistentActor, Akka.Persistence.Journal.ReplayFilterMode mode, int windowSize, int maxOldWriters, bool debugEnabled) { } - public bool DebugEnabled { get; } - public int MaxOldWriters { get; } - public Akka.Persistence.Journal.ReplayFilterMode Mode { get; } - public Akka.Actor.IActorRef PersistentActor { get; } - public int WindowSize { get; } - public static Akka.Actor.Props Props(Akka.Actor.IActorRef persistentActor, Akka.Persistence.Journal.ReplayFilterMode mode, int windowSize, int maxOldWriters, bool debugEnabled) { } - protected override bool Receive(object message) { } - } - public enum ReplayFilterMode - { - Fail = 0, - Warn = 1, - RepairByDiscardOld = 2, - Disabled = 3, - } - public sealed class SetStore - { - public readonly Akka.Actor.IActorRef Store; - public SetStore(Akka.Actor.IActorRef store) { } - } - public class SharedMemoryJournal : Akka.Persistence.Journal.MemoryJournal - { - public SharedMemoryJournal() { } - protected override System.Collections.Concurrent.ConcurrentDictionary> Messages { get; } - } - public struct SingleEventSequence : Akka.Persistence.Journal.IEventSequence, System.IEquatable - { - public SingleEventSequence(object e) { } - public System.Collections.Generic.IEnumerable Events { get; } - public bool Equals(Akka.Persistence.Journal.IEventSequence other) { } - public override bool Equals(object obj) { } - } - public struct Tagged - { - public Tagged(object payload, System.Collections.Generic.IEnumerable tags) { } - public Tagged(object payload, System.Collections.Immutable.IImmutableSet tags) { } - public object Payload { get; } - public System.Collections.Immutable.IImmutableSet Tags { get; } - } - public abstract class WriteJournalBase : Akka.Actor.ActorBase - { - protected WriteJournalBase() { } - [Akka.Annotations.InternalApiAttribute()] - protected System.Collections.Generic.IEnumerable AdaptFromJournal(Akka.Persistence.IPersistentRepresentation representation) { } - protected Akka.Persistence.IPersistentRepresentation AdaptToJournal(Akka.Persistence.IPersistentRepresentation representation) { } - protected System.Collections.Generic.IEnumerable PreparePersistentBatch(System.Collections.Generic.IEnumerable resequenceables) { } - } -} -namespace Akka.Persistence.Serialization -{ - public interface IMessage { } - public sealed class PersistenceMessageSerializer : Akka.Serialization.Serializer - { - public PersistenceMessageSerializer(Akka.Actor.ExtendedActorSystem system) { } - public override bool IncludeManifest { get; } - public override object FromBinary(byte[] bytes, System.Type type) { } - public override byte[] ToBinary(object obj) { } - } - public class PersistenceSnapshotSerializer : Akka.Serialization.Serializer - { - public PersistenceSnapshotSerializer(Akka.Actor.ExtendedActorSystem system) { } - public override bool IncludeManifest { get; } - public override object FromBinary(byte[] bytes, System.Type type) { } - public override byte[] ToBinary(object obj) { } - } - public sealed class Snapshot - { - public Snapshot(object data) { } - public object Data { get; } - public override bool Equals(object obj) { } - public override int GetHashCode() { } - } -} -namespace Akka.Persistence.Snapshot -{ - public class LocalSnapshotStore : Akka.Persistence.Snapshot.SnapshotStore - { - public LocalSnapshotStore() { } - protected override System.Threading.Tasks.Task DeleteAsync(Akka.Persistence.SnapshotMetadata metadata) { } - protected override System.Threading.Tasks.Task DeleteAsync(string persistenceId, Akka.Persistence.SnapshotSelectionCriteria criteria) { } - protected System.IO.FileInfo GetSnapshotFileForWrite(Akka.Persistence.SnapshotMetadata metadata, string extension = "") { } - protected override System.Threading.Tasks.Task LoadAsync(string persistenceId, Akka.Persistence.SnapshotSelectionCriteria criteria) { } - protected override void PreStart() { } - protected override bool ReceivePluginInternal(object message) { } - protected virtual void Save(Akka.Persistence.SnapshotMetadata metadata, object snapshot) { } - protected override System.Threading.Tasks.Task SaveAsync(Akka.Persistence.SnapshotMetadata metadata, object snapshot) { } - protected void Serialize(System.IO.Stream stream, Akka.Persistence.Serialization.Snapshot snapshot) { } - protected System.IO.FileInfo WithOutputStream(Akka.Persistence.SnapshotMetadata metadata, System.Action p) { } - } - public class MemorySnapshotStore : Akka.Persistence.Snapshot.SnapshotStore - { - public MemorySnapshotStore() { } - protected virtual System.Collections.Generic.List Snapshots { get; } - protected override System.Threading.Tasks.Task DeleteAsync(Akka.Persistence.SnapshotMetadata metadata) { } - protected override System.Threading.Tasks.Task DeleteAsync(string persistenceId, Akka.Persistence.SnapshotSelectionCriteria criteria) { } - protected override System.Threading.Tasks.Task LoadAsync(string persistenceId, Akka.Persistence.SnapshotSelectionCriteria criteria) { } - protected override System.Threading.Tasks.Task SaveAsync(Akka.Persistence.SnapshotMetadata metadata, object snapshot) { } - } - public sealed class NoSnapshotStore : Akka.Persistence.Snapshot.SnapshotStore - { - public NoSnapshotStore() { } - protected override System.Threading.Tasks.Task DeleteAsync(Akka.Persistence.SnapshotMetadata metadata) { } - protected override System.Threading.Tasks.Task DeleteAsync(string persistenceId, Akka.Persistence.SnapshotSelectionCriteria criteria) { } - protected override System.Threading.Tasks.Task LoadAsync(string persistenceId, Akka.Persistence.SnapshotSelectionCriteria criteria) { } - protected override System.Threading.Tasks.Task SaveAsync(Akka.Persistence.SnapshotMetadata metadata, object snapshot) { } - public class NoSnapshotStoreException : System.Exception - { - public NoSnapshotStoreException() { } - public NoSnapshotStoreException(string message) { } - public NoSnapshotStoreException(string message, System.Exception innerException) { } - protected NoSnapshotStoreException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } - } - } - public class SnapshotEntry - { - public SnapshotEntry() { } - public string Id { get; set; } - public string PersistenceId { get; set; } - public long SequenceNr { get; set; } - public object Snapshot { get; set; } - public long Timestamp { get; set; } - } - public abstract class SnapshotStore : Akka.Actor.ActorBase - { - protected SnapshotStore() { } - protected abstract System.Threading.Tasks.Task DeleteAsync(Akka.Persistence.SnapshotMetadata metadata); - protected abstract System.Threading.Tasks.Task DeleteAsync(string persistenceId, Akka.Persistence.SnapshotSelectionCriteria criteria); - protected abstract System.Threading.Tasks.Task LoadAsync(string persistenceId, Akka.Persistence.SnapshotSelectionCriteria criteria); - protected virtual bool Receive(object message) { } - protected virtual bool ReceivePluginInternal(object message) { } - protected abstract System.Threading.Tasks.Task SaveAsync(Akka.Persistence.SnapshotMetadata metadata, object snapshot); - } -} \ No newline at end of file diff --git a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApprovePersistence.DotNet.verified.txt b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApprovePersistence.DotNet.verified.txt index c00feeb031f..06fd3dfef94 100644 --- a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApprovePersistence.DotNet.verified.txt +++ b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApprovePersistence.DotNet.verified.txt @@ -1059,7 +1059,7 @@ namespace Akka.Persistence.Journal protected virtual System.Collections.Generic.Dictionary DeletedTo { get; } protected virtual System.Collections.Generic.List EventLog { get; } protected virtual System.Collections.Generic.Dictionary> EventsByPersistenceId { get; } - protected virtual System.Threading.ReaderWriterLockSlim Lock { get; } + protected virtual object Lock { get; } public System.Collections.Generic.IDictionary> Add(Akka.Persistence.IPersistentRepresentation persistent) { } public System.Collections.Generic.IDictionary> Delete(string pid, long seqNr) { } protected override System.Threading.Tasks.Task DeleteMessagesToAsync(string persistenceId, long toSequenceNr, System.Threading.CancellationToken cancellationToken) { } @@ -1185,7 +1185,7 @@ namespace Akka.Persistence.Journal protected override System.Collections.Generic.Dictionary DeletedTo { get; } protected override System.Collections.Generic.List EventLog { get; } protected override System.Collections.Generic.Dictionary> EventsByPersistenceId { get; } - protected override System.Threading.ReaderWriterLockSlim Lock { get; } + protected override object Lock { get; } } public struct SingleEventSequence : Akka.Persistence.Journal.IEventSequence, System.IEquatable { diff --git a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApprovePersistence.Net.verified.txt b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApprovePersistence.Net.verified.txt index b6eb71055f4..c794e9c34d9 100644 --- a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApprovePersistence.Net.verified.txt +++ b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApprovePersistence.Net.verified.txt @@ -1058,7 +1058,7 @@ namespace Akka.Persistence.Journal protected virtual System.Collections.Generic.Dictionary DeletedTo { get; } protected virtual System.Collections.Generic.List EventLog { get; } protected virtual System.Collections.Generic.Dictionary> EventsByPersistenceId { get; } - protected virtual System.Threading.ReaderWriterLockSlim Lock { get; } + protected virtual object Lock { get; } public System.Collections.Generic.IDictionary> Add(Akka.Persistence.IPersistentRepresentation persistent) { } public System.Collections.Generic.IDictionary> Delete(string pid, long seqNr) { } protected override System.Threading.Tasks.Task DeleteMessagesToAsync(string persistenceId, long toSequenceNr, System.Threading.CancellationToken cancellationToken) { } @@ -1184,7 +1184,7 @@ namespace Akka.Persistence.Journal protected override System.Collections.Generic.Dictionary DeletedTo { get; } protected override System.Collections.Generic.List EventLog { get; } protected override System.Collections.Generic.Dictionary> EventsByPersistenceId { get; } - protected override System.Threading.ReaderWriterLockSlim Lock { get; } + protected override object Lock { get; } } public struct SingleEventSequence : Akka.Persistence.Journal.IEventSequence, System.IEquatable { diff --git a/src/core/Akka.Persistence.TCK/Query/TestActor.cs b/src/core/Akka.Persistence.TCK/Query/TestActor.cs index 336f4ec72e2..2144b157e28 100644 --- a/src/core/Akka.Persistence.TCK/Query/TestActor.cs +++ b/src/core/Akka.Persistence.TCK/Query/TestActor.cs @@ -34,12 +34,20 @@ public TestActor(string persistenceId) public override string PersistenceId { get; } + protected override void PreStart() + { + Log.Debug("[DIAG-ACTOR] TestActor {0} PreStart called", PersistenceId); + base.PreStart(); + } + protected override void OnRecover(object message) { + Log.Debug("[DIAG-ACTOR] TestActor {0} OnRecover: {1}", PersistenceId, message); } protected override void OnCommand(object message) { + Log.Debug("[DIAG-ACTOR] TestActor {0} OnCommand received: {1}", PersistenceId, message); switch (message) { case DeleteCommand delete: @@ -47,8 +55,14 @@ protected override void OnCommand(object message) Become(WhileDeleting(Sender)); // need to wait for delete ACK to return break; case string cmd: + Log.Debug("[DIAG-ACTOR] TestActor {0} calling Persist for: {1}", PersistenceId, cmd); var sender = Sender; - Persist(cmd, e => sender.Tell($"{e}-done")); + Persist(cmd, e => + { + Log.Debug("[DIAG-ACTOR] TestActor {0} Persist callback executing for: {1}", PersistenceId, e); + sender.Tell($"{e}-done"); + }); + Log.Debug("[DIAG-ACTOR] TestActor {0} Persist call returned for: {1}", PersistenceId, cmd); break; } } diff --git a/src/core/Akka.Persistence/Journal/AsyncWriteJournal.cs b/src/core/Akka.Persistence/Journal/AsyncWriteJournal.cs index 4939d2cd342..f195ae4fdc4 100644 --- a/src/core/Akka.Persistence/Journal/AsyncWriteJournal.cs +++ b/src/core/Akka.Persistence/Journal/AsyncWriteJournal.cs @@ -391,8 +391,10 @@ private async Task ExecuteBatch(WriteMessages message, int atomicWriteCount, IAc // try in case AsyncWriteMessages throws try { + // NOTE: Not using ConfigureAwait(false) to ensure continuation runs on actor's dispatcher thread + // This ensures proper synchronization context and avoids timing issues with lock contention var writeResult = - await _breaker.WithCircuitBreaker((prepared, awj: this), (state, ct) => state.awj.WriteMessagesAsync(state.prepared, ct)).ConfigureAwait(false); + await _breaker.WithCircuitBreaker((prepared, awj: this), (state, ct) => state.awj.WriteMessagesAsync(state.prepared, ct)); ProcessResults(writeResult, atomicWriteCount, message, _resequencer, resequencerCounter, self); } diff --git a/src/core/Akka.Persistence/Journal/MemoryJournal.cs b/src/core/Akka.Persistence/Journal/MemoryJournal.cs index c56bec84c2d..b9654f35e51 100644 --- a/src/core/Akka.Persistence/Journal/MemoryJournal.cs +++ b/src/core/Akka.Persistence/Journal/MemoryJournal.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; +using System.Diagnostics; using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -33,120 +34,129 @@ public class MemoryJournal : AsyncWriteJournal /// private readonly Dictionary> _eventsByPersistenceId = new(); - private readonly ReaderWriterLockSlim _lock = new(LockRecursionPolicy.NoRecursion); + private readonly object _lock = new(); private readonly Dictionary _deletedTo = new(); + private ILoggingAdapter _log = Context.GetLogger(); + protected virtual List EventLog => _eventLog; protected virtual Dictionary> EventsByPersistenceId => _eventsByPersistenceId; - protected virtual ReaderWriterLockSlim Lock => _lock; + protected virtual object Lock => _lock; protected virtual Dictionary DeletedTo => _deletedTo; protected override Task> WriteMessagesAsync(IEnumerable messages, CancellationToken cancellationToken) { - Lock.EnterWriteLock(); - try + return Task.Run(() => { - foreach (var w in messages) - { - foreach (var p in (IEnumerable)w.Payload) - { - var persistentRepresentation = p.WithTimestamp(DateTime.UtcNow.Ticks); + var waitStartTime = Stopwatch.GetTimestamp(); + var threadId = Environment.CurrentManagedThreadId; - // Maintain both indexes on write - EventLog.Add(persistentRepresentation); + // Safe to use cached logger from thread pool thread since it was initialized on actor thread + _log.Debug("[DIAG] WriteMessagesAsync called on thread {0}, attempting to acquire lock", threadId); - if (!EventsByPersistenceId.TryGetValue(persistentRepresentation.PersistenceId, out var pidEvents)) + lock (Lock) + { + var lockAcquiredTime = Stopwatch.GetTimestamp(); + var waitTimeMs = (lockAcquiredTime - waitStartTime) * 1000.0 / Stopwatch.Frequency; + _log.Debug("[DIAG] Lock acquired after {0:F2}ms on thread {1}", waitTimeMs, threadId); + + foreach (var w in messages) + { + foreach (var p in (IEnumerable)w.Payload) { - pidEvents = new List(); - EventsByPersistenceId[persistentRepresentation.PersistenceId] = pidEvents; + var persistentRepresentation = p.WithTimestamp(DateTime.UtcNow.Ticks); + + // Maintain both indexes on write + EventLog.Add(persistentRepresentation); + + if (!EventsByPersistenceId.TryGetValue(persistentRepresentation.PersistenceId, out var pidEvents)) + { + pidEvents = new List(); + EventsByPersistenceId[persistentRepresentation.PersistenceId] = pidEvents; + } + pidEvents.Add(persistentRepresentation); + + _log.Debug("[DIAG] Wrote event for {0}, seq {1}, total events in log: {2}", + persistentRepresentation.PersistenceId, + persistentRepresentation.SequenceNr, + EventLog.Count); } - pidEvents.Add(persistentRepresentation); } + + var lockReleasedTime = Stopwatch.GetTimestamp(); + var holdTimeMs = (lockReleasedTime - lockAcquiredTime) * 1000.0 / Stopwatch.Frequency; + _log.Debug("[DIAG] Lock released after holding for {0:F2}ms on thread {1}", holdTimeMs, threadId); } - } - finally - { - Lock.ExitWriteLock(); - } - return Task.FromResult>(null); + return (IImmutableList)null; + }, cancellationToken); } public override Task ReadHighestSequenceNrAsync(string persistenceId, long fromSequenceNr, CancellationToken cancellationToken) { - Lock.EnterReadLock(); - try + return Task.Run(() => { - // Use index for O(1) lookup instead of O(n) scan - if (!EventsByPersistenceId.TryGetValue(persistenceId, out var events) || events.Count == 0) - return Task.FromResult(0L); + lock (Lock) + { + // Use index for O(1) lookup instead of O(n) scan + if (!EventsByPersistenceId.TryGetValue(persistenceId, out var events) || events.Count == 0) + return 0L; - var highest = events[events.Count - 1].SequenceNr; + var highest = events[events.Count - 1].SequenceNr; - // Return actual highest sequence number from journal - // Deletion is logical only - events remain in index - return Task.FromResult(highest); - } - finally - { - Lock.ExitReadLock(); - } + // Return actual highest sequence number from journal + // Deletion is logical only - events remain in index + return highest; + } + }, cancellationToken); } public override Task ReplayMessagesAsync(IActorContext context, string persistenceId, long fromSequenceNr, long toSequenceNr, long max, Action recoveryCallback) { - IPersistentRepresentation[] messages; - - Lock.EnterReadLock(); - try + return Task.Run(() => { - // Use index for O(events_for_entity) instead of O(total_events) - if (!EventsByPersistenceId.TryGetValue(persistenceId, out var pidEvents)) + IPersistentRepresentation[] messages; + + lock (Lock) { - messages = Array.Empty(); + // Use index for O(events_for_entity) instead of O(total_events) + if (!EventsByPersistenceId.TryGetValue(persistenceId, out var pidEvents)) + { + messages = Array.Empty(); + } + else + { + var deletedToSeq = DeletedTo.GetValueOrDefault(persistenceId, 0L); + + messages = pidEvents + .Where(e => e.SequenceNr > deletedToSeq // Skip deleted messages + && e.SequenceNr >= fromSequenceNr + && e.SequenceNr <= toSequenceNr) + .Take(max > int.MaxValue ? int.MaxValue : (int)max) + .ToArray(); + } } - else - { - var deletedToSeq = DeletedTo.GetValueOrDefault(persistenceId, 0L); - messages = pidEvents - .Where(e => e.SequenceNr > deletedToSeq // Skip deleted messages - && e.SequenceNr >= fromSequenceNr - && e.SequenceNr <= toSequenceNr) - .Take(max > int.MaxValue ? int.MaxValue : (int)max) - .ToArray(); + // Execute callbacks outside the lock to avoid potential deadlocks + foreach (var message in messages) + { + recoveryCallback(message); } - } - finally - { - Lock.ExitReadLock(); - } - - // Execute callbacks outside the lock to avoid potential deadlocks - foreach (var message in messages) - { - recoveryCallback(message); - } - - return Task.CompletedTask; + }); } protected override Task DeleteMessagesToAsync(string persistenceId, long toSequenceNr, CancellationToken cancellationToken) { - Lock.EnterWriteLock(); - try - { - // Track deletion marker instead of actually removing events - // This is simpler and matches the semantics (logical deletion) - DeletedTo[persistenceId] = toSequenceNr; - } - finally + return Task.Run(() => { - Lock.ExitWriteLock(); - } - - return Task.CompletedTask; + lock (Lock) + { + // Track deletion marker instead of actually removing events + // This is simpler and matches the semantics (logical deletion) + DeletedTo[persistenceId] = toSequenceNr; + } + }, cancellationToken); } /// @@ -154,8 +164,7 @@ protected override Task DeleteMessagesToAsync(string persistenceId, long toSeque /// public IDictionary> Add(IPersistentRepresentation persistent) { - Lock.EnterWriteLock(); - try + lock (Lock) { var timestamped = persistent.WithTimestamp(DateTime.UtcNow.Ticks); @@ -168,24 +177,12 @@ public IDictionary> Add(IPersisten EventsByPersistenceId[timestamped.PersistenceId] = pidEvents; } pidEvents.Add(timestamped); - } - finally - { - Lock.ExitWriteLock(); - } - // Return view of all messages as LinkedList per persistence ID for API compatibility - Lock.EnterReadLock(); - try - { + // Return view of all messages as LinkedList per persistence ID for API compatibility return EventsByPersistenceId.ToDictionary( kvp => kvp.Key, kvp => new LinkedList(kvp.Value)); } - finally - { - Lock.ExitReadLock(); - } } /// @@ -194,31 +191,18 @@ public IDictionary> Add(IPersisten /// public IDictionary> Delete(string pid, long seqNr) { - Lock.EnterWriteLock(); - try + lock (Lock) { var currentDeleted = DeletedTo.GetValueOrDefault(pid, 0L); DeletedTo[pid] = Math.Max(currentDeleted, seqNr); - } - finally - { - Lock.ExitWriteLock(); - } - // Return view of non-deleted messages as LinkedList per persistence ID for API compatibility - // Use index instead of scanning entire event log - Lock.EnterReadLock(); - try - { + // Return view of non-deleted messages as LinkedList per persistence ID for API compatibility + // Use index instead of scanning entire event log return EventsByPersistenceId.ToDictionary( kvp => kvp.Key, kvp => new LinkedList( kvp.Value.Where(e => e.SequenceNr > DeletedTo.GetValueOrDefault(kvp.Key, 0L)))); } - finally - { - Lock.ExitReadLock(); - } } /// @@ -226,8 +210,7 @@ public IDictionary> Delete(string /// public IEnumerable Read(string pid, long from, long to, long max) { - Lock.EnterReadLock(); - try + lock (Lock) { // Use index for O(events_for_entity) instead of O(total_events) if (!EventsByPersistenceId.TryGetValue(pid, out var pidEvents)) @@ -242,10 +225,6 @@ public IEnumerable Read(string pid, long from, long t .Take(max > int.MaxValue ? int.MaxValue : (int)max) .ToArray(); // Materialize under lock } - finally - { - Lock.ExitReadLock(); - } } /// @@ -253,8 +232,7 @@ public IEnumerable Read(string pid, long from, long t /// public long HighestSequenceNr(string pid) { - Lock.EnterReadLock(); - try + lock (Lock) { // Use index for O(1) lookup instead of O(n) scan if (!EventsByPersistenceId.TryGetValue(pid, out var events) || events.Count == 0) @@ -264,10 +242,6 @@ public long HighestSequenceNr(string pid) // Deletion is logical only - events remain in index return events[events.Count - 1].SequenceNr; } - finally - { - Lock.ExitReadLock(); - } } protected override bool ReceivePluginInternal(object message) @@ -275,16 +249,21 @@ protected override bool ReceivePluginInternal(object message) switch (message) { case SelectCurrentPersistenceIds request: + Context.GetLogger().Debug("[DIAG] Received SelectCurrentPersistenceIds from {0}", request.ReplyTo); SelectAllPersistenceIdsAsync(request.Offset) .PipeTo(request.ReplyTo, success: result => new CurrentPersistenceIds(result.Item1, result.LastOrdering)); return true; case ReplayTaggedMessages replay: + Context.GetLogger().Debug("[DIAG] Received ReplayTaggedMessages for tag '{0}', fromOffset={1}, max={2}, toOffset={3}, replyTo={4}", + replay.Tag, replay.FromOffset, replay.Max, replay.ToOffset, replay.ReplyTo); ReplayTaggedMessagesAsync(replay) .PipeTo(replay.ReplyTo, success: h => new ReplayTaggedMessagesSuccess(h), failure: e => new ReplayMessagesFailure(e)); return true; case ReplayAllEvents replay: + Context.GetLogger().Debug("[DIAG] Received ReplayAllEvents fromOffset={0}, max={1}, replyTo={2}", + replay.FromOffset, replay.Max, replay.ReplyTo); ReplayAllEventsAsync(replay) .PipeTo(replay.ReplyTo, success: h => new EventReplaySuccess(h), failure: e => new EventReplayFailure(e)); @@ -300,16 +279,11 @@ protected override bool ReceivePluginInternal(object message) HashSet ids; int count; - Lock.EnterReadLock(); - try + lock (Lock) { ids = new HashSet(EventLog.Skip(offset).Select(p => p.PersistenceId)); count = EventLog.Count; } - finally - { - Lock.ExitReadLock(); - } return Task.FromResult<(IEnumerable Ids, int LastOrdering)>((ids, count)); } @@ -319,66 +293,78 @@ protected override bool ReceivePluginInternal(object message) /// private Task ReplayTaggedMessagesAsync(ReplayTaggedMessages replay) { - IPersistentRepresentation[] snapshot; - int count; - - Lock.EnterReadLock(); - try - { - // Scan for events with matching tag - snapshot = EventLog - .Where(e => e.Payload is Tagged tagged && tagged.Tags.Contains(replay.Tag)) - .Skip(replay.FromOffset) - .Take(replay.Max) - .ToArray(); - - count = EventLog.Count(e => e.Payload is Tagged tagged && tagged.Tags.Contains(replay.Tag)); - } - finally + return Task.Run(() => { - Lock.ExitReadLock(); - } + var waitStartTime = Stopwatch.GetTimestamp(); + var threadId = Environment.CurrentManagedThreadId; - // Send messages outside the lock to avoid potential deadlocks - var index = 0; - foreach (var persistence in snapshot) - { - replay.ReplyTo.Tell(new ReplayedTaggedMessage(persistence, replay.Tag, replay.FromOffset + index), ActorRefs.NoSender); - index++; - } + // Safe to use cached logger from thread pool thread since it was initialized on actor thread + _log.Debug("[DIAG] ReplayTaggedMessagesAsync starting for tag '{0}' on thread {1}, attempting to acquire lock", replay.Tag, threadId); - return Task.FromResult(count - 1); + IPersistentRepresentation[] snapshot; + int count; + + lock (Lock) + { + var lockAcquiredTime = Stopwatch.GetTimestamp(); + var waitTimeMs = (lockAcquiredTime - waitStartTime) * 1000.0 / Stopwatch.Frequency; + _log.Debug("[DIAG] ReplayTaggedMessages lock acquired after {0:F2}ms on thread {1}", waitTimeMs, threadId); + + // Scan for events with matching tag + snapshot = EventLog + .Where(e => e.Payload is Tagged tagged && tagged.Tags.Contains(replay.Tag)) + .Skip(replay.FromOffset) + .Take(replay.Max) + .ToArray(); + + count = EventLog.Count(e => e.Payload is Tagged tagged && tagged.Tags.Contains(replay.Tag)); + + _log.Debug("[DIAG] Found {0} events matching tag '{1}', total tagged events: {2}, EventLog size: {3}", + snapshot.Length, replay.Tag, count, EventLog.Count); + } + + // Send messages outside the lock to avoid potential deadlocks + var index = 0; + foreach (var persistence in snapshot) + { + replay.ReplyTo.Tell(new ReplayedTaggedMessage(persistence, replay.Tag, replay.FromOffset + index), ActorRefs.NoSender); + _log.Debug("[DIAG] Sent ReplayedTaggedMessage for {0}, seq {1}, offset {2}", + persistence.PersistenceId, persistence.SequenceNr, replay.FromOffset + index); + index++; + } + + _log.Debug("[DIAG] ReplayTaggedMessagesAsync completed, returning highestSequenceNr={0}", count - 1); + return count - 1; + }); } private Task ReplayAllEventsAsync(ReplayAllEvents replay) { - IPersistentRepresentation[] snapshot; - int count; - - Lock.EnterReadLock(); - try + return Task.Run(() => { - snapshot = EventLog - .Skip(replay.FromOffset) - .Take((int)replay.Max) - .ToArray(); + IPersistentRepresentation[] snapshot; + int count; - count = EventLog.Count; - } - finally - { - Lock.ExitReadLock(); - } + lock (Lock) + { + snapshot = EventLog + .Skip(replay.FromOffset) + .Take((int)replay.Max) + .ToArray(); - // Send messages outside the lock to avoid potential deadlocks - var index = 0; - foreach (var message in snapshot) - { - replay.ReplyTo.Tell(new ReplayedEvent(message, replay.FromOffset + index), ActorRefs.NoSender); - index++; - } + count = EventLog.Count; + } + + // Send messages outside the lock to avoid potential deadlocks + var index = 0; + foreach (var message in snapshot) + { + replay.ReplyTo.Tell(new ReplayedEvent(message, replay.FromOffset + index), ActorRefs.NoSender); + index++; + } - return Task.FromResult(count - 1); + return count - 1; + }); } #region QueryAPI @@ -626,12 +612,12 @@ public class SharedMemoryJournal : MemoryJournal { private static readonly List SharedEventLog = new(); private static readonly Dictionary> SharedEventsByPersistenceId = new(); - private static readonly ReaderWriterLockSlim SharedLock = new(LockRecursionPolicy.NoRecursion); + private static readonly object SharedLock = new(); private static readonly Dictionary SharedDeletedTo = new(); protected override List EventLog => SharedEventLog; protected override Dictionary> EventsByPersistenceId => SharedEventsByPersistenceId; - protected override ReaderWriterLockSlim Lock => SharedLock; + protected override object Lock => SharedLock; protected override Dictionary DeletedTo => SharedDeletedTo; } }