public CassandraProjectionStoreInitializer(CassandraProjectionStoreSchema projectionsSchema, CassandraSnapshotStoreSchema snapshotsSchema, IProjectionsNamingStrategy naming)
        {
            if (projectionsSchema is null)
            {
                throw new ArgumentNullException(nameof(projectionsSchema));
            }
            if (snapshotsSchema is null)
            {
                throw new ArgumentNullException(nameof(snapshotsSchema));
            }

            this.naming            = naming;
            this.projectionsSchema = projectionsSchema;
            this.snapshotsSchema   = snapshotsSchema;
        }
Example #2
0
        public CassandraProjectionStoreInitializer(IProjectionStoreStorageManager projectionsSchema, CassandraSnapshotStoreSchema snapshotsSchema, VersionedProjectionsNaming naming, ILock @lock)
        {
            if (projectionsSchema is null)
            {
                throw new ArgumentNullException(nameof(projectionsSchema));
            }
            if (snapshotsSchema is null)
            {
                throw new ArgumentNullException(nameof(snapshotsSchema));
            }

            this.naming            = naming;
            this.projectionsSchema = projectionsSchema;
            this.snapshotsSchema   = snapshotsSchema;
            this.@lock             = @lock;

            this.lockTtl = TimeSpan.FromSeconds(2);
            if (lockTtl == TimeSpan.Zero)
            {
                throw new ArgumentException("Lock ttl must be more than 0", nameof(lockTtl));
            }
        }