public TransactionQueue( IOptions <TransactionalStateOptions> options, ITransactionParticipant resource, Action deactivate, ITransactionalStateStorage <TState> storage, JsonSerializerSettings serializerSettings, IClock clock, ILogger logger) { this.options = options.Value; this.resource = resource; this.deactivate = deactivate; this.storage = storage; this.serializerSettings = serializerSettings; this.Clock = new CausalClock(clock); this.logger = logger; this.confirmationTasks = new Dictionary <Guid, TransactionRecord <TState> >(); this.storageWorker = new BatchWorkerFromDelegate(StorageWork); this.confirmationWorker = new BatchWorkerFromDelegate(ConfirmationWork); this.RWLock = new ReadWriteLock <TState>(options, this, this.storageWorker, logger); }
public TransactionQueue( IOptions <TransactionalStateOptions> options, ParticipantId resource, Action deactivate, ITransactionalStateStorage <TState> storage, JsonSerializerSettings serializerSettings, IClock clock, ILogger logger) { this.options = options.Value; this.resource = resource; this.deactivate = deactivate; this.storage = storage; this.Clock = new CausalClock(clock); this.logger = logger; this.storageWorker = new BatchWorkerFromDelegate(StorageWork); this.RWLock = new ReadWriteLock <TState>(options, this, this.storageWorker, logger); this.confirmationWorker = new ConfirmationWorker <TState>(options, this.resource, this.storageWorker, () => this.storageBatch, this.logger); this.unprocessedPreparedMessages = new Dictionary <DateTime, PreparedMessages>(); this.commitQueue = new CommitQueue <TState>(); this.readyTask = Task.CompletedTask; }