Example #1
0
 public BaseByteArrayJournalDaoConfig(Configuration.Config config)
 {
     BufferSize                 = config.GetInt("buffer-size", 5000);
     BatchSize                  = config.GetInt("batch-size", 100);
     ReplayBatchSize            = config.GetInt("replay-batch-size", 1000);
     Parallelism                = config.GetInt("parallelism", 2);
     LogicalDelete              = config.GetBoolean("logical-delete", false);
     MaxRowByRowSize            = config.GetInt("max-row-by-row-size", 100);
     SqlCommonCompatibilityMode =
         config.GetBoolean("delete-compatibility-mode", true);
 }
 public BaseByteArrayJournalDaoConfig(Configuration.Config config)
 {
     BufferSize                       = config.GetInt("buffer-size", 5000);
     BatchSize                        = config.GetInt("batch-size", 100);
     DbRoundTripBatchSize             = config.GetInt("db-round-trip-max-batch-size", 1000);
     PreferParametersOnMultiRowInsert =
         config.GetBoolean("prefer-parameters-on-multirow-insert",
                           false);
     ReplayBatchSize            = config.GetInt("replay-batch-size", 1000);
     Parallelism                = config.GetInt("parallelism", 2);
     LogicalDelete              = config.GetBoolean("logical-delete", false);
     MaxRowByRowSize            = config.GetInt("max-row-by-row-size", 100);
     SqlCommonCompatibilityMode =
         config.GetBoolean("delete-compatibility-mode", true);
 }
        public ReadJournalConfig(Configuration.Config config)
        {
            ConnectionString = config.GetString("connection-string");
            ProviderName     = config.GetString("provider-name");
            TableConfig      = new JournalTableConfig(config);
            DaoConfig        = new BaseByteArrayJournalDaoConfig(config);
            var dbConf = config.GetString(ConfigKeys.useSharedDb);

            UseCloneConnection =
                config.GetBoolean("use-clone-connection", false);
            JournalSequenceRetrievalConfiguration = new JournalSequenceRetrievalConfig(config);
            PluginConfig    = new ReadJournalPluginConfig(config);
            RefreshInterval = config.GetTimeSpan("refresh-interval",
                                                 TimeSpan.FromSeconds(1));
            MaxBufferSize   = config.GetInt("max-buffer-size", 500);
            AddShutdownHook = config.GetBoolean("add-shutdown-hook", true);
            IncludeDeleted  =
                config.GetBoolean("include-logically-deleted", true);
        }
        public SnapshotConfig(Configuration.Config config)
        {
            config =
                config.SafeWithFallback(Linq2DbSnapshotStore
                                        .DefaultConfiguration.GetConfig("akka.persistence.snapshot-store.linq2db"));
            TableConfig  = new SnapshotTableConfiguration(config);
            PluginConfig = new SnapshotPluginConfig(config);
            var dbConf = config.GetString(ConfigKeys.useSharedDb);

            UseSharedDb       = string.IsNullOrWhiteSpace(dbConf) ? null : dbConf;
            DefaultSerializer = config.GetString("serializer", null);
            ConnectionString  = config.GetString("connection-string", null);
            ProviderName      = config.GetString("provider-name", null);
            IDaoConfig        =
                new SnapshotDaoConfig(config.GetBoolean("compatibility-mode",
                                                        false));
        }
Example #5
0
        public JournalConfig(Configuration.Config config)
        {
            config =
                config.SafeWithFallback(
                    Linq2DbWriteJournal.DefaultConfiguration);
            MaterializerDispatcher = config.GetString("materializer-dispatcher", "akka.actor.default-dispatcher");
            ConnectionString       = config.GetString("connection-string");
            ProviderName           = config.GetString("provider-name");
            TableConfig            = new JournalTableConfig(config);
            PluginConfig           = new JournalPluginConfig(config);
            DaoConfig = new BaseByteArrayJournalDaoConfig(config);
            var dbConf = config.GetString(ConfigKeys.useSharedDb);

            UseSharedDb        = string.IsNullOrWhiteSpace(dbConf) ? null : dbConf;
            UseCloneConnection =
                config.GetBoolean("use-clone-connection", false);
        }