public class RealTimeFactorPerformanceListener extends java.lang.Object implements IIterativeRunListener, IParameterized
Modifier and Type | Field and Description |
---|---|
protected long |
_blockRealTimeSum |
protected long |
_blockSimTimeSum |
protected int |
_blockSize |
protected java.lang.String |
_fileName |
protected java.lang.StringBuilder |
_row |
protected java.lang.String |
_rowHeader |
static java.lang.String |
BLOCK_SIZE |
static java.lang.String |
FILE_NAME |
static java.lang.String |
ROW_HEADER |
Constructor and Description |
---|
RealTimeFactorPerformanceListener() |
Modifier and Type | Method and Description |
---|---|
void |
exceptionThrown(int index,
IModel model,
java.lang.Throwable thrown)
called if something goes horribly wrong.
|
java.lang.String |
getParameter(java.lang.String key)
return parameter value - null if not defined.
|
java.util.Collection<java.lang.String> |
getPossibleParameters()
Return all parameters that can be read
|
java.util.Collection<java.lang.String> |
getSetableParameters()
Return list of all parameters that can be set.
|
void |
postRun(int currentRunIndex,
int totalRuns,
java.util.Collection<IModel> models) |
void |
preBuild(int currentRunIndex,
int totalRuns,
java.util.Collection<org.antlr.runtime.tree.CommonTree> modelDescriptors)
called before each build of the models in the IterativeMain.
|
void |
preLoad(int currentRunIndex,
int totalRuns) |
void |
preRun(int currentRunIndex,
int totalRuns,
java.util.Collection<IModel> models)
called before the run starts
|
void |
setParameter(java.lang.String key,
java.lang.String value)
Set the named parameter
|
void |
start(int totalRuns) |
void |
stop() |
public static final java.lang.String ROW_HEADER
public static final java.lang.String BLOCK_SIZE
public static final java.lang.String FILE_NAME
protected long _blockRealTimeSum
protected long _blockSimTimeSum
protected int _blockSize
protected java.lang.String _rowHeader
protected java.lang.String _fileName
protected java.lang.StringBuilder _row
public void exceptionThrown(int index, IModel model, java.lang.Throwable thrown) throws TerminateIterativeRunException
IIterativeRunListener
TerminateIterativeRunException
when model!=null,
as it will not be caught by the IterativeMain entry point. If you need to
terminate the iterative run entirely because of a model level exception,
you should record that the exception occured and then terminate from
postRun()exceptionThrown
in interface IIterativeRunListener
TerminateIterativeRunException
- if the iterative run should be killed. TODOIIterativeRunListener.exceptionThrown(int,
org.jactr.core.model.IModel, java.lang.Throwable)
public void postRun(int currentRunIndex, int totalRuns, java.util.Collection<IModel> models) throws TerminateIterativeRunException
postRun
in interface IIterativeRunListener
TerminateIterativeRunException
IIterativeRunListener.postRun(int, int,
java.util.Collection)
public void preBuild(int currentRunIndex, int totalRuns, java.util.Collection<org.antlr.runtime.tree.CommonTree> modelDescriptors) throws TerminateIterativeRunException
IIterativeRunListener
preBuild
in interface IIterativeRunListener
modelDescriptors
- all the descriptors of the models to be created.TerminateIterativeRunException
- TODOIIterativeRunListener.preBuild(int, int,
java.util.Collection)
public void preRun(int currentRunIndex, int totalRuns, java.util.Collection<IModel> models) throws TerminateIterativeRunException
IIterativeRunListener
preRun
in interface IIterativeRunListener
TerminateIterativeRunException
- TODOIIterativeRunListener.preRun(int, int,
java.util.Collection)
public java.lang.String getParameter(java.lang.String key)
IParameterized
getParameter
in interface IParameterized
key
- Description of the ParameterIParameterized.getParameter(java.lang.String)
public java.util.Collection<java.lang.String> getPossibleParameters()
IParameterized
getPossibleParameters
in interface IParameterized
IParameterized.getPossibleParameters()
public java.util.Collection<java.lang.String> getSetableParameters()
IParameterized
getSetableParameters
in interface IParameterized
IParameterized.getSetableParameters()
public void setParameter(java.lang.String key, java.lang.String value)
IParameterized
setParameter
in interface IParameterized
IParameterized.setParameter(java.lang.String,
java.lang.String)
public void start(int totalRuns) throws TerminateIterativeRunException
start
in interface IIterativeRunListener
TerminateIterativeRunException
IIterativeRunListener.start(int)
public void stop()
stop
in interface IIterativeRunListener
IIterativeRunListener.stop()
public void preLoad(int currentRunIndex, int totalRuns) throws TerminateIterativeRunException
preLoad
in interface IIterativeRunListener
TerminateIterativeRunException