Package org.nuxeo.ecm.core.work.api
Enum WorkManager.Scheduling
- java.lang.Object
-
- java.lang.Enum<WorkManager.Scheduling>
-
- org.nuxeo.ecm.core.work.api.WorkManager.Scheduling
-
- All Implemented Interfaces:
Serializable
,Comparable<WorkManager.Scheduling>
- Enclosing interface:
- WorkManager
public static enum WorkManager.Scheduling extends Enum<WorkManager.Scheduling>
The scheduling policy to use when adding a work instance usingWorkManager.schedule(Work, Scheduling)
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CANCEL_SCHEDULED
Any other scheduled work equals to this one is removed from scheduling and canceled first, before this work is scheduled.ENQUEUE
Always schedule the work.IF_NOT_RUNNING_OR_SCHEDULED
If there is a running or scheduled work equals to this one, then don't schedule the work.IF_NOT_SCHEDULED
If there is a scheduled work equals to this one, then don't schedule the work.
-
Field Summary
Fields Modifier and Type Field Description Work.State
state
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WorkManager.Scheduling
valueOf(String name)
Returns the enum constant of this type with the specified name.static WorkManager.Scheduling[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ENQUEUE
public static final WorkManager.Scheduling ENQUEUE
Always schedule the work.
-
CANCEL_SCHEDULED
public static final WorkManager.Scheduling CANCEL_SCHEDULED
Any other scheduled work equals to this one is removed from scheduling and canceled first, before this work is scheduled.
-
IF_NOT_SCHEDULED
public static final WorkManager.Scheduling IF_NOT_SCHEDULED
If there is a scheduled work equals to this one, then don't schedule the work.
-
IF_NOT_RUNNING_OR_SCHEDULED
public static final WorkManager.Scheduling IF_NOT_RUNNING_OR_SCHEDULED
If there is a running or scheduled work equals to this one, then don't schedule the work.
-
-
Field Detail
-
state
public final Work.State state
-
-
Method Detail
-
values
public static WorkManager.Scheduling[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (WorkManager.Scheduling c : WorkManager.Scheduling.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WorkManager.Scheduling valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-