示例#1
0
        public RetryOperation GetStatusForRetryOperation(string requestId, RetryType retryType)
        {
            RetryOperation summary;

            Operations.TryGetValue(RetryOperation.MakeOperationId(requestId, retryType), out summary);

            return(summary);
        }
示例#2
0
        public bool IsOperationInProgressFor(string requestId, RetryType retryType)
        {
            RetryOperation summary;

            if (!Operations.TryGetValue(RetryOperation.MakeOperationId(requestId, retryType), out summary))
            {
                return(false);
            }

            return(summary.RetryState != RetryState.Completed && summary.RetryState != RetryState.Waiting);
        }
示例#3
0
        private RetryOperation GetOrCreate(RetryType retryType, string requestId)
        {
            RetryOperation summary;

            if (!Operations.TryGetValue(RetryOperation.MakeOperationId(requestId, retryType), out summary))
            {
                summary = new RetryOperation(requestId, retryType);
                Operations[RetryOperation.MakeOperationId(requestId, retryType)] = summary;
            }
            return(summary);
        }
示例#4
0
 private static RetryOperation Get(string requestId, RetryType retryType)
 {
     return(Operations[RetryOperation.MakeOperationId(requestId, retryType)]);
 }