Package org.apache.jmeter.control
Class CriticalSectionController
-
- All Implemented Interfaces:
-
java.io.Serializable
,java.lang.Cloneable
,org.apache.jmeter.control.Controller
,org.apache.jmeter.gui.Searchable
,org.apache.jmeter.testelement.TestElement
,org.apache.jmeter.testelement.TestStateListener
,org.apache.jmeter.testelement.ThreadListener
,org.apache.jmeter.threads.TestCompilerHelper
public class CriticalSectionController extends GenericController implements ThreadListener, TestStateListener
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 :
In JMeter you may have :try { named_lock.lock(); statements .... } finally { named_lock.unlock(); }
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 Modifier and Type Field Description public transient JMeterContext
threadContext
public transient String
threadName
public final static TestElement.Companion
Companion
public final static String
NAME
public final static String
GUI_CLASS
public final static String
ENABLED
public final static String
TEST_CLASS
public final static String
COMMENTS
-
Constructor Summary
Constructors Constructor Description CriticalSectionController()
constructor CriticalSectionController(String name)
constructor
-
Method Summary
Modifier and Type Method Description void
setLockName(String name)
Condition Accessor - this is gonna be any string value String
getLockName()
Sampler
next()
void
threadStarted()
void
threadFinished()
void
testStarted()
void
testStarted(String host)
void
testEnded()
void
testEnded(String host)
-
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
canRemove, clear, clearTestElementChildren, clone, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
-
Methods inherited from class org.apache.jmeter.control.GenericController
addIterationListener, addTestElement, addTestElementOnce, getProps, getSchema, initialize, isDone, removeIterationListener, setFirst, triggerEndOfLoop
-
Methods inherited from class org.apache.jmeter.testelement.TestElement
get, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProps, getSchema, getString, removed, set
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CriticalSectionController
CriticalSectionController()
constructor
-
CriticalSectionController
CriticalSectionController(String name)
constructor- Parameters:
name
- The name of this controller
-
-
Method Detail
-
setLockName
void setLockName(String name)
Condition Accessor - this is gonna be any string value
- Parameters:
name
- The name of the lock for this controller
-
getLockName
String getLockName()
-
next
Sampler next()
-
threadStarted
void threadStarted()
-
threadFinished
void threadFinished()
-
testStarted
void testStarted()
-
testStarted
void testStarted(String host)
-
testEnded
void testEnded()
-
-
-
-