public final class RetryOptions implements SerializableContains various options for a task's retry strategy. Calls to RetryOptions methods may be chained to specify multiple options in the one RetryOptions object.
Notes on usage:
 The recommended way to instantiate a RetryOptions object is to statically import Builder.* and invoke a static creation method followed by an instance mutator (if needed):
 import static com.google.appengine.api.taskqueue.RetryOptions.Builder.*;
 ...
 RetryOptions retry = withTaskRetryLimit(10).taskAgeLimitSeconds("4d")
     .minBackoffSeconds(120).maxBackoffSeconds(3600).maxDoublings(5);
 QueueFactory#getDefaultQueue().add(retryOptions(retry));
 Implements
SerializableConstructors
RetryOptions(RetryOptions options)
public RetryOptions(RetryOptions options)| Parameter | |
|---|---|
| Name | Description | 
| options | RetryOptions | 
Methods
equals(Object obj)
public boolean equals(Object obj)| Parameter | |
|---|---|
| Name | Description | 
| obj | Object | 
| Returns | |
|---|---|
| Type | Description | 
| boolean | |
hashCode()
public int hashCode()| Returns | |
|---|---|
| Type | Description | 
| int | |
maxBackoffSeconds(double maxBackoffSeconds)
public RetryOptions maxBackoffSeconds(double maxBackoffSeconds)Sets the maximum retry backoff interval, in seconds.
| Parameter | |
|---|---|
| Name | Description | 
| maxBackoffSeconds | doubleSeconds value for the maximum backoff interval. | 
| Returns | |
|---|---|
| Type | Description | 
| RetryOptions | the RetryOptions object for chaining. | 
maxDoublings(int maxDoublings)
public RetryOptions maxDoublings(int maxDoublings)Sets the maximum times the retry backoff interval should double before rising linearly to the maximum.
| Parameter | |
|---|---|
| Name | Description | 
| maxDoublings | intThe number of allowed doublings. Must not be negative. | 
| Returns | |
|---|---|
| Type | Description | 
| RetryOptions | the RetryOptions object for chaining. | 
minBackoffSeconds(double minBackoffSeconds)
public RetryOptions minBackoffSeconds(double minBackoffSeconds)Sets the minimum retry backoff interval, in seconds.
| Parameter | |
|---|---|
| Name | Description | 
| minBackoffSeconds | doubleSeconds value for the minimum backoff interval. | 
| Returns | |
|---|---|
| Type | Description | 
| RetryOptions | the RetryOptions object for chaining. | 
taskAgeLimitSeconds(long taskAgeLimitSeconds)
public RetryOptions taskAgeLimitSeconds(long taskAgeLimitSeconds)Sets the maximum age from the first attempt to execute a task after which any new task failure can be permanent. If both taskRetryLimit and taskAgeLimitSeconds are specified, then both limits must be exceeded before a task can fail permanently.
| Parameter | |
|---|---|
| Name | Description | 
| taskAgeLimitSeconds | longThe age limit in seconds. Must not be negative. | 
| Returns | |
|---|---|
| Type | Description | 
| RetryOptions | the RetryOptions object for chaining. | 
taskRetryLimit(int taskRetryLimit)
public RetryOptions taskRetryLimit(int taskRetryLimit)Sets the number of retries allowed before a task can fail permanently. If both taskRetryLimit and taskAgeLimitSeconds are specified, then both limits must be exceeded before a task can fail permanently.
| Parameter | |
|---|---|
| Name | Description | 
| taskRetryLimit | int | 
| Returns | |
|---|---|
| Type | Description | 
| RetryOptions | |
toString()
public String toString()| Returns | |
|---|---|
| Type | Description | 
| String | |