public void Redis_SnapshotStoreSettingsSettings_must_have_default_values()
        {
            var redisPersistence = RedisPersistence.Get(Sys);

            redisPersistence.SnapshotStoreSettings.ConfigurationString.Should().Be(string.Empty);
            redisPersistence.SnapshotStoreSettings.Database.Should().Be(0);
            redisPersistence.SnapshotStoreSettings.KeyPrefix.Should().Be(string.Empty);
        }
        public void Redis_JournalSettings_must_have_default_values()
        {
            var redisPersistence = RedisPersistence.Get(Sys);

            redisPersistence.JournalSettings.ConfigurationString.Should().Be(string.Empty);
            redisPersistence.JournalSettings.Database.Should().Be(0);
            redisPersistence.JournalSettings.KeyPrefix.Should().Be("akka:persistence:journal");
        }
Example #3
0
        static void Main(string[] args)
        {
            Config config = CreateConfig(Assembly.GetExecutingAssembly());

            using (var system = ActorSystem.Create("example", config.WithFallback(ConfigurationFactory.Default())))
            {
                RedisPersistence.Get(system);
                var bankBookActor = system.ActorOf(BankBookActor.Props("1"));

                bankBookActor.Tell(100);
                bankBookActor.Tell(-50);

                Console.ReadLine();
            }
        }
Example #4
0
 public RedisSnapshotStoreSpec(ITestOutputHelper output)
     : base(SpecConfig, typeof(RedisSnapshotStoreSpec).Name, output)
 {
     RedisPersistence.Get(Sys);
     Initialize();
 }
 public RedisSnapshotStoreSpec(ITestOutputHelper output, RedisFixture fixture)
     : base(Config(fixture, Database), typeof(RedisSnapshotStoreSpec).Name, output)
 {
     RedisPersistence.Get(Sys);
     Initialize();
 }
 public RedisJournalSpec(ITestOutputHelper output, RedisFixture fixture) : base(Config(fixture, Database), nameof(RedisJournalSpec), output)
 {
     RedisPersistence.Get(Sys);
     Initialize();
 }
 public RedisJournal()
 {
     _settings = RedisPersistence.Get(Context.System).JournalSettings;
 }
 public RedisSnapshotStore()
 {
     _settings = RedisPersistence.Get(Context.System).SnapshotStoreSettings;
 }
Example #9
0
 public RedisJournalSpec(ITestOutputHelper output) : base(SpecConfig(Database), nameof(RedisJournalSpec), output)
 {
     RedisPersistence.Get(Sys);
     Initialize();
 }
Example #10
0
 public RedisJournal()
 {
     _settings      = RedisPersistence.Get(Context.System).JournalSettings;
     _journalHelper = new JournalHelper(Context.System, _settings.KeyPrefix);
 }