Exemple #1
0
        public ServiceFabricPersistenceExtension(ExtendedActorSystem system)
        {
            system.Settings.InjectTopLevelFallback(ServiceFabricPersistence.DefaultConfiguration());

            JournalSettings       = new JournalSettings(system.Settings.Config.GetConfig(JournalSettings.ConfigPath));
            SnapshotStoreSettings = new SnapshotStoreSettings(system.Settings.Config.GetConfig(SnapshotStoreSettings.ConfigPath));

            if (JournalSettings.AutoInitialize)
            {
                // TODO
            }

            if (SnapshotStoreSettings.AutoInitialize)
            {
                //TODO
            }
        }
Exemple #2
0
        public ServiceFabricExtension(ExtendedActorSystem system)
        {
            if (system == null)
            {
                throw new ArgumentNullException("system");
            }

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

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

            JournalSettings = new ServiceFabricJournalSettings(journalConfig);

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

            SnapshotStoreSettings = new ServiceFabricSnapshotSettings(snapshotConfig);

            StatefulServiceContext = AkkaStatefulService.ServiceContext;
            StateManager           = AkkaStatefulService.StatefulService.StateManager;
        }