Class CreateJob
java.lang.Object
uk.ac.manchester.spinnaker.alloc.client.CreateJob
A request to create a job.
- Author:
- Donal Fellows
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classUsed when asking for a rectangle of boards.static final classUsed when asking for a specific board. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a request to run on a single board using the default machine operated by the Spalloc service.CreateJob(int numBoards) Create a request to run on a number of boards using the default machine operated by the Spalloc service.CreateJob(int width, int height) Create a request to run on rectangle of triads of boards using the default machine operated by the Spalloc service.Create a request to run on a specific board of a specific machine operated by the Spalloc service.CreateJob(String machine, PhysicalCoords coords) Create a request to run on a specific board of a specific machine operated by the Spalloc service.CreateJob(String machine, TriadCoords triad) Create a request to run on a specific board of a specific machine operated by the Spalloc service. -
Method Summary
Modifier and TypeMethodDescriptiongetBoard()getGroup()getOwner()getTags()voidsetBoard(CreateJob.SpecificBoard board) voidsetDimensions(CreateJob.Dimensions dimensions) voidvoidsetKeepaliveInterval(Duration keepaliveInterval) voidsetMachineName(String machineName) voidsetMaxDeadBoards(Integer maxDeadBoards) voidsetNmpiCollab(String nmpiCollab) voidsetNmpiJobId(Integer nmpiJobId) voidsetNumBoards(Integer numBoards) voidSet the owner of the job to something other than the user requesting.void
-
Field Details
-
DEFAULT_KEEPALIVE
The default keep-alive interval.
-
-
Constructor Details
-
CreateJob
public CreateJob()Create a request to run on a single board using the default machine operated by the Spalloc service.Note that you can configure this request further.
-
CreateJob
public CreateJob(int numBoards) Create a request to run on a number of boards using the default machine operated by the Spalloc service.Note that you can configure this request further.
- Parameters:
numBoards- The number of boards to ask for.- Throws:
IllegalArgumentException- If the number of boards is less than 1
-
CreateJob
public CreateJob(int width, int height) Create a request to run on rectangle of triads of boards using the default machine operated by the Spalloc service.Note that you can configure this request further.
- Parameters:
width- The width of the rectangle, in triadsheight- The height of the rectangle, in triads- Throws:
IllegalArgumentException- If either of the dimensions is less than 1
-
CreateJob
Create a request to run on a specific board of a specific machine operated by the Spalloc service.Note that you can configure this request further.
- Parameters:
machine- Which machine of the service to use?triad- Which board of the machine to request? This is the logical coordinates.
-
CreateJob
Create a request to run on a specific board of a specific machine operated by the Spalloc service.Note that you can configure this request further.
- Parameters:
machine- Which machine of the service to use?coords- The physical coordinates of the board to request.
-
CreateJob
Create a request to run on a specific board of a specific machine operated by the Spalloc service.Note that you can configure this request further.
- Parameters:
machine- Which machine of the service to use?ipAddress- The IP address of the board of the machine to request
-
-
Method Details
-
getKeepaliveInterval
- Returns:
- How long after a keepalive message will the job be auto-deleted? Required. Must be between 30 and 300 seconds.
-
setKeepaliveInterval
- Parameters:
keepaliveInterval- How long after a keepalive message will the job be auto-deleted? Required. Must be between 30 and 300 seconds.
-
getNumBoards
- Returns:
- The number of boards to request. May be
nullif a different type of request is made.
-
setNumBoards
- Parameters:
numBoards- The number of boards to request.
-
getDimensions
- Returns:
- The size of rectangle of boards to request.
-
setDimensions
- Parameters:
dimensions- The size of rectangle of boards to request.
-
getBoard
- Returns:
- The address of the specific board to request.
-
setBoard
- Parameters:
board- The address of the specific board to request.
-
getMachineName
- Returns:
- Which machine to allocate on. This and
tagsare mutually exclusive, but at least one must be given.
-
setMachineName
- Parameters:
machineName- Which machine to allocate on. This andtagsare mutually exclusive, but at least one must be given.
-
getTags
- Returns:
- The tags to select which machine to allocate on. This and
machineNameare mutually exclusive, but at least one must be given.
-
setTags
- Parameters:
tags- The tags to select which machine to allocate on. This andmachineNameare mutually exclusive, but at least one must be given.
-
getMaxDeadBoards
- Returns:
- The maximum number of dead boards allowed in a rectangular allocation. Note that the allocation engine might increase this if it decides to overallocate.
-
setMaxDeadBoards
- Parameters:
maxDeadBoards- The maximum number of dead boards allowed in a rectangular allocation. Note that the allocation engine might increase this if it decides to overallocate.
-
getOwner
- Returns:
- The owner; only works when the user is admin or NMPI.
-
setOwner
Set the owner of the job to something other than the user requesting. Only works when the user has this permission.- Parameters:
owner- The new owner.
-
getGroup
- Returns:
- The group the quota for the job should be allocated against.
-
setGroup
- Parameters:
group- The group the quota for the job should be allocated against.
-
getNmpiCollab
- Returns:
- The collaboratory that the quota for the job should be allocated against.
-
setNmpiCollab
- Parameters:
nmpiCollab- The collaboratory that the quota for the job should be allocated against.
-
getNmpiJobId
- Returns:
- The NMPI job that the quota should be allocated against.
-
setNmpiJobId
- Parameters:
nmpiJobId- The NMPI job that the quota should be allocated against.
-