Esempio n. 1
0
        public LiteDBPersistence(LiteDBPersistenceOptions options)
        {
            _options = options;
            _logger  = _options.LoggerFactory.CreateLogger(_options.ConnectionString);

            _logger.LogInformation("LiteDB Persistence on {file}", _options.ConnectionString);
        }
Esempio n. 2
0
        public PollingClient(IPersistence store, long lastPosition, ISubscription subscription, INStoreLoggerFactory inStoreLoggerFactory)
        {
            this._logger = inStoreLoggerFactory.CreateLogger(GetType().FullName);

            _sequencer = new Sequencer(lastPosition, subscription, _logger);
            _store     = store;
            PollingIntervalMilliseconds = 200;
            HoleDetectionTimeout        = 2000;
        }
Esempio n. 3
0
        public MsSqlPersistence(MsSqlPersistenceOptions options)
        {
            _options = options;
            _logger  = _options.LoggerFactory.CreateLogger($"MsSqlPersistence-{options.StreamsTableName}");

            if (_options.Serializer == null)
            {
                throw new MsSqlPersistenceException("MsSqlOptions should provide a custom Serializer");
            }
        }
Esempio n. 4
0
        protected BasePersistenceTest()
        {
            _testRunId = Interlocked.Increment(ref _staticId);

            LoggerFactory = new TestLoggerFactory(TestSuitePrefix + "::" + GetType().Name);
            _logger       = LoggerFactory.CreateLogger(GetType().FullName);
            _logger.LogDebug("Creating store");
            _persistence = Create();
            _logger.LogDebug("Store created");
            Store = new LogDecorator(_persistence, LoggerFactory);
        }
 public Sequencer(
     long lastPosition,
     long positionToStartSequencing,
     ISubscription subscription,
     INStoreLogger logger)
 {
     Position = lastPosition;
     _positionToStartSequencing = positionToStartSequencing;
     _subscription = subscription;
     _logger       = logger;
 }
Esempio n. 6
0
 public LogDecorator(IPersistence persistence, INStoreLoggerFactory inStoreLoggerFactory)
 {
     _persistence = persistence;
     _logger      = inStoreLoggerFactory.CreateLogger("Persistence");
 }
 protected AbstractSqlPersistence(BaseSqlPersistenceOptions options)
 {
     Options = options;
     _logger = options.LoggerFactory.CreateLogger($"{GetType().FullName}-{options.StreamsTableName}");
 }
Esempio n. 8
0
 public Sequencer(long lastPosition, ISubscription subscription, INStoreLogger logger)
 {
     Position      = lastPosition;
     _subscription = subscription;
     _logger       = logger;
 }
Esempio n. 9
0
 public LogDecorator(IPersistence persistence, INStoreLoggerFactory inStoreLoggerFactory, string categoryName = "Persistence")
 {
     _persistence = persistence;
     _logger      = inStoreLoggerFactory.CreateLogger(categoryName);
 }