Example #1
0
 protected PersistenceIdsSpec(Config config = null, string actorSystemName = null, ITestOutputHelper output = null)
     : base(config ?? Config.Empty, actorSystemName, output)
 {
     Materializer = Sys.Materializer();
     Extension    = Persistence.Instance.Apply(Sys as ExtendedActorSystem);
     _senderProbe = CreateTestProbe();
 }
Example #2
0
 protected PluginSpec(Config config = null, string actorSystemName = null, ITestOutputHelper output = null)
     : base(FromConfig(config), actorSystemName, output)
 {
     _extension  = Persistence.Instance.Apply(Sys as ExtendedActorSystem);
     _pid        = "p-" + Counter.IncrementAndGet();
     _writerGuid = Guid.NewGuid().ToString();
 }
Example #3
0
 protected PersistentView()
 {
     LastSequenceNr = 0L;
     Extension = Persistence.Instance.Apply(Context.System);
     _viewSettings = Extension.Settings.View;
     _internalStash = CreateStash();
     _currentState = RecoveryPending();
 }
Example #4
0
        protected SyncWriteJournal()
        {
            _extension = Persistence.Instance.Apply(Context.System);
            if (_extension == null)
            {
                throw new ArgumentException("Couldn't initialize SyncWriteJournal instance, because associated Persistence extension has not been used in current actor system context.");
            }

            CanPublish = _extension.Settings.Internal.PublishPluginCommands;
        }
Example #5
0
        protected SnapshotStore()
        {
            _extension = Persistence.Instance.Apply(Context.System);
            if (_extension == null)
            {
                throw new ArgumentException("Couldn't initialize SnapshotStore instance, because associated Persistence extension has not been used in current actor system context.");
            }

            _publish = _extension.Settings.Internal.PublishPluginCommands;
        }
Example #6
0
        public CassandraJournal()
        {
            _cassandraExtension = CassandraPersistence.Instance.Apply(Context.System);
            _serializer         = Context.System.Serialization.FindSerializerForType(PersistentRepresentationType);

            // Use setting from the persistence extension when batch deleting
            PersistenceExtension persistence = Context.System.PersistenceExtension();

            _maxDeletionBatchSize = persistence.Settings.Journal.MaxDeletionBatchSize;
        }
        protected AsyncWriteJournal()
        {
            _extension = Persistence.Instance.Apply(Context.System);
            if (_extension == null)
            {
                throw new ArgumentException("Couldn't initialize SyncWriteJournal instance, because associated Persistence extension has not been used in current actor system context.");
            }

            CanPublish = _extension.Settings.Internal.PublishPluginCommands;
            _resequencer = Context.System.ActorOf(Props.Create(() => new Resequencer()));
        }
        public CassandraSnapshotStore()
        {
            _cassandraExtension = CassandraPersistence.Instance.Apply(Context.System);
            _serializer         = Context.System.Serialization.FindSerializerForType(SnapshotType);
            _log = Context.System.Log;

            // Here so we can emulate the base class behavior but do deletes async
            PersistenceExtension persistence = Context.System.PersistenceExtension();

            _publish = persistence.Settings.Internal.PublishPluginCommands;
        }
Example #9
0
 protected WriteJournalBase()
 {
     _persistence = Persistence.Instance.Apply(Context.System);
     _eventAdapters = _persistence.AdaptersFor(Self);
 }
Example #10
0
 protected PluginSpec(Config config = null, string actorSystemName = null, string testActorName = null)
     : base(new XunitAssertions(), FromConfig(config), actorSystemName, testActorName)
 {
     _extension = Persistence.Instance.Apply(Sys as ExtendedActorSystem);
     _pid       = "p-" + _counter.IncrementAndGet();
 }
Example #11
0
 protected WriteJournalBase()
 {
     _persistence   = Persistence.Instance.Apply(Context.System);
     _eventAdapters = _persistence.AdaptersFor(Self);
 }
Example #12
0
 protected PersistentView()
 {
     LastSequenceNr = 0L;
     Extension = Persistence.Instance.Apply(Context.System);
     _viewSettings = Extension.Settings.View;
     _internalStash = CreateStash();
     _currentState = RecoveryStarted(long.MaxValue);
     _log = Context.GetLogger();
 }