ExistingWorkPolicy

public final enum ExistingWorkPolicy
extends Enum<ExistingWorkPolicy>

java.lang.Object
   ↳ java.lang.Enum<androidx.work.ExistingWorkPolicy>
     ↳ androidx.work.ExistingWorkPolicy


An enum that determines what to do with existing work with the same unique tag in case of a collision.

Summary

Enum values

ExistingWorkPolicy  APPEND

If there is existing pending work with the same unique tag, append the newly-specified work as a child of all the leaves of that work sequence. 

ExistingWorkPolicy  KEEP

If there is existing pending work with the same unique tag, do nothing. 

ExistingWorkPolicy  REPLACE

If there is existing pending work with the same unique tag, cancel and delete it. 

Public methods

static ExistingWorkPolicy valueOf(String name)
static final ExistingWorkPolicy[] values()

Inherited methods

Enum values

APPEND

ExistingWorkPolicy APPEND

If there is existing pending work with the same unique tag, 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

ExistingWorkPolicy KEEP

If there is existing pending work with the same unique tag, do nothing. Otherwise, insert the newly-specified work.

REPLACE

ExistingWorkPolicy REPLACE

If there is existing pending work with the same unique tag, cancel and delete it. Then, insert the newly-specified work.

Public methods

valueOf

ExistingWorkPolicy valueOf (String name)

Parameters
name String

Returns
ExistingWorkPolicy

values

ExistingWorkPolicy[] values ()

Returns
ExistingWorkPolicy[]