public class ActivityDef extends Object
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.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ALIAS |
static String |
DEFAULT_ATYPE |
static String |
DEFAULT_CYCLES |
static int |
DEFAULT_THREADS |
| Constructor and Description |
|---|
ActivityDef(ParameterMap parameterMap) |
| Modifier and Type | Method and Description |
|---|---|
String |
getActivityType() |
String |
getAlias()
The alias that the associated activity instance is known by.
|
AtomicLong |
getChangeCounter() |
long |
getCycleCount() |
String |
getCycleSummary() |
long |
getEndCycle()
The last cycle that will be used for execution of this activity, inclusive.
|
ParameterMap |
getParams()
Get the parameter map, which is the backing-store for all data within an ActivityDef.
|
long |
getStartCycle()
The first cycle that will be used for execution of this activity, inclusive.
|
int |
getThreads()
The number of threads (AKA slots) that the associated activity should currently be using.
|
static ActivityDef |
parseActivityDef(String namedActivitySpec) |
static Optional<ActivityDef> |
parseActivityDefOptionally(String namedActivitySpec) |
void |
setCycles(String cycles) |
void |
setEndCycle(long endCycle) |
void |
setEndCycle(String endCycle) |
void |
setStartCycle(long startCycle) |
void |
setStartCycle(String startCycle) |
void |
setThreads(int threads) |
String |
toString() |
public static final String DEFAULT_ALIAS
public static final String DEFAULT_ATYPE
public static final String DEFAULT_CYCLES
public static final int DEFAULT_THREADS
public ActivityDef(ParameterMap parameterMap)
public static Optional<ActivityDef> parseActivityDefOptionally(String namedActivitySpec)
public static ActivityDef parseActivityDef(String namedActivitySpec)
public String getAlias()
public String getActivityType()
public long getStartCycle()
public void setStartCycle(String startCycle)
public void setStartCycle(long startCycle)
public void setEndCycle(String endCycle)
public long getEndCycle()
public void setEndCycle(long endCycle)
public int getThreads()
public void setThreads(int threads)
public ParameterMap getParams()
public AtomicLong getChangeCounter()
public void setCycles(String cycles)
public String getCycleSummary()
public long getCycleCount()
Copyright © 2017. All rights reserved.