public class Scheduler extends Thread implements ProcessListener
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier and Type | Method and Description |
---|---|
boolean |
cancelJob(long id,
boolean force)
Attempts to cancel a running job with the given id, optionally cancelling jobs that have
already been submitted to a node.
|
void |
close() |
void |
error(long id,
Throwable t) |
ClusterNode |
getNode(ProcessManager pm) |
ArrayList<ProcessManager<?>> |
getRemainingJobs() |
int |
numQueuedJobs() |
int |
numRunningJobs() |
void |
poke() |
boolean |
processFinished(ProcessManager<?> process)
This method will be called when a ProcessManager is returned from the cluster.
|
<T> ArchipelagoFuture<T> |
queueNormal(Callable<T> callable,
float np,
boolean f) |
<T> ArchipelagoFuture<T> |
queuePriority(Callable<T> callable,
float np,
boolean f) |
boolean |
reschedule(ProcessManager pm) |
void |
run() |
void |
start() |
activeCount, checkAccess, clone, 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, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
public Scheduler(Cluster cluster)
public boolean processFinished(ProcessManager<?> process)
ProcessListener
processFinished
in interface ProcessListener
process
- a ProcessManager that just returned from the clusterpublic void error(long id, Throwable t)
public int numRunningJobs()
public int numQueuedJobs()
public <T> ArchipelagoFuture<T> queueNormal(Callable<T> callable, float np, boolean f)
public <T> ArchipelagoFuture<T> queuePriority(Callable<T> callable, float np, boolean f)
public boolean reschedule(ProcessManager pm)
public ClusterNode getNode(ProcessManager pm)
public boolean cancelJob(long id, boolean force)
id
- the id of the job to cancelforce
- set true to cancel a job that is currently executing, false otherwise.public void close()
public void poke()
public ArrayList<ProcessManager<?>> getRemainingJobs()
Copyright © 2015–2021 Fiji. All rights reserved.