Class JobDescription.Builder
java.lang.Object
uk.ac.manchester.spinnaker.spalloc.messages.JobDescription.Builder
- Enclosing class:
- JobDescription
Builder for
JobDescription.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build an instance of the immutableJobDescription.voidvoidsetBoards(List<BoardCoordinates> boards) voidsetJobID(int jobID) voidsetKeepAlive(double keepAlive) voidsetKeepAliveHost(String keepAliveHost) voidvoidsetMachine(String machine) voidvoidvoidvoidsetStartTime(Double startTime) void
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setJobID
public void setJobID(int jobID) - Parameters:
jobID- The job's identifier.
-
setOwner
- Parameters:
owner- The job's owner.
-
setStartTime
- Parameters:
startTime- When the job started, in seconds from the epoch.
-
setState
- Parameters:
state- The job state.
-
setPower
- Parameters:
power- Whether the job's allocated boards are powered on.
-
setKeepAlive
public void setKeepAlive(double keepAlive) - Parameters:
keepAlive- The job's maximum keepalive interval, in seconds.
-
setReason
- Parameters:
reason- The reason why the job terminated.
-
setMachine
- Parameters:
machine- The name of the machine that the job is allocated to.
-
setArgs
- Parameters:
args- The positional arguments used to create the job.
-
setKwargs
- Parameters:
kwargs- The keyword arguments used to create the job.
-
setBoards
- Parameters:
boards- The boards allocated to the job and their locations.
-
setKeepAliveHost
- Parameters:
keepAliveHost- The host believed to be keeping the job alive.
-
build
Build an instance of the immutableJobDescription.- Returns:
- The instance.
-