private bool ShouldRetry(RetryPolicy retryPolicy, Context context, OTSException exception) { if (retryPolicy.MaxRetryTimeReached(context, exception)) { return(false); } if (retryPolicy.CanRetry(context, exception)) { return(true); } return(false); }