|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.repeat.ExitStatus
public class ExitStatus
Value object used to carry information about the status of a
RepeatOperations
.
ExitStatus is immutable and therefore thread-safe.
Field Summary | |
---|---|
static ExitStatus |
CONTINUABLE
Convenient constant value representing unfinished processing. |
static ExitStatus |
FAILED
Convenient constant value representing finished processing with an error. |
static ExitStatus |
FINISHED
Convenient constant value representing finished processing. |
static ExitStatus |
NOOP
Convenient constant value representing job that did no processing (e.g. |
static ExitStatus |
UNKNOWN
Convenient constant value representing unknown state - assumed not continuable. |
Constructor Summary | |
---|---|
ExitStatus(boolean continuable)
|
|
ExitStatus(boolean continuable,
String exitCode)
|
|
ExitStatus(boolean continuable,
String exitCode,
String exitDescription)
|
Method Summary | |
---|---|
ExitStatus |
addExitDescription(String description)
Add an exit description to an existing ExitStatus . |
ExitStatus |
and(boolean continuable)
Create a new ExitStatus with a logical combination of the
continuable flag. |
ExitStatus |
and(ExitStatus status)
Create a new ExitStatus with a logical combination of the
continuable flag, and a concatenation of the descriptions. |
boolean |
equals(Object obj)
Compare the fields one by one. |
String |
getExitCode()
Getter for the exit code (defaults to blank). |
String |
getExitDescription()
Getter for the exit description (defaults to blank) |
int |
hashCode()
Compatible with the equals implementation. |
boolean |
isContinuable()
Flag to signal that processing can continue. |
boolean |
isRunning()
Check if this status represents a running process. |
ExitStatus |
replaceExitCode(String code)
Add an exit code to an existing ExitStatus . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ExitStatus UNKNOWN
public static final ExitStatus CONTINUABLE
public static final ExitStatus FINISHED
public static final ExitStatus NOOP
public static final ExitStatus FAILED
Constructor Detail |
---|
public ExitStatus(boolean continuable)
public ExitStatus(boolean continuable, String exitCode)
public ExitStatus(boolean continuable, String exitCode, String exitDescription)
Method Detail |
---|
public boolean isContinuable()
public String getExitCode()
public String getExitDescription()
public ExitStatus and(boolean continuable)
ExitStatus
with a logical combination of the
continuable flag.
continuable
- true if the caller thinks it is safe to continue.
ExitStatus
with isContinuable()
the
logical and of the current value and the argument provided.public ExitStatus and(ExitStatus status)
ExitStatus
with a logical combination of the
continuable flag, and a concatenation of the descriptions. The exit code
is only replaced if the result is continuable or the input is not
continuable.
status
- an ExitStatus
to combine with this one.
ExitStatus
with isContinuable()
the
logical and of the current value and the argument provided.public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public ExitStatus replaceExitCode(String code)
ExitStatus
. If there is already a
code present tit will be replaced.
code
- the code to add
ExitStatus
with the same properties but a new exit
code.public boolean isRunning()
public ExitStatus addExitDescription(String description)
ExitStatus
. If there is
already a description present the two will be concatenated with a
semicolon.
description
- the description to add
ExitStatus
with the same properties but a new exit
description
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |