Package com.google.jenkins.plugins.util
Class Executor.Default
java.lang.Object
com.google.jenkins.plugins.util.Executor
com.google.jenkins.plugins.util.Executor.Default
- Enclosing class:
- Executor
A default, failure-tolerant implementation of the
Executor
class.-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.jenkins.plugins.util.Executor
Executor.Default
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
execute
(RequestCallable<T> block) Executes the request, returning a response of the appropriate type.
-
Constructor Details
-
Default
public Default() -
Default
public Default(int maxRetry, boolean composeRetry) - Parameters:
maxRetry
- the maximum number of retries to attempt inexecute(RequestCallable)
.composeRetry
- whether nested retries block cause retries to compose or not. If set to false, we will wrap the exception of the last retry step in an instance ofMaxRetryExceededException
, which prevents any further retries.
-
-
Method Details
-
execute
Executes the request, returning a response of the appropriate type.- Specified by:
execute
in classExecutor
- Type Parameters:
T
- The type of the expected response- Parameters:
block
- The request we are issuing- Returns:
- a Json object of the given type
- Throws:
IOException
- if anything goes wrongExecutorException
-