|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.appengine.api.taskqueue.RetryOptions
public final class RetryOptions
Contains 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 RetryOptions.Builder
.* and invoke a static
creation method followed by an instance mutator (if needed):
* @author nverne@google.com (Nicholas Verne)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));
Nested Class Summary | |
---|---|
static class |
RetryOptions.Builder
Provides static creation methods for RetryOptions . |
Constructor Summary | |
---|---|
RetryOptions(RetryOptions options)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
RetryOptions |
maxBackoffSeconds(double maxBackoffSeconds)
Sets the maximum retry backoff interval, in seconds. |
RetryOptions |
maxDoublings(int maxDoublings)
Sets the maximum times the retry backoff interval should double before rising linearly to the maximum. |
RetryOptions |
minBackoffSeconds(double minBackoffSeconds)
Sets the minimum retry backoff interval, in seconds. |
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. |
RetryOptions |
taskRetryLimit(int taskRetryLimit)
Sets the number of retries allowed before a task can fail permanently. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RetryOptions(RetryOptions options)
Method Detail |
---|
public RetryOptions taskRetryLimit(int taskRetryLimit)
public RetryOptions taskAgeLimitSeconds(long taskAgeLimitSeconds)
taskAgeLimitSeconds
- The age limit in seconds. Must not be negative.
public RetryOptions minBackoffSeconds(double minBackoffSeconds)
minBackoffSeconds
- Seconds value for the minimum backoff interval.
public RetryOptions maxBackoffSeconds(double maxBackoffSeconds)
maxBackoffSeconds
- Seconds value for the maximum backoff interval.
public RetryOptions maxDoublings(int maxDoublings)
maxDoublings
- The number of allowed doublings. Must not be negative.
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |