|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.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 FormField 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 Agent
master
- the remote interface to the MasterrunInfo
- run information passed by MasterdriverType
- timer
- BenchmarkDefinition Start time
RemoteException
public void startThreads()
startThreads
in interface Agent
public void run()
run
in interface Runnable
Runnable.run()
public int getId()
getId
in interface Agent
public void abortRun()
public void waitForThreadStart()
waitForThreadStart
in interface Agent
public void setStartTime(int time)
setStartTime
in interface Agent
time
- The relative millisec time of the benchmark startpublic void kill()
kill
in interface Agent
public void terminate()
terminate
in interface Agent
public Metrics getResults()
getResults
in interface Agent
Metrics
public void join()
join
in interface Agent
public void postRun()
postRun
in interface Agent
public void unreferenced()
unreferenced
in interface Unreferenced
public 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 |