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 SummaryModifier 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- 
destroyJobDestroy 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.
 
- 
setPowerIssue 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 be- JobState.READYor- JobState.QUEUED. NB: Use- destroyJob(int, String)to move to- JobState.DESTROYED.
- Returns:
- Whether any change has been requested.
 
 
-