BackoffPolicy
public
final
enum
BackoffPolicy
extends Enum<BackoffPolicy>
java.lang.Object | ||
↳ | java.lang.Enum<androidx.work.BackoffPolicy> | |
↳ | androidx.work.BackoffPolicy |
An enumeration of backoff policies when retrying work. These policies are used when you have a
return ListenableWorker.Result.retry()
from a worker to determine the correct backoff
time. Backoff policies are set in
WorkRequest.Builder.setBackoffCriteria(BackoffPolicy, long, TimeUnit)
or one of its
variants.
Summary
Enum values | |
---|---|
BackoffPolicy |
EXPONENTIAL
Used to indicate that |
BackoffPolicy |
LINEAR
Used to indicate that |
Public methods | |
---|---|
static
BackoffPolicy
|
valueOf(String name)
|
static
final
BackoffPolicy[]
|
values()
|
Inherited methods | |
---|---|
Enum values
EXPONENTIAL
public static final BackoffPolicy EXPONENTIAL
Used to indicate that WorkManager
should increase the backoff time exponentially
LINEAR
public static final BackoffPolicy LINEAR
Used to indicate that WorkManager
should increase the backoff time linearly
Public methods
valueOf
public static BackoffPolicy valueOf (String name)
Parameters | |
---|---|
name |
String |
Returns | |
---|---|
BackoffPolicy |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.