Class RetryableGitHubOperation
java.lang.Object
com.github.kostyasha.github.integration.generic.utils.RetryableGitHubOperation
Used to wrap and retry calls to GitHub in the event an error is thrown.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
execute
(int retries, long delay, RetryableGitHubOperation.GitOperation<T> operation) static <T> T
execute
(RetryableGitHubOperation.GitOperation<T> operation) Executes a GitHub operation up to 3 times with a 2 second delay.
-
Method Details
-
execute
Executes a GitHub operation up to 3 times with a 2 second delay.- Parameters:
operation
- GitHub operation to execute- Returns:
- result of operation
- Throws:
IOException
-
execute
public static <T> T execute(int retries, long delay, RetryableGitHubOperation.GitOperation<T> operation) throws IOException - Throws:
IOException
-