|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.sun.faban.driver.engine.AgentImpl
public class AgentImpl
AgentImpl executes the driver threads of any given subtype. It receives commands from the Master. The AgentImpl is responsible for spawning and managing threads, synchronizing between the threads and aggregating the stats from all threads.
Agent,
AgentThread,
Serialized Form| Field Summary |
|---|
| Fields inherited from class java.rmi.server.RemoteObject |
|---|
ref |
| Method Summary | |
|---|---|
void |
abortRun()
Contacts the master to abort the run. |
void |
configure(Master master,
RunInfo runInfo,
int driverType,
Timer timer)
Configures each agents with the properties passed. |
int |
getId()
Obtains the id of this agent. |
Metrics |
getResults()
Report stats from a run Each thread's result is obtained by calling that thread's getResult() All these results are then aggregated by calling one of the thread's getAggregateResult method. |
void |
join()
Waits for all the threads to terminate. |
void |
kill()
This method kills off the current run. |
static void |
main(String[] argv)
AgentImpl's main method. |
void |
postRun()
Invokes the post run method on thread 0 of each driver agent 0, if postRun is configured. |
void |
run()
Starts the driver threads for this agent, possibly in it's own thread. |
void |
setStartTime(int time)
Sets the actual run start time. |
void |
startThreads()
Start all the driver threads. |
void |
terminate()
Terminates all leftover threads remaining at the end of the run. |
void |
unreferenced()
When this instance is unreferenced the application must exit. |
void |
waitForThreadStart()
Wait until all threads are started. |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
|---|
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
|---|
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
|---|
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public void configure(Master master,
RunInfo runInfo,
int driverType,
Timer timer)
throws RemoteException
configure in interface Agentmaster - the remote interface to the MasterrunInfo - run information passed by MasterdriverType - timer - BenchmarkDefinition Start time
RemoteExceptionpublic void startThreads()
startThreads in interface Agentpublic void run()
run in interface RunnableRunnable.run()public int getId()
getId in interface Agentpublic void abortRun()
public void waitForThreadStart()
waitForThreadStart in interface Agentpublic void setStartTime(int time)
setStartTime in interface Agenttime - The relative millisec time of the benchmark startpublic void kill()
kill in interface Agentpublic void terminate()
terminate in interface Agentpublic Metrics getResults()
getResults in interface AgentMetricspublic void join()
join in interface Agentpublic void postRun()
postRun in interface Agentpublic void unreferenced()
unreferenced in interface Unreferencedpublic static void main(String[] argv)
argv - the arguments passed to the java command
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||