Class ActivityDef
java.lang.Object
io.nosqlbench.nb.api.engine.activityimpl.ActivityDef
- All Implemented Interfaces:
NBNamedElement
A runtime definition for an activity.
Instances of ActivityDef hold control values for the execution of a single activity. Each thread of the related activity is initialized with the associated ActivityDef. When the ActivityDef is modified, interested activity threads are notified so that they can dynamically adjust.
The canonical values for all parameters are kept internally in the parameter map. Essentially, ActivityDef is just a type-aware wrapper around a thread-safe parameter map, with an atomic change counter which can be used to signal changes to observers.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn tbe Activity Driver Adapter NamegetAlias()The alias that the associated activity instance is known by.longlongThe last cycle that will be used for execution of this activity, inclusive.getName()Get the parameter map, which is the backing-store for all data within an ActivityDef.longThe first cycle that will be used for execution of this activity, inclusive.intThe number of threads (AKA slots) that the associated activity should currently be using.static ActivityDefparseActivityDef(String namedActivitySpec) voidvoidsetEndCycle(long lastCycleExclusive) voidsetEndCycle(String lastCycleExclusive) voidsetStartCycle(long firstCycleInclusive) voidsetStartCycle(String firstCycleInclusive) voidsetThreads(int threads) toString()
-
Field Details
-
DEFAULT_ALIAS
- See Also:
-
DEFAULT_ATYPE
- See Also:
-
DEFAULT_CYCLES
- See Also:
-
DEFAULT_RECYCLES
- See Also:
-
DEFAULT_THREADS
public static final int DEFAULT_THREADS- See Also:
-
logger
public static final org.apache.logging.log4j.Logger logger -
FIELD_ALIAS
- See Also:
-
FIELD_ATYPE
- See Also:
-
FIELD_CYCLES
- See Also:
-
FIELD_RECYCLES
- See Also:
-
FIELD_THREADS
- See Also:
-
field_list
-
-
Constructor Details
-
ActivityDef
-
-
Method Details
-
parseActivityDef
-
toString
-
getAlias
The alias that the associated activity instance is known by.- Returns:
- the alias
-
getActivityDriver
Return tbe Activity Driver Adapter Name- Returns:
- the driver adapter name
-
getStartCycle
public long getStartCycle()The first cycle that will be used for execution of this activity, inclusive. If the value is provided as a range as in 0..10, then the first number is the start cycle and the second number is the end cycle +1. Effectively, cycle ranges are [closed,open) intervals, as in [min..max)- Returns:
- the long start cycle
-
setStartCycle
public void setStartCycle(long firstCycleInclusive) -
setStartCycle
-
setEndCycle
public void setEndCycle(long lastCycleExclusive) -
setEndCycle
-
getEndCycle
public long getEndCycle()The last cycle that will be used for execution of this activity, inclusive.- Returns:
- the long end cycle
-
getThreads
public int getThreads()The number of threads (AKA slots) that the associated activity should currently be using.- Returns:
- target thread count
-
setThreads
public void setThreads(int threads) -
getParams
Get the parameter map, which is the backing-store for all data within an ActivityDef.- Returns:
- the parameter map
-
getChangeCounter
-
setCycles
-
getCycleSummary
-
getCycleCount
public long getCycleCount() -
getCyclesSpec
-
getRecyclesSpec
-
getName
- Specified by:
getNamein interfaceNBNamedElement
-
deprecate
-
auxLabels
-
getConfigModel
-