|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread org.globus.cog.karajan.scheduler.AbstractScheduler
public abstract class AbstractScheduler
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static String[] |
propertyNames
|
static int |
THROTTLE_OFF
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
AbstractScheduler()
|
Method Summary | |
---|---|
void |
addFailureHandler(FailureHandler handler)
Allows handling task failures at the scheduler level |
void |
addJobStatusListener(StatusListener l,
Task task)
Allows the addition of a status listener that will be invoked whenever the status of the given task changes. |
void |
addTaskHandler(TaskHandlerWrapper taskHandler)
Makes the scheduler aware of a task handler implementation. |
void |
addTaskTransformer(TaskTransformer taskTransformer)
Adds a task transformer to this scheduler. |
protected void |
applyTaskTransformers(Task t,
Contact[] contacts,
Service[] services)
|
protected boolean |
checkConstraints(BoundContact resource,
TaskConstraints tc)
|
protected List |
checkConstraints(List resources,
TaskConstraints tc)
|
static String[] |
combineNames(String[] first,
String[] last)
|
void |
fireJobStatusChangeEvent(StatusEvent e)
|
void |
fireJobStatusChangeEvent(Task source,
Status status)
|
ResourceConstraintChecker |
getConstraintChecker()
|
protected Object |
getConstraints(Task task)
|
Queue |
getJobQueue()
|
int |
getMaxSimultaneousJobs()
|
Object |
getProperty(String name)
|
String[] |
getPropertyNames()
|
ContactSet |
getResources()
Returns the set of resources that the scheduler knows about |
TaskHandlerWrapper |
getTaskHadlerWrapper(int index)
|
List |
getTaskHandlers()
Returns a list of all the task handlers that were added to the scheduler |
TaskHandlerWrapper |
getTaskHandlerWrapper(int type,
String provider)
|
Collection |
getTaskHandlerWrappers(int type)
|
List |
getTaskTransformers()
|
protected void |
removeConstraints(Task task)
|
void |
removeJobStatusListener(StatusListener l,
Task task)
Removes a status listener added using addJobStatusListener |
protected boolean |
runFailureHandlers(Task t)
|
void |
setConstraintChecker(ResourceConstraintChecker constraintChecker)
|
protected void |
setConstraints(Task task,
Object constraint)
|
void |
setMaxSimultaneousJobs(int i)
|
void |
setProperty(String name,
Object value)
Sets a scheduler property. |
void |
setResources(ContactSet grid)
Sets the set of resources that the scheduler will use |
void |
setTaskHandlers(List taskHandlers)
|
protected int |
throttleValue(Object value)
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.globus.cog.karajan.scheduler.Scheduler |
---|
allocateContact, allocateContact, cancelTask, enqueue, releaseContact |
Field Detail |
---|
public static final int THROTTLE_OFF
public static final String[] propertyNames
Constructor Detail |
---|
public AbstractScheduler()
Method Detail |
---|
public final void addTaskHandler(TaskHandlerWrapper taskHandler)
Scheduler
addTaskHandler
in interface Scheduler
TaskHandlerWrapper
public List getTaskHandlers()
Scheduler
getTaskHandlers
in interface Scheduler
public void setTaskHandlers(List taskHandlers)
public TaskHandlerWrapper getTaskHadlerWrapper(int index)
public Collection getTaskHandlerWrappers(int type)
public TaskHandlerWrapper getTaskHandlerWrapper(int type, String provider)
public void setResources(ContactSet grid)
Scheduler
setResources
in interface Scheduler
ContactSet
public ContactSet getResources()
Scheduler
getResources
in interface Scheduler
public void addJobStatusListener(StatusListener l, Task task)
Scheduler
addJobStatusListener
in interface Scheduler
public void removeJobStatusListener(StatusListener l, Task task)
Scheduler
removeJobStatusListener
in interface Scheduler
public void fireJobStatusChangeEvent(StatusEvent e)
public void fireJobStatusChangeEvent(Task source, Status status)
public int getMaxSimultaneousJobs()
public void setMaxSimultaneousJobs(int i)
public Queue getJobQueue()
public void setProperty(String name, Object value)
Scheduler
setProperty
in interface Scheduler
protected int throttleValue(Object value)
public Object getProperty(String name)
public String[] getPropertyNames()
getPropertyNames
in interface Scheduler
public static String[] combineNames(String[] first, String[] last)
protected void setConstraints(Task task, Object constraint)
protected Object getConstraints(Task task)
protected void removeConstraints(Task task)
public void addTaskTransformer(TaskTransformer taskTransformer)
Scheduler
addTaskTransformer
in interface Scheduler
public List getTaskTransformers()
protected void applyTaskTransformers(Task t, Contact[] contacts, Service[] services)
protected boolean runFailureHandlers(Task t)
public void addFailureHandler(FailureHandler handler)
Scheduler
addFailureHandler
in interface Scheduler
public ResourceConstraintChecker getConstraintChecker()
public void setConstraintChecker(ResourceConstraintChecker constraintChecker)
protected boolean checkConstraints(BoundContact resource, TaskConstraints tc)
protected List checkConstraints(List resources, TaskConstraints tc)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |