예제 #1
0
 public ProcessingCommandQueue(
     string aggregateRootId,
     IProcessingCommandHandler handler,
     ICommandExecutedResultProcessor executedResultProcessor,
     ILogger <ProcessingCommandQueue> logger)
 {
     this.aggregateRootId         = aggregateRootId;
     this.handler                 = handler;
     this.executedResultProcessor = executedResultProcessor;
     this.logger      = logger;
     queue            = new ConcurrentDictionary <long, ProcessingCommand>();
     waitingQueue     = new ConcurrentDictionary <long, CommandExecutedResult>();
     pausingHandle    = new ManualResetEvent(false);
     processingHandle = new ManualResetEvent(false);
     syncLock         = new object();
     asyncLock        = new AsyncLock();
     previousSequence = -1;
     lastActiveOn     = DateTime.UtcNow;
 }
 public ProcessingCommandQueueFactory(IProcessingCommandHandler handler, ICommandExecutedResultProcessor executedResultProcessor, ILoggerFactory loggerFactory)
 {
     this.handler = handler;
     this.executedResultProcessor = executedResultProcessor;
     this.loggerFactory           = loggerFactory;
 }