public class AgentImpl extends UnicastRemoteObject implements Agent, Unreferenced, Runnable
Agent
,
AgentThread
,
Serialized Formref
Modifier and Type | Method and Description |
---|---|
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.
|
clone, exportObject, exportObject, exportObject, unexportObject
getClientHost, getLog, setLog
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 timeRemoteException
public void startThreads()
startThreads
in interface Agent
public void run()
run
in interface Runnable
Runnable.run()
public int getId()
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()
public void terminate()
public Metrics getResults()
getResults
in interface Agent
Metrics
public void join()
public void postRun()
public void unreferenced()
unreferenced
in interface Unreferenced
public static void main(String[] argv)
argv
- the arguments passed to the java command