Send feedback
Class LeaseOptions (2.0.0)
Stay organized with collections
Save and categorize content based on your preferences.
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 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 ));
Inheritance
Object >
LeaseOptions
Constructors
LeaseOptions(LeaseOptions options)
public LeaseOptions ( LeaseOptions options )
Methods
countLimit(long countLimit)
public LeaseOptions countLimit ( long countLimit )
Sets the count limit for lease requests. Must be positive.
Parameter
Name
Description
countLimit
long
deadlineInSeconds(@Nullable Double deadlineInSeconds)
public LeaseOptions deadlineInSeconds ( @Nullable Double deadlineInSeconds )
Sets the deadline for lease requests. Must be positive.
Parameter
Name
Description
deadlineInSeconds
@org.checkerframework.checker.nullness.qual.Nullable java.lang.Double
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
groupByTag()
public LeaseOptions groupByTag ()
Indicates that all tasks being leased must have the same tag. Redundant if tag is specified.
hashCode()
Returns
Type
Description
int
Overrides
leasePeriod(long lease, TimeUnit unit)
public LeaseOptions leasePeriod ( long lease , TimeUnit unit )
Sets the lease period for lease requests. Must be positive.
tag(byte[] tag)
public LeaseOptions tag ( byte [] tag )
Sets the tag for lease requests. Must not be null.
Parameter
Name
Description
tag
byte []
tag(String tag)
public LeaseOptions tag ( String tag )
Sets the tag for lease requests. Must not be null.
Parameter
Name
Description
tag
String
toString()
Returns
Type
Description
String
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-24 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-24 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-24 UTC."]]