Interface PowerController
- All Known Implementing Classes:
AllocatorTask
public interface PowerController
A service that knows how to initiate the setting of the power state of a job.
- Author:
- Donal Fellows
-
Method Summary
Modifier and TypeMethodDescriptionvoiddestroyJob(int jobId, String reason) Destroy a job.booleansetPower(int jobId, PowerState power, JobState targetState) Issue a power change for a job.
-
Method Details
-
destroyJob
Destroy a job. The power controller has the responsibility because it releases any resources held by the job.- Parameters:
jobId- The ID of the job.reason- Why is the job being destroyed.
-
setPower
Issue a power change for a job.- Parameters:
jobId- The ID of the allocated job.power- What state to change the job's boards' power to.targetState- What state are we aiming to put the job into once the power has been switched. Should beJobState.READYorJobState.QUEUED. NB: UsedestroyJob(int, String)to move toJobState.DESTROYED.- Returns:
- Whether any change has been requested.
-