public static class JobProcessResult.Builder
extends java.lang.Object
JobProcessResult
instances.Constructor and Description |
---|
Builder(JobStatus finalStatus,
java.lang.String finalStatusMessage,
int exitCode)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
JobProcessResult |
build()
Create a new immutable
JobProcessResult instance based on the current contents of this builder. |
JobProcessResult.Builder |
withStdErrSize(long stdErrSize)
Set the length of the std error file in bytes if there was one.
|
JobProcessResult.Builder |
withStdOutSize(long stdOutSize)
Set the length of the std out file in bytes if there was one.
|
public Builder(JobStatus finalStatus, java.lang.String finalStatusMessage, int exitCode) throws java.lang.IllegalArgumentException
finalStatus
- The final JobStatus
for the job. JobStatus.isFinished()
must return
truefinalStatusMessage
- The final human readable message for the job statusexitCode
- The process exit codejava.lang.IllegalArgumentException
- When finalStatus is not a final statuspublic JobProcessResult.Builder withStdOutSize(long stdOutSize)
stdOutSize
- The length of the std out file in bytespublic JobProcessResult.Builder withStdErrSize(long stdErrSize)
stdErrSize
- The length of the std error file in bytespublic JobProcessResult build()
JobProcessResult
instance based on the current contents of this builder.JobProcessResult
instance