public InMemoryRetry GetStatusForRetryOperation(string requestId, RetryType retryType) { InMemoryRetry summary; RetryOperations.TryGetValue(InMemoryRetry.MakeOperationId(requestId, retryType), out summary); return(summary); }
public bool IsOperationInProgressFor(string requestId, RetryType retryType) { if (!retryOperations.TryGetValue(InMemoryRetry.MakeOperationId(requestId, retryType), out var summary)) { return(false); } return(summary.IsInProgress()); }
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); }
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); }
private static InMemoryRetry Get(string requestId, RetryType retryType) { return(RetryOperations[InMemoryRetry.MakeOperationId(requestId, retryType)]); }
static GroupOperation MapOpenForForwardingOperation(string classifier, RetryBatch forwardingBatch, InMemoryRetry summary) { var progress = summary.GetProgress(); return(new GroupOperation { Id = forwardingBatch.RequestId, Title = forwardingBatch.Originator, Type = classifier, Count = 0, Last = summary.Last, OperationStatus = summary.RetryState.ToString(), OperationFailed = summary.Failed, OperationProgress = progress.Percentage, OperationRemainingCount = progress.MessagesRemaining, OperationCompletionTime = summary.CompletionTime, OperationStartTime = summary.Started, NeedUserAcknowledgement = false }); }
private InMemoryRetry GetOrCreate(RetryType retryType, string requestId) { var key = InMemoryRetry.MakeOperationId(requestId, retryType); return(retryOperations.GetOrAdd(key, _ => new InMemoryRetry(requestId, retryType, domainEvents))); }