ExistingPeriodicWorkPolicy
public
final
enum
ExistingPeriodicWorkPolicy
extends Enum<ExistingPeriodicWorkPolicy>
| java.lang.Object | ||
| ↳ | java.lang.Enum<androidx.work.ExistingPeriodicWorkPolicy> | |
| ↳ | androidx.work.ExistingPeriodicWorkPolicy | |
An enumeration of the conflict resolution policies available to unique
PeriodicWorkRequests in case of a collision.
Summary
Enum values | |
|---|---|
ExistingPeriodicWorkPolicy |
KEEP
If there is existing pending (uncompleted) work with the same unique name, do nothing. |
ExistingPeriodicWorkPolicy |
REPLACE
If there is existing pending (uncompleted) work with the same unique name, cancel and delete it. |
Public methods | |
|---|---|
static
ExistingPeriodicWorkPolicy
|
valueOf(String name)
|
static
final
ExistingPeriodicWorkPolicy[]
|
values()
|
Inherited methods | |
|---|---|
Enum values
KEEP
public static final ExistingPeriodicWorkPolicy KEEP
If there is existing pending (uncompleted) work with the same unique name, do nothing. Otherwise, insert the newly-specified work.
REPLACE
public static final ExistingPeriodicWorkPolicy REPLACE
If there is existing pending (uncompleted) work with the same unique name, cancel and delete it. Then, insert the newly-specified work.
Public methods
valueOf
public static ExistingPeriodicWorkPolicy valueOf (String name)
| Parameters | |
|---|---|
name |
String |
| Returns | |
|---|---|
ExistingPeriodicWorkPolicy |
|
values
public static final ExistingPeriodicWorkPolicy[] values ()
| Returns | |
|---|---|
ExistingPeriodicWorkPolicy[] |
|
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.
Last updated 2019-12-27 UTC.