public class MaxAttemptsTerminationStrategy extends Object implements TerminationStrategy
Termination strategy that allows up to X attempts before terminating.
Constructor and Description |
---|
MaxAttemptsTerminationStrategy(int maxAttempts) |
Modifier and Type | Method and Description |
---|---|
int |
getMaxAttempts()
The maximum number of attempts to make.
|
boolean |
shouldTerminate(WaiterConfiguration.WaitContext context)
Returns whether or not polling should be terminated.
|
String |
toString() |
@ConstructorProperties(value="maxAttempts") public MaxAttemptsTerminationStrategy(int maxAttempts)
public boolean shouldTerminate(WaiterConfiguration.WaitContext context)
TerminationStrategy
Returns whether or not polling should be terminated.
shouldTerminate
in interface TerminationStrategy
context
- The context after the last poll attempt.public int getMaxAttempts()
The maximum number of attempts to make.
Copyright © 2016–2024. All rights reserved.