|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ow2.clif.probe.util.AbstractDumbInsert
public abstract class AbstractDumbInsert
This abstract implementation of a blade insert component manages a single thread, doing a periodic task (probing) with a given period (in milliseconds) and during an given actual time. It provides a "dumb" interpretation of the blade lifecycle with regard to the ActivityControl interface, inasmuch as it actually probes from its initialization time to its stop time, regardless of start(), suspend() and resume() orders.
Field Summary | |
---|---|
protected java.lang.Object |
activity_lock
|
protected long |
arg_duration_ms
|
protected long |
arg_period_ms
|
protected java.util.ArrayList |
arg_probe_config
|
protected long |
baseTime_ms
|
protected BladeInsertResponse |
bir
|
protected java.lang.Object |
dc_lock
|
protected DataCollectorWrite |
dcw
|
protected java.util.Map |
eventStorageStatesMap
|
protected java.lang.Thread |
poller
|
protected java.lang.String |
probeId
|
protected java.lang.Object |
sr_lock
|
protected boolean |
started
|
protected boolean |
stopped
|
protected BooleanHolder |
storeAlarmEvents
|
protected BooleanHolder |
storeLifeCycleEvents
|
protected BooleanHolder |
storeProbeEvents
|
protected boolean |
suspended
|
protected boolean |
terminated
|
Fields inherited from interface org.ow2.clif.server.api.BladeControl |
---|
BLADE_CONTROL, BLADE_INSERT_CONTROL |
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
---|
STARTED, STOPPED |
Constructor Summary | |
---|---|
AbstractDumbInsert()
|
Method Summary | |
---|---|
void |
bindFc(java.lang.String clientItfName,
java.lang.Object serverItf)
|
void |
changeParameter(java.lang.String parameter,
java.io.Serializable value)
Sets the parameter parameter of this blade with the value
value . |
protected void |
close()
Override this method when you are willing to release some resources when the probe ends its activity. |
protected void |
configProbewithArray()
Override this method when you are willing to pass some parameters to the Insert. |
protected abstract ProbeEvent |
doProbe()
Override this method to perform your measure and return it |
java.util.Map |
getCurrentParameters()
Returns a Map which maps the defined parameters to their values. |
java.lang.String |
getFcState()
|
java.lang.String |
getId()
|
void |
init(java.io.Serializable testId)
Initialize the activity |
void |
join()
Waits until the end of the activity |
java.lang.String[] |
listFc()
|
java.lang.Object |
lookupFc(java.lang.String clientItfName)
|
void |
resume()
Resume the activity (if suspended) |
void |
run()
|
void |
setArgument(java.lang.String arg)
Sets number of threads and test duration parameters |
void |
setId(java.lang.String id)
Sets this scenario's unique identifier |
void |
start()
Initial start of the activity |
void |
startFc()
|
void |
stop()
Final stop of the activity |
void |
stopFc()
|
void |
suspend()
Suspend the activity |
void |
unbindFc(java.lang.String clientItfName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String probeId
protected java.lang.Object activity_lock
protected BladeInsertResponse bir
protected java.lang.Object sr_lock
protected DataCollectorWrite dcw
protected java.lang.Object dc_lock
protected long arg_period_ms
protected long arg_duration_ms
protected java.util.ArrayList arg_probe_config
protected long baseTime_ms
protected volatile boolean started
protected volatile boolean stopped
protected volatile boolean suspended
protected volatile boolean terminated
protected java.lang.Thread poller
protected final BooleanHolder storeLifeCycleEvents
protected final BooleanHolder storeAlarmEvents
protected final BooleanHolder storeProbeEvents
protected final java.util.Map eventStorageStatesMap
Constructor Detail |
---|
public AbstractDumbInsert()
Method Detail |
---|
protected abstract ProbeEvent doProbe()
protected void configProbewithArray() throws ClifException
ClifException
protected void close() throws ClifException
ClifException
public void startFc()
startFc
in interface org.objectweb.fractal.api.control.LifeCycleController
public void stopFc()
stopFc
in interface org.objectweb.fractal.api.control.LifeCycleController
public java.lang.String getFcState()
getFcState
in interface org.objectweb.fractal.api.control.LifeCycleController
public java.lang.Object lookupFc(java.lang.String clientItfName)
lookupFc
in interface org.objectweb.fractal.api.control.BindingController
public void bindFc(java.lang.String clientItfName, java.lang.Object serverItf)
bindFc
in interface org.objectweb.fractal.api.control.BindingController
public void unbindFc(java.lang.String clientItfName)
unbindFc
in interface org.objectweb.fractal.api.control.BindingController
public java.lang.String[] listFc()
listFc
in interface org.objectweb.fractal.api.control.BindingController
public void init(java.io.Serializable testId)
ActivityControl
init
in interface ActivityControl
testId
- unique identifier of the new testpublic void start()
ActivityControl
start
in interface ActivityControl
public void stop()
ActivityControl
stop
in interface ActivityControl
public void suspend()
ActivityControl
suspend
in interface ActivityControl
public void resume()
ActivityControl
resume
in interface ActivityControl
public void join()
ActivityControl
join
in interface ActivityControl
public void setArgument(java.lang.String arg) throws ClifException
setArgument
in interface BladeControl
arg
- should hold 2 integer parameters (separated with usual separators) setting
(1) the observation polling period in ms, and (2) the test duration in seconds.
ClifException
public void setId(java.lang.String id)
setId
in interface BladeControl
public java.lang.String getId()
getId
in interface BladeControl
public void run()
run
in interface java.lang.Runnable
public void changeParameter(java.lang.String parameter, java.io.Serializable value) throws ClifException
BladeControl
parameter
of this blade with the value
value
.
This method allows to change parameters independently of the activity of
the blade. However, some parameters can depend on the state of the blade.
changeParameter
in interface BladeControl
ClifException
public java.util.Map getCurrentParameters()
BladeControl
Map
which maps the defined parameters to their values.
getCurrentParameters
in interface BladeControl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |