public enum BatchStatus extends java.lang.Enum<BatchStatus>
Enum Constant and Description |
---|
ABANDONED |
COMPLETED
The order of the status values is significant because it can be used to
aggregate a set of status values - the result should be the maximum
value.
|
FAILED |
STARTED |
STARTING |
STOPPED |
STOPPING |
UNKNOWN |
Modifier and Type | Method and Description |
---|---|
javax.batch.runtime.BatchStatus |
getBatchStatus()
Converts the current status to the JSR-352 equivalent
|
boolean |
isGreaterThan(BatchStatus other) |
boolean |
isLessThan(BatchStatus other) |
boolean |
isLessThanOrEqualTo(BatchStatus other) |
boolean |
isRunning()
Convenience method to decide if a status indicates work is in progress.
|
boolean |
isUnsuccessful()
Convenience method to decide if a status indicates execution was
unsuccessful.
|
static BatchStatus |
match(java.lang.String value)
Find a BatchStatus that matches the beginning of the given value.
|
static BatchStatus |
max(BatchStatus status1,
BatchStatus status2) |
BatchStatus |
upgradeTo(BatchStatus other)
Method used to move status values through their logical progression, and
override less severe failures with more severe ones.
|
static BatchStatus |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static BatchStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BatchStatus COMPLETED
upgradeTo(BatchStatus)
). Higher
values than STARTED signify more serious failure. ABANDONED is used for
steps that have finished processing, but were not successful, and where
they should be skipped on a restart (so FAILED is the wrong status).public static final BatchStatus STARTING
public static final BatchStatus STARTED
public static final BatchStatus STOPPING
public static final BatchStatus STOPPED
public static final BatchStatus FAILED
public static final BatchStatus ABANDONED
public static final BatchStatus UNKNOWN
public static BatchStatus[] values()
for (BatchStatus c : BatchStatus.values()) System.out.println(c);
public static BatchStatus valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static BatchStatus max(BatchStatus status1, BatchStatus status2)
public boolean isRunning()
public boolean isUnsuccessful()
public BatchStatus upgradeTo(BatchStatus other)
other
- another status to compare topublic boolean isGreaterThan(BatchStatus other)
other
- a status value to comparepublic boolean isLessThan(BatchStatus other)
other
- a status value to comparepublic boolean isLessThanOrEqualTo(BatchStatus other)
other
- a status value to comparepublic javax.batch.runtime.BatchStatus getBatchStatus()
public static BatchStatus match(java.lang.String value)
value
- a string representing a status