ExistingWorkPolicy
public
final
enum
ExistingWorkPolicy
extends Enum<ExistingWorkPolicy>
| java.lang.Object | ||
| ↳ | java.lang.Enum<androidx.work.ExistingWorkPolicy> | |
| ↳ | androidx.work.ExistingWorkPolicy | |
An enumeration of the conflict resolution policies available to unique
OneTimeWorkRequests in case of a collision.
Summary
Enum values | |
|---|---|
ExistingWorkPolicy |
APPEND
If there is existing pending (uncompleted) work with the same unique name, append the newly-specified work as a child of all the leaves of that work sequence. |
ExistingWorkPolicy |
KEEP
If there is existing pending (uncompleted) work with the same unique name, do nothing. |
ExistingWorkPolicy |
REPLACE
If there is existing pending (uncompleted) work with the same unique name, cancel and delete it. |
Public methods | |
|---|---|
static
ExistingWorkPolicy
|
valueOf(String name)
|
static
final
ExistingWorkPolicy[]
|
values()
|
Inherited methods | |
|---|---|
Enum values
APPEND
public static final ExistingWorkPolicy APPEND
If there is existing pending (uncompleted) work with the same unique name, append the newly-specified work as a child of all the leaves of that work sequence. Otherwise, insert the newly-specified work as the start of a new sequence.
KEEP
public static final ExistingWorkPolicy 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 ExistingWorkPolicy 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 ExistingWorkPolicy valueOf (String name)
| Parameters | |
|---|---|
name |
String |
| Returns | |
|---|---|
ExistingWorkPolicy |
|
Interfaces
Classes
- ArrayCreatingInputMerger
- Configuration
- Configuration.Builder
- Constraints
- Constraints.Builder
- Data
- Data.Builder
- InputMerger
- ListenableWorker
- ListenableWorker.Result
- OneTimeWorkRequest
- OneTimeWorkRequest.Builder
- Operation.State
- Operation.State.FAILURE
- Operation.State.IN_PROGRESS
- Operation.State.SUCCESS
- OverwritingInputMerger
- PeriodicWorkRequest
- PeriodicWorkRequest.Builder
- RxWorker
- WorkContinuation
- Worker
- WorkerFactory
- WorkerParameters
- WorkInfo
- WorkManager
- WorkRequest
- WorkRequest.Builder
Enums
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.