|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.appengine.api.taskqueue.LeaseOptions
public final class LeaseOptions
Contains various options for lease requests following the builder pattern.
Calls to LeaseOptions
methods may be chained to specify
multiple options in the one LeaseOptions
object.
Notes on usage:
The recommended way to
instantiate a LeaseOptions
object is to statically import
LeaseOptions.Builder
.* and invoke a static creation method followed by
instance mutators:
import static com.google.appengine.api.taskqueue.LeaseOptions.Builder.*; ... tasks = pullQueue.leaseTasks(withLeasePeriod(2, TimeUnit.HOURS).countLimit(1000));
Nested Class Summary | |
---|---|
static class |
LeaseOptions.Builder
Provides static creation methods for LeaseOptions . |
Constructor Summary | |
---|---|
LeaseOptions(LeaseOptions options)
A copy constructor for LeaseOptions . |
Method Summary | |
---|---|
LeaseOptions |
countLimit(long countLimit)
Sets the count limit for lease requests. |
LeaseOptions |
deadlineInSeconds(java.lang.Double deadlineInSeconds)
Sets the deadline for lease requests. |
boolean |
equals(java.lang.Object obj)
|
LeaseOptions |
groupByTag()
Indicates that all tasks being leased must have the same tag. |
int |
hashCode()
|
LeaseOptions |
leasePeriod(long lease,
java.util.concurrent.TimeUnit unit)
Sets the lease period for lease requests. |
LeaseOptions |
tag(byte[] tag)
Sets the tag for lease requests. |
LeaseOptions |
tag(java.lang.String tag)
Sets the tag for lease requests. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LeaseOptions(LeaseOptions options)
LeaseOptions
.
Method Detail |
---|
public LeaseOptions leasePeriod(long lease, java.util.concurrent.TimeUnit unit)
java.lang.IllegalArgumentException
public LeaseOptions countLimit(long countLimit)
java.lang.IllegalArgumentException
public LeaseOptions deadlineInSeconds(java.lang.Double deadlineInSeconds)
java.lang.IllegalArgumentException
public LeaseOptions groupByTag()
java.lang.IllegalArgumentException
public LeaseOptions tag(byte[] tag)
java.lang.IllegalArgumentException
public LeaseOptions tag(java.lang.String tag)
java.lang.IllegalArgumentException
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 |