|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.faban.harness.engine.RunDaemon
public class RunDaemon
This class implements the RunDaemon thread. The runq object notifies this thread whenever a new run is added to the runq. The RunDaemon thread picks the next run for execution and checks the runType file. If it is a benchmark run, it instantiates the GenericBenchmark object to execute the benchmark in a separate thread and waits for it to complete. If it is a command then it uses the runCommand object to execute the same.
Constructor Summary | |
---|---|
RunDaemon(RunQLock runqLock)
Constructor. |
Method Summary | |
---|---|
void |
exit()
Exits the RunDaemon. |
Run |
fetchNextRun(String name)
Fetches the next run from the run queue and places it into the output to be executed. |
String |
getCurrentRunBenchmark()
Obtains the short name of the current benchmark run. |
String |
getCurrentRunId()
Obtains the run id of the current run. |
String |
getRunDaemonThreadStatus()
Obtains RunDaemon thread status. |
String |
killCurrentRun(String runId,
String user)
To abort the currently executing benchmark run. |
NameValuePair<Long> |
nextRunAge(long minAge)
Obtains the name and age of the next run, in milliseconds since submitted, if the age is more than minAge. |
boolean |
resumeRunDaemonThread()
Called by RunQ's resumeRunDaemon method. |
void |
run()
The run method for the RunDaemonThread. |
boolean |
suspendRunDaemonThread()
Called by RunQ's stopRunDaemon method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RunDaemon(RunQLock runqLock)
runqLock
- the monitor object used to syncronize on the runqMethod Detail |
---|
public NameValuePair<Long> nextRunAge(long minAge)
minAge
- The minimum run age to return.
public Run fetchNextRun(String name) throws RunEntryException, IOException, ClassNotFoundException
name
- The name of the run to fetch
RunEntryException
- The next run entry is incomplete
IOException
- There is an error reading the entry
ClassNotFoundException
- Could not find the benchmark class
for the run.public void run()
run
in interface Runnable
public String getCurrentRunId()
public String getCurrentRunBenchmark()
public String killCurrentRun(String runId, String user)
runId
- The name of the runuser
- The user killing the run
public void exit()
public String getRunDaemonThreadStatus()
public boolean suspendRunDaemonThread()
public boolean resumeRunDaemonThread()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |