示例#1
0
        public InMemoryPersistence(ExtendedActorSystem system)
        {
            if (system == null)
            {
                throw new ArgumentNullException(nameof(system));
            }

            // Initialize fallback configuration defaults
            system.Settings.InjectTopLevelFallback(DefaultConfiguration());

            // Read config
            var journalConfig = system.Settings.Config.GetConfig("akka.persistence.journal.inmemory");

            JournalSettings = new InMemoryJournalSettings(journalConfig);
            JournalSource   = new List <JournalEntry>();
            MetadataSource  = new List <MetadataEntry>();

            var snapshotConfig = system.Settings.Config.GetConfig("akka.persistence.snapshot-store.inmemory");

            SnapshotStoreSettings = new InMemorySnapshotSettings(snapshotConfig);
            SnapshotSource        = new List <SnapshotEntry>();
        }
示例#2
0
 public InMemoryJournal()
 {
     _settings = InMemoryPersistence.Get(Context.System).JournalSettings;
 }