public static enum Work.State extends Enum<Work.State>
Work
instance.
The following transitions between states are possible:
Enum Constant and Description |
---|
CANCELED
Work instance was canceled.
|
COMPLETED
Work instance has completed normally.
|
FAILED
Work instance has completed with an exception.
|
RUNNING
Work instance is running.
|
SCHEDULED
Work instance is scheduled to run later.
|
UNKNOWN
Work instance is not currently referenced in work manager
|
Modifier and Type | Method and Description |
---|---|
static Work.State |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Work.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Work.State UNKNOWN
public static final Work.State SCHEDULED
public static final Work.State CANCELED
This happens if:
WorkManager.Scheduling.IF_NOT_SCHEDULED
, WorkManager.Scheduling.IF_NOT_RUNNING
, or
WorkManager.Scheduling.IF_NOT_RUNNING_OR_SCHEDULED
),
WorkManager.Scheduling.CANCEL_SCHEDULED
.
public static final Work.State RUNNING
public static final Work.State COMPLETED
public static final Work.State FAILED
public static Work.State[] values()
for (Work.State c : Work.State.values()) System.out.println(c);
public static Work.State valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullCopyright © 2015 Nuxeo SA. All rights reserved.