예제 #1
0
        public InMemoryRetry GetStatusForRetryOperation(string requestId, RetryType retryType)
        {
            InMemoryRetry summary;

            RetryOperations.TryGetValue(InMemoryRetry.MakeOperationId(requestId, retryType), out summary);

            return(summary);
        }
예제 #2
0
        public bool IsOperationInProgressFor(string requestId, RetryType retryType)
        {
            if (!retryOperations.TryGetValue(InMemoryRetry.MakeOperationId(requestId, retryType), out var summary))
            {
                return(false);
            }

            return(summary.IsInProgress());
        }
예제 #3
0
        private InMemoryRetry GetOrCreate(RetryType retryType, string requestId)
        {
            if (!retryOperations.TryGetValue(InMemoryRetry.MakeOperationId(requestId, retryType), out var summary))
            {
                summary = new InMemoryRetry(requestId, retryType, domainEvents);
                retryOperations[InMemoryRetry.MakeOperationId(requestId, retryType)] = summary;
            }

            return(summary);
        }
예제 #4
0
        private InMemoryRetry GetOrCreate(RetryType retryType, string requestId)
        {
            InMemoryRetry summary;

            if (!RetryOperations.TryGetValue(InMemoryRetry.MakeOperationId(requestId, retryType), out summary))
            {
                summary = new InMemoryRetry(requestId, retryType);
                RetryOperations[InMemoryRetry.MakeOperationId(requestId, retryType)] = summary;
            }
            return(summary);
        }
예제 #5
0
 private static InMemoryRetry Get(string requestId, RetryType retryType)
 {
     return(RetryOperations[InMemoryRetry.MakeOperationId(requestId, retryType)]);
 }
        private InMemoryRetry GetOrCreate(RetryType retryType, string requestId)
        {
            var key = InMemoryRetry.MakeOperationId(requestId, retryType);

            return(retryOperations.GetOrAdd(key, _ => new InMemoryRetry(requestId, retryType, domainEvents)));
        }