public class SimpleJvmExitCodeMapper extends Object implements ExitCodeMapper
ExitCodeMapper that can be configured through a
map from batch exit codes (String) to integer results. Some default entries
are set up to recognise common cases. Any that are injected are added to
these.| Modifier and Type | Field and Description |
|---|---|
protected static Log |
log |
JVM_EXITCODE_COMPLETED, JVM_EXITCODE_FORCE_KILLED, JVM_EXITCODE_GENERIC_ERROR, JVM_EXITCODE_INVALID_CONFIG_FILE, JVM_EXITCODE_INVALID_CONTAINER_EXEC_PERMISSIONS, JVM_EXITCODE_INVALID_CONTAINER_PID, JVM_EXITCODE_INVALID_USER_NAME, JVM_EXITCODE_TERMINATED, JVM_EXITCODE_UNABLE_TO_EXECUTE_CONTAINER_SCRIPT, JVM_EXITCODE_WRITE_CGROUP_FAILED| Constructor and Description |
|---|
SimpleJvmExitCodeMapper() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Integer> |
getMapping() |
int |
intValue(Boolean exitCode)
Convert the exit code from Boolean into an integer that the calling
environment as an operating system can interpret as an exit status.
|
int |
intValue(String exitCode)
Get the operating system exit status that matches a certain Batch
Framework Exitcode
|
void |
setMapping(Map<String,Integer> exitCodeMap)
Supply the ExitCodeMappings
|
protected static final Log log
public void setMapping(Map<String,Integer> exitCodeMap)
exitCodeMap - A set of mappings between environment specific exit codes and
batch framework internal exit codespublic int intValue(String exitCode)
intValue in interface ExitCodeMapperexitCode - The exitcode of the Batch Job as known by the Batch Frameworkpublic int intValue(Boolean exitCode)
ExitCodeMapperintValue in interface ExitCodeMapperexitCode - The exit code which is used internally.