Package org.cdlib.mrt.zk
Enum BatchState
- java.lang.Object
-
- java.lang.Enum<BatchState>
-
- org.cdlib.mrt.zk.BatchState
-
- All Implemented Interfaces:
Serializable
,Comparable<BatchState>
,IngestState
public enum BatchState extends Enum<BatchState> implements IngestState
Batch State Transitions
- See Also:
- State Transition Design, State Definition Yaml
-
-
Enum Constant Summary
Enum Constants Enum Constant Description Completed
All jobs COMPLETEDDeleted
Failed
At least one job FAILEDHeld
Collection is HELD.Pending
Batch is ready to be processedProcessing
Payload is analyzed.Reporting
All jobs have COMPLETED or FAILED, a summary e-mail is sent to the depositor.UpdateReporting
Determine if any previously FAILED jobs are not complete.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<IngestState>
nextStates()
IngestState
stateChange(IngestState next)
static BatchState
valueOf(String name)
Returns the enum constant of this type with the specified name.static BatchState[]
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 BatchState Pending
Batch is ready to be processed
-
Held
public static final BatchState Held
Collection is HELD. The hold must be released before the batch can proceed.
-
Processing
public static final BatchState Processing
Payload is analyzed. If the payload is a manifest, it will be downloaded. Jobs are created in the job queue.
-
Reporting
public static final BatchState Reporting
All jobs have COMPLETED or FAILED, a summary e-mail is sent to the depositor.
-
Failed
public static final BatchState Failed
At least one job FAILED
-
UpdateReporting
public static final BatchState UpdateReporting
Determine if any previously FAILED jobs are not complete. If so, notify the depositor by email.
-
Completed
public static final BatchState Completed
All jobs COMPLETED
-
Deleted
public static final BatchState Deleted
-
-
Method Detail
-
values
public static BatchState[] 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 (BatchState c : BatchState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BatchState 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
-
-