Class OpenModelThreadGroup
-
- All Implemented Interfaces:
-
java.io.Serializable
,kotlin.Cloneable
,org.apache.jmeter.control.Controller
,org.apache.jmeter.gui.Searchable
,org.apache.jmeter.testelement.TestElement
,org.apache.jmeter.threads.JMeterThreadMonitor
,org.apache.jmeter.threads.TestCompilerHelper
@API(status = API.Status.EXPERIMENTAL, since = "5.5") public final class OpenModelThreadGroup extends AbstractThreadGroup implements Serializable, Controller, JMeterThreadMonitor, TestCompilerHelper
The thread group that emulates open model. Currently, threads are created on demand, every thread exists after completion, and the maximum number of threads is not limited.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
OpenModelThreadGroup.Companion
-
Field Summary
Fields Modifier and Type Field Description private final OpenModelThreadGroupSchema
schema
private final PropertiesAccessor<OpenModelThreadGroup, OpenModelThreadGroupSchema>
props
private String
scheduleString
private final Long
randomSeed
private String
randomSeedString
private JMeterContext
threadContext
private String
threadName
private String
comment
private Boolean
isRunningVersion
private String
name
private Boolean
isEnabled
public final static OpenModelThreadGroup.Companion
Companion
-
Constructor Summary
Constructors Constructor Description OpenModelThreadGroup()
-
Method Summary
Modifier and Type Method Description OpenModelThreadGroupSchema
getSchema()
PropertiesAccessor<OpenModelThreadGroup, OpenModelThreadGroupSchema>
getProps()
Allows type-safe accessors to the properties of the current element. final String
getScheduleString()
Schedule expression (see ThreadSchedule). final Unit
setScheduleString(String scheduleString)
Schedule expression (see ThreadSchedule). final Long
getRandomSeed()
final String
getRandomSeedString()
Random seed for building reproducible schedules. final Unit
setRandomSeedString(String randomSeedString)
Random seed for building reproducible schedules. Unit
recoverRunningVersion()
Tells the test element to return to the state it was in when setRunningVersion(true) was called. Unit
start(Integer threadGroupIndex, ListenerNotifier notifier, ListedHashTree threadGroupTree, StandardJMeterEngine engine)
Start the ThreadGroup Unit
threadFinished(JMeterThread thread)
JMeterThread
addNewThread(Integer delay, StandardJMeterEngine engine)
Add a new JMeterThread to this ThreadGroup for engine Boolean
stopThread(String threadName, Boolean now)
Hard or graceful stop depending on now flag Integer
numberOfActiveThreads()
Boolean
verifyThreadsStopped()
Unit
waitThreadsStopped()
Wait for all Group Threads to stop after a graceful stop Unit
stop()
This gracefully stops threads of Group Unit
tellThreadsToStop()
This immediately stop threads of Group by interrupting them. -
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
canRemove, clear, clearTestElementChildren, clone, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
-
Methods inherited from class org.apache.jmeter.testelement.TestElement
get, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getPropertyOrNull, getString, removeProperty, removed, set, set, set, set, set, set, set, set, set
-
Methods inherited from class org.apache.jmeter.threads.AbstractThreadGroup
addIterationListener, addTestElement, addTestElementOnce, breakThreadLoop, getNumThreads, getNumberOfThreads, getOnErrorStartNextLoop, getOnErrorStopTest, getOnErrorStopTestNow, getOnErrorStopThread, getSamplerController, initialize, isDone, isSameUserOnNextIteration, next, removeIterationListener, setIsSameUserOnNextIteration, setNumThreads, setSamplerController, startNextLoop, triggerEndOfLoop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getSchema
OpenModelThreadGroupSchema getSchema()
-
getProps
PropertiesAccessor<OpenModelThreadGroup, OpenModelThreadGroupSchema> getProps()
Allows type-safe accessors to the properties of the current element. Note: when overriding the method, ensure you emit wildcards. For instance: JMeterElementInstance<? extends TestPlanClass> getProps() { return ... }
-
getScheduleString
final String getScheduleString()
Schedule expression (see ThreadSchedule).
-
setScheduleString
final Unit setScheduleString(String scheduleString)
Schedule expression (see ThreadSchedule).
-
getRandomSeed
final Long getRandomSeed()
-
getRandomSeedString
final String getRandomSeedString()
Random seed for building reproducible schedules. 0 means random seed.
-
setRandomSeedString
final Unit setRandomSeedString(String randomSeedString)
Random seed for building reproducible schedules. 0 means random seed.
-
recoverRunningVersion
Unit recoverRunningVersion()
Tells the test element to return to the state it was in when setRunningVersion(true) was called.
-
start
Unit start(Integer threadGroupIndex, ListenerNotifier notifier, ListedHashTree threadGroupTree, StandardJMeterEngine engine)
Start the ThreadGroup
-
threadFinished
Unit threadFinished(JMeterThread thread)
-
addNewThread
JMeterThread addNewThread(Integer delay, StandardJMeterEngine engine)
Add a new JMeterThread to this ThreadGroup for engine
- Returns:
-
stopThread
Boolean stopThread(String threadName, Boolean now)
Hard or graceful stop depending on now flag
- Returns:
boolean true if stop succeeded
-
numberOfActiveThreads
Integer numberOfActiveThreads()
- Returns:
int number of active threads
-
verifyThreadsStopped
Boolean verifyThreadsStopped()
- Returns:
true if threads were correctly stopped
-
waitThreadsStopped
Unit waitThreadsStopped()
Wait for all Group Threads to stop after a graceful stop
-
tellThreadsToStop
Unit tellThreadsToStop()
This immediately stop threads of Group by interrupting them. It differs from stop by being a hard stop
-
-
-
-