Package org.cdlib.mrt.zk
Enum JobState
- java.lang.Object
-
- java.lang.Enum<JobState>
-
- org.cdlib.mrt.zk.JobState
-
- All Implemented Interfaces:
Serializable
,Comparable<JobState>
,IngestState
public enum JobState extends Enum<JobState> implements IngestState
Job State Transitions
- See Also:
- State Transition Design, State Definition Yaml
-
-
Enum Constant Summary
Enum Constants Enum Constant Description Completed
Storage and inventory are complete, cleanup job folderDeleted
Downloading
One or more downloads is in progress.Estimating
Perform HEAD requests for all content to estimate the size of the ingest.Failed
The queue will track the last successful step so that the job can be resumed at the appropriate step.Held
Since Job was queued, the collection has been put into a HELD state.Notify
Invoke callback if needed Notify batch handler that the job is completePending
Job is waiting to be acquired by the queueProcessing
All downloads complete; perform Merritt Ingest (validate checksum, mint, create system files, notify storage)Provisioning
Once dynamic provisioning is implemented (ie zfs provisioning), wait for dedicated file system to be provisioned.Recording
Storage is complete; ready for Inventory.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<IngestState>
nextStates()
IngestState
stateChange(IngestState next)
static JobState
valueOf(String name)
Returns the enum constant of this type with the specified name.static JobState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface org.cdlib.mrt.zk.IngestState
fail, isDeletable, name, stateChangeAllowed, success
-
-
-
-
Enum Constant Detail
-
Pending
public static final JobState Pending
Job is waiting to be acquired by the queue
-
Held
public static final JobState Held
Since Job was queued, the collection has been put into a HELD state. The job will require an administrateive action to release it after the hold is released.
-
Estimating
public static final JobState Estimating
Perform HEAD requests for all content to estimate the size of the ingest. If HEAD requests are not supported, no value is updated and the job should proceed with limited information. This could potentially affect priority for the job
-
Provisioning
public static final JobState Provisioning
Once dynamic provisioning is implemented (ie zfs provisioning), wait for dedicated file system to be provisioned. If not dedicated file system is specified, use default working storage. if working storage is more than 80% full, then wait otherwise, use default working storage
-
Downloading
public static final JobState Downloading
One or more downloads is in progress. This can be a multi-threaded step. Threads are not managed in the queue.
-
Processing
public static final JobState Processing
All downloads complete; perform Merritt Ingest (validate checksum, mint, create system files, notify storage)
-
Recording
public static final JobState Recording
Storage is complete; ready for Inventory. The Inventory service will operate on this step.
-
Notify
public static final JobState Notify
Invoke callback if needed Notify batch handler that the job is complete
-
Failed
public static final JobState Failed
The queue will track the last successful step so that the job can be resumed at the appropriate step.
-
Completed
public static final JobState Completed
Storage and inventory are complete, cleanup job folder
-
Deleted
public static final JobState Deleted
-
-
Method Detail
-
values
public static JobState[] 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 (JobState c : JobState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JobState 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
-
nextStates
public List<IngestState> nextStates()
- Specified by:
nextStates
in interfaceIngestState
-
stateChange
public IngestState stateChange(IngestState next)
- Specified by:
stateChange
in interfaceIngestState
-
-