Class CreateJob
java.lang.Object
uk.ac.manchester.spinnaker.alloc.client.CreateJob
public final class CreateJob extends Object
A request to create a job.
- Author:
- Donal Fellows
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CreateJob.Dimensions
Used when asking for a rectangle of boards.static class
CreateJob.SpecificBoard
Used when asking for a specific board. -
Field Summary
Fields Modifier and Type Field Description static Duration
DEFAULT_KEEPALIVE
The default keep-alive interval. -
Constructor Summary
Constructors Constructor Description CreateJob()
Create 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.CreateJob(String machine, String ipAddress)
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 Type Method Description CreateJob.SpecificBoard
getBoard()
CreateJob.Dimensions
getDimensions()
String
getGroup()
Duration
getKeepaliveInterval()
String
getMachineName()
Integer
getMaxDeadBoards()
String
getNmpiCollab()
Integer
getNmpiJobId()
Integer
getNumBoards()
String
getOwner()
List<String>
getTags()
void
setBoard(CreateJob.SpecificBoard board)
void
setDimensions(CreateJob.Dimensions dimensions)
void
setGroup(String group)
void
setKeepaliveInterval(Duration keepaliveInterval)
void
setMachineName(String machineName)
void
setMaxDeadBoards(Integer maxDeadBoards)
void
setNmpiCollab(String nmpiCollab)
void
setNmpiJobId(Integer nmpiJobId)
void
setNumBoards(Integer numBoards)
void
setOwner(String owner)
Set the owner of the job to something other than the user requesting.void
setTags(List<String> tags)
-
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
null
if 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
tags
are mutually exclusive, but at least one must be given.
-
setMachineName
- Parameters:
machineName
- Which machine to allocate on. This andtags
are mutually exclusive, but at least one must be given.
-
getTags
- Returns:
- The tags to select which machine to allocate on. This and
machineName
are mutually exclusive, but at least one must be given.
-
setTags
- Parameters:
tags
- The tags to select which machine to allocate on. This andmachineName
are 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.
-