Interface SpallocClient
public interface SpallocClient
An API for talking to the Spalloc service.
- Author:
- Donal Fellows
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
The services offered relating to a Spalloc job.static interface
The services offered relating to a Spalloc machine.static class
Exception caused by the server sending an error. -
Method Summary
Modifier and TypeMethodDescriptionCreate a job.Get the server version ID.default List<SpallocClient.Job>
listJobs()
List the existing non-terminated jobs.listJobs
(boolean waitForChange) List the existing non-terminated jobs.default Stream<SpallocClient.Job>
List the jobs, including the deleted ones.listJobsWithDeleted
(boolean waitForChange) List the jobs, including the deleted ones.Get a list of all Spalloc machines.
-
Method Details
-
getVersion
Get the server version ID.- Returns:
- A version ID.
- Throws:
IOException
- If things go wrong.
-
listMachines
Get a list of all Spalloc machines.- Returns:
- The list of machines.
- Throws:
IOException
- If things go wrong.
-
listJobs
List the existing non-terminated jobs.- Parameters:
waitForChange
- Iftrue
, will wait until the list of jobs may have changed. (Best-effort only; waiting time is bounded at 30 seconds.)- Returns:
- A list of jobs.
- Throws:
IOException
- If things go wrong.
-
listJobsWithDeleted
List the jobs, including the deleted ones.NB: Care should be taken; this may produce a lot of output.
- Parameters:
waitForChange
- Iftrue
, will wait until the list of jobs may have changed. (Best-effort only; waiting time is bounded at 30 seconds.)- Returns:
- A stream of jobs.
- Throws:
IOException
- If things go wrong.
-
listJobs
List the existing non-terminated jobs.- Returns:
- A list of jobs.
- Throws:
IOException
- If things go wrong.
-
listJobsWithDeleted
List the jobs, including the deleted ones.NB: Care should be taken; this may produce a lot of output.
- Returns:
- A stream of jobs.
- Throws:
IOException
- If things go wrong.
-
createJob
Create a job.- Parameters:
createInstructions
- Describes the job to create.- Returns:
- A handle to the created job.
- Throws:
IOException
- If job creation fails.
-