Class JobProcessResult.Builder
java.lang.Object
com.netflix.genie.agent.execution.process.JobProcessResult.Builder
- Enclosing class:
- JobProcessResult
A builder to create valid, immutable
JobProcessResult
instances.- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create a new immutableJobProcessResult
instance based on the current contents of this builder.withStdErrSize
(long stdErrSize) Set the length of the std error file in bytes if there was one.withStdOutSize
(long stdOutSize) Set the length of the std out file in bytes if there was one.
-
Constructor Details
-
Builder
public Builder(JobStatus finalStatus, String finalStatusMessage, int exitCode) throws IllegalArgumentException Constructor.- Parameters:
finalStatus
- The finalJobStatus
for the job.JobStatus.isFinished()
must return truefinalStatusMessage
- The final human readable message for the job statusexitCode
- The process exit code- Throws:
IllegalArgumentException
- When finalStatus is not a final status
-
-
Method Details
-
withStdOutSize
Set the length of the std out file in bytes if there was one.- Parameters:
stdOutSize
- The length of the std out file in bytes- Returns:
- This builder object
-
withStdErrSize
Set the length of the std error file in bytes if there was one.- Parameters:
stdErrSize
- The length of the std error file in bytes- Returns:
- This builder object
-
build
Create a new immutableJobProcessResult
instance based on the current contents of this builder.- Returns:
- A
JobProcessResult
instance
-