|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.basedb.clients.jobagent.slotmanager.InternalSlotManager
public class InternalSlotManager
The internal slot manager assigns slot to jobs based on their estimated execution time. The configuration file gives the maximum number of slots for each execution time:
Job.ExecutionTime.SHORTEST
Job.ExecutionTime.SHORT
Job.ExecutionTime.MEDIUM
Job.ExecutionTime.LONG
| Field Summary | |
|---|---|
private Agent |
agent
|
private static Logger |
log
|
private int[] |
maxSlots
|
private int[] |
usedSlots
|
| Constructor Summary | |
|---|---|
InternalSlotManager()
|
|
| Method Summary | |
|---|---|
void |
close()
This method is called when the job agent is shutting down. |
protected Agent |
getAgent()
Get the job agent this slot manager belongs to. |
protected Slot |
getSlot(Job.ExecutionTime estimated)
Get a slot for a job with the given estimated execution time. |
Slot |
getSlot(Job job)
Get a slot for the specified job. |
void |
init(Agent agent)
Initialize the slot manager. |
void |
releaseSlot(Slot slot)
Called by the job agent when the job has finished exeuting. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final Logger log
private Agent agent
private int[] maxSlots
private int[] usedSlots
| Constructor Detail |
|---|
public InternalSlotManager()
| Method Detail |
|---|
public void init(Agent agent)
SlotManager
init in interface SlotManageragent - The job agentpublic void close()
SlotManager
close in interface SlotManagerpublic Slot getSlot(Job job)
SlotManager
getSlot in interface SlotManagerjob - The job that the job agent wants to execute
public void releaseSlot(Slot slot)
SlotManager
releaseSlot in interface SlotManagerslot - The slot that was assigned to the jobprotected Agent getAgent()
init(Agent)protected Slot getSlot(Job.ExecutionTime estimated)
estimated - The estimated execution time of the slot
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||