|
Apache JMeter | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.control.GenericController
org.apache.jmeter.control.CriticalSectionController
public class CriticalSectionController
This is a Critical Section Controller; it will execute the set of statements (samplers/controllers, etc) under named lock.
In a programming world - this is equivalent of :
try {
named_lock.lock();
statements ....
} finally {
named_lock.unlock();
}
In JMeter you may have :
Thread-Group (set to loop a number of times or indefinitely,
... Samplers ... (e.g. Counter )
... Other Controllers ....
... CriticalSectionController ( lock name like "foobar" )
... statements to perform when lock acquired
...
... Other Controllers /Samplers }
| Field Summary |
|---|
| Fields inherited from class org.apache.jmeter.control.GenericController |
|---|
current, subControllersAndSamplers |
| Fields inherited from interface org.apache.jmeter.testelement.TestElement |
|---|
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS |
| Constructor Summary | |
|---|---|
CriticalSectionController()
constructor |
|
CriticalSectionController(String name)
constructor |
|
| Method Summary | |
|---|---|
String |
getLockName()
|
Sampler |
next()
Determines the next sampler to be processed. |
protected void |
reInitialize()
Called after execution of last child of the controller We release lock |
void |
setLockName(String name)
Condition Accessor - this is gonna be any string value |
void |
testEnded()
Called once for all threads after the end of a test. |
void |
testEnded(String host)
Called once for all threads after the end of a test. |
void |
testStarted()
Called just before the start of the test from the main engine thread. |
void |
testStarted(String host)
Called just before the start of the test from the main engine thread. |
void |
threadFinished()
Called for each thread after all samples have been processed. |
void |
threadStarted()
Called for each thread before starting sampling. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.jmeter.testelement.TestElement |
|---|
canRemove, clear, clearTestElementChildren, clone, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse |
| Constructor Detail |
|---|
public CriticalSectionController()
public CriticalSectionController(String name)
| Method Detail |
|---|
public void setLockName(String name)
public String getLockName()
public Sampler next()
GenericControllerDetermines the next sampler to be processed.
If isDone, returns null.
Gets the list element using current pointer.
If this is null, calls GenericController.nextIsNull().
If the list element is a sampler, calls GenericController.nextIsASampler(Sampler),
otherwise calls GenericController.nextIsAController(Controller)
If any of the called methods throws NextIsNullException, returns null, otherwise the value obtained above is returned.
next in interface Controllernext in class GenericControllerController.next()protected void reInitialize()
reInitialize in class GenericControllerGenericController.reInitialize()public void threadStarted()
ThreadListener
threadStarted in interface ThreadListenerJMeterThread.threadStarted()public void threadFinished()
ThreadListener
threadFinished in interface ThreadListenerJMeterThread.threadFinished(org.apache.jmeter.engine.event.LoopIterationListener)public void testStarted()
TestStateListenerCalled just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
testStarted in interface TestStateListenerStandardJMeterEngine.run()public void testStarted(String host)
TestStateListenerCalled just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
testStarted in interface TestStateListenerhost - name of hostStandardJMeterEngine.run()public void testEnded()
TestStateListenerCalled once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
testEnded in interface TestStateListenerStandardJMeterEngine.stopTest()public void testEnded(String host)
TestStateListenerCalled once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
testEnded in interface TestStateListenerhost - name of hostStandardJMeterEngine.stopTest()
|
Apache JMeter | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||