Class IsacExtendedEngine
- java.lang.Object
-
- org.ow2.clif.scenario.isac.engine.IsacExtendedEngine
-
- All Implemented Interfaces:
org.objectweb.fractal.api.control.BindingController,ActivityControl,BladeControl
public class IsacExtendedEngine extends java.lang.Object implements BladeControl, org.objectweb.fractal.api.control.BindingController
This is the main class of the Isac extended engine. Each instance creates a pool of threads to execute jobs (sort of scenario slices), a scheduler to dispatch jobs and apply load profiles, a clock to handle real time (despite possible suspend periods), a timer for periodically updating the load profiles, and an engine supervisor to manage the end of scenario execution.- Author:
- Emmanuel Varoquaux, Bruno Dillenseger, Stéphanie Monticelli
-
-
Field Summary
-
Fields inherited from interface org.ow2.clif.server.api.BladeControl
BLADE_CONTROL, BLADE_INSERT_CONTROL
-
-
Constructor Summary
Constructors Constructor Description IsacExtendedEngine()The following properties can be set in clif.props : - clif.isac.threads - clif.isac.groupperiod - clif.isac.schedulerperiod - clif.isac.jobdelay - clif.store.action - clif.store.lifecycle - clif.store.alarms Otherwise, use default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbindFc(java.lang.String clientItfName, java.lang.Object serverItf)voidchangeParameter(java.lang.String parameter, java.io.Serializable value)Sets the parameterparameterof this blade with the valuevalue.java.util.Map<java.lang.String,java.io.Serializable>getCurrentParameters()Returns aMapwhich maps the defined parameters to their values.java.lang.StringgetId()voidinit(java.io.Serializable arg)Initialize the activityvoidjoin()Waits until the end of the activityjava.lang.String[]listFc()java.lang.ObjectlookupFc(java.lang.String clientItfName)voidresume()Resume the activity (if suspended)voidsetArgument(java.lang.String argument)Sets the scenario argument string.voidsetId(java.lang.String id)Sets a unique identifier string to this bladevoidstart()Initial start of the activityvoidstop()Final stop of the activityvoidsuspend()Suspend the activityvoidunbindFc(java.lang.String clientItfName)voidupdatePopulation()Called by the timer to update the number of vUsers.
-
-
-
Constructor Detail
-
IsacExtendedEngine
public IsacExtendedEngine()
The following properties can be set in clif.props : - clif.isac.threads - clif.isac.groupperiod - clif.isac.schedulerperiod - clif.isac.jobdelay - clif.store.action - clif.store.lifecycle - clif.store.alarms Otherwise, use default values.
-
-
Method Detail
-
updatePopulation
public void updatePopulation()
Called by the timer to update the number of vUsers.
-
init
public void init(java.io.Serializable arg) throws ClifExceptionDescription copied from interface:ActivityControlInitialize the activity- Specified by:
initin interfaceActivityControl- Parameters:
arg- unused- Throws:
ClifException
-
start
public void start()
Description copied from interface:ActivityControlInitial start of the activity- Specified by:
startin interfaceActivityControl
-
stop
public void stop()
Description copied from interface:ActivityControlFinal stop of the activity- Specified by:
stopin interfaceActivityControl
-
suspend
public void suspend()
Description copied from interface:ActivityControlSuspend the activity- Specified by:
suspendin interfaceActivityControl
-
resume
public void resume()
Description copied from interface:ActivityControlResume the activity (if suspended)- Specified by:
resumein interfaceActivityControl
-
join
public void join()
Description copied from interface:ActivityControlWaits until the end of the activity- Specified by:
joinin interfaceActivityControl
-
setArgument
public void setArgument(java.lang.String argument) throws ClifExceptionDescription copied from interface:BladeControlSets the scenario argument string.- Specified by:
setArgumentin interfaceBladeControl- Parameters:
argument- The argument is expected to have the following format: filename [param=value]*
where:
-
- filename is the name of the scenario filename (XML file)
- param is one of "threads", "groupperiod", "schedulerperiod", "jobdelay", "store-action-events", "store-alarm-events" or "store-lifecycle-events"
- value is a positive integer or a boolean string (on/yes/true or off/no/false) depending on the parameter
- Throws:
ClifException -
-
setId
public void setId(java.lang.String id)
Description copied from interface:BladeControlSets a unique identifier string to this blade- Specified by:
setIdin interfaceBladeControl
-
getId
public java.lang.String getId()
- Specified by:
getIdin interfaceBladeControl- Returns:
- the blade unique identifier
-
changeParameter
public void changeParameter(java.lang.String parameter, java.io.Serializable value) throws ClifExceptionDescription copied from interface:BladeControlSets the parameterparameterof this blade with the valuevalue. This method allows to change parameters independently of the activity of the blade. However, some parameters can depend on the state of the blade.- Specified by:
changeParameterin interfaceBladeControl- Throws:
ClifException
-
getCurrentParameters
public java.util.Map<java.lang.String,java.io.Serializable> getCurrentParameters()
Description copied from interface:BladeControlReturns aMapwhich maps the defined parameters to their values.- Specified by:
getCurrentParametersin interfaceBladeControl
-
listFc
public java.lang.String[] listFc()
- Specified by:
listFcin interfaceorg.objectweb.fractal.api.control.BindingController
-
lookupFc
public java.lang.Object lookupFc(java.lang.String clientItfName) throws org.objectweb.fractal.api.NoSuchInterfaceException- Specified by:
lookupFcin interfaceorg.objectweb.fractal.api.control.BindingController- Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
-
bindFc
public void bindFc(java.lang.String clientItfName, java.lang.Object serverItf) throws org.objectweb.fractal.api.NoSuchInterfaceException, org.objectweb.fractal.api.control.IllegalBindingException, org.objectweb.fractal.api.control.IllegalLifeCycleException- Specified by:
bindFcin interfaceorg.objectweb.fractal.api.control.BindingController- Throws:
org.objectweb.fractal.api.NoSuchInterfaceExceptionorg.objectweb.fractal.api.control.IllegalBindingExceptionorg.objectweb.fractal.api.control.IllegalLifeCycleException
-
unbindFc
public void unbindFc(java.lang.String clientItfName) throws org.objectweb.fractal.api.NoSuchInterfaceException, org.objectweb.fractal.api.control.IllegalBindingException, org.objectweb.fractal.api.control.IllegalLifeCycleException- Specified by:
unbindFcin interfaceorg.objectweb.fractal.api.control.BindingController- Throws:
org.objectweb.fractal.api.NoSuchInterfaceExceptionorg.objectweb.fractal.api.control.IllegalBindingExceptionorg.objectweb.fractal.api.control.IllegalLifeCycleException