Class JobDescription.Builder
java.lang.Object
uk.ac.manchester.spinnaker.spalloc.messages.JobDescription.Builder
- Enclosing class:
- JobDescription
public static class JobDescription.Builder extends Object
Builder for
JobDescription
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description JobDescription
build()
Build an instance of the immutableJobDescription
.void
setArgs(List<Integer> args)
void
setBoards(List<BoardCoordinates> boards)
void
setJobID(int jobID)
void
setKeepAlive(double keepAlive)
void
setKeepAliveHost(String keepAliveHost)
void
setKwargs(Map<String,Object> kwargs)
void
setMachine(String machine)
void
setOwner(String owner)
void
setPower(Boolean power)
void
setReason(String reason)
void
setStartTime(Double startTime)
void
setState(State state)
-
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.
-