|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.scheduler.policy.AbstractPolicy
public abstract class AbstractPolicy
This is an abstract class that contains all the essential tools for the job managers to run. Mainly, the insertion and deployement of jobs, and an abstract comparer that should be redefined in the specific policies.
Field Summary | |
---|---|
protected java.util.HashMap |
deployedTasks
|
protected Queue |
queue
|
protected RessourceManager |
ressourceManager
|
Fields inherited from interface org.objectweb.proactive.scheduler.JobConstants |
---|
XML_DESC |
Fields inherited from interface org.objectweb.proactive.scheduler.SchedulerConstants |
---|
JOB_ID, JVM_PARAMETERS, POLICY_NAME, SCHEDULER_NODE_NAME, SCHEDULER_URL, XML_PATH |
Constructor Summary | |
---|---|
AbstractPolicy()
|
|
AbstractPolicy(RessourceManager ressourceManager)
This is the main constructor for the creation of the job manager object. |
Method Summary | |
---|---|
void |
checkRunningTasks()
Check the list of the running jobs to find out if there is one that's finished so that we can free the allocated ressources. |
BooleanWrapper |
del(java.lang.String jobId)
Deletes the job from the queue and stops it if it has already been launched. |
void |
end()
Does some cleaning before ending the job manager. |
void |
execute()
This method is used to execute a job if the required ressources are available. |
java.util.HashMap |
getDeployedTasks()
returns the list of the deployed jobs. |
Queue |
getQueue()
Returns the queue that stores the waiting jobs. |
abstract boolean |
isToBeServed(GenericJob job1,
GenericJob job2)
This is an abstract comparer method to be redefined by the specifique policy ... |
java.lang.String |
nextTask()
returns the job that should run next (according to the implemented policy). |
void |
runActivity(Body body)
This method has been redefined to reimplement the way this active object works and serves its methods. |
java.util.Vector |
stat(java.lang.String jobId)
Gives description of all the jobs that are curently running in forms of a Vector if no specific id is specified, else, it gives the description of the specified job if it exists. |
BooleanWrapper |
sub(GenericJob job)
Insert job's descriptions in the queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected RessourceManager ressourceManager
protected Queue queue
protected java.util.HashMap deployedTasks
Constructor Detail |
---|
public AbstractPolicy()
public AbstractPolicy(RessourceManager ressourceManager)
ressourceManager
- the ressourceManager object responsible for
the management and the acquisition of the ressources.Method Detail |
---|
public void runActivity(Body body)
runActivity
in interface RunActive
body
- the body of the active object being startedpublic void checkRunningTasks()
public BooleanWrapper sub(GenericJob job)
job:
- the descriptions of the job
public BooleanWrapper del(java.lang.String jobId)
id:
- the id of the job
public java.util.Vector stat(java.lang.String jobId)
public abstract boolean isToBeServed(GenericJob job1, GenericJob job2)
job1
- job2
-
public java.lang.String nextTask()
public java.util.HashMap getDeployedTasks()
public void execute()
public void end()
public Queue getQueue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |