Class RetryableGitHubOperation
- java.lang.Object
-
- com.github.kostyasha.github.integration.generic.utils.RetryableGitHubOperation
-
public class RetryableGitHubOperation extends Object
Used to wrap and retry calls to GitHub in the event an error is thrown.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RetryableGitHubOperation.GitOperation<T>
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <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 Detail
-
execute
public static <T> T execute(RetryableGitHubOperation.GitOperation<T> operation) throws IOException
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
-
-