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)]); }
private InMemoryRetry GetOrCreate(RetryType retryType, string requestId) { var key = InMemoryRetry.MakeOperationId(requestId, retryType); return(retryOperations.GetOrAdd(key, _ => new InMemoryRetry(requestId, retryType, domainEvents))); }