Interface Activity
- All Superinterfaces:
ActivityDefObserver,AutoCloseable,Comparable<Activity>,NBComponent,NBComponentAdvisors,NBComponentEvents,NBComponentMetrics,NBComponentProps,NBComponentServices,NBLabeledElement,NBProviderSearch,ProgressCapable,StateCapable
- All Known Implementing Classes:
SimpleActivity,StandardActivity
public interface Activity
extends Comparable<Activity>, ActivityDefObserver, ProgressCapable, StateCapable, NBComponent
Provides the components needed to build and run an activity a runtime.
The easiest way to build a useful Activity is to extend
SimpleActivity.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.nosqlbench.nb.api.labels.NBLabeledElement
NBLabeledElement.BasicLabeledElement -
Field Summary
Fields inherited from interface io.nosqlbench.nb.api.components.core.NBComponent
EMPTY_COMPONENTFields inherited from interface io.nosqlbench.nb.api.components.core.NBComponentProps
HDRDIGITS, SUMMARYFields inherited from interface io.nosqlbench.nb.api.labels.NBLabeledElement
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionvoidClose all autocloseables that have been registered with this Activity.default StringgetAlias()Get the current cycle rate limiter for this activity.default Stringdefault intGet or create the instrumentation needed for this activity.intdefault ParameterMaplongGet the current stride rate limiter for this activity.default voidvoidregisterAutoCloseable(AutoCloseable closeable) Register an object which should be closed after this activity is shutdown.voidsetActionDispenserDelegate(ActionDispenser actionDispenser) voidsetConsoleOut(PrintWriter writer) voidsetInputDispenserDelegate(InputDispenser inputDispenser) voidsetMotorDispenserDelegate(MotorDispenser<?> motorDispenser) voidsetOutputDispenserDelegate(OutputDispenser outputDispenser) voidsetResultFilterDispenserDelegate(IntPredicateDispenser resultFilterDispenser) voidsetRunState(RunState runState) default voidMethods inherited from interface io.nosqlbench.engine.api.activityapi.core.ActivityDefObserver
onActivityDefUpdateMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface io.nosqlbench.nb.api.components.core.NBComponent
attachChild, beforeDetach, close, detachChild, getChildren, getComponentOnlyLabels, getNanosSinceStart, getParent, reportExecutionMetricMethods inherited from interface io.nosqlbench.nb.api.components.core.NBComponentAdvisors
addAdvisor, getAdvisorResults, getAdvisorsMethods inherited from interface io.nosqlbench.nb.api.components.core.NBComponentEvents
onEventMethods inherited from interface io.nosqlbench.nb.api.components.core.NBComponentMetrics
addComponentMetric, findComponentMetrics, findComponentMetrics, findOneComponentMetric, findOneComponentMetric, getComponentMetric, getComponentMetricsMethods inherited from interface io.nosqlbench.nb.api.components.core.NBComponentProps
getComponentProp, setComponentPropMethods inherited from interface io.nosqlbench.nb.api.components.core.NBComponentServices
create, findMethods inherited from interface io.nosqlbench.nb.api.labels.NBLabeledElement
description, getLabelsMethods inherited from interface io.nosqlbench.nb.api.components.decorators.NBProviderSearch
findParentServiceMethods inherited from interface io.nosqlbench.engine.api.activityapi.core.progress.ProgressCapable
getProgressMeter
-
Method Details
-
registerAutoCloseable
Register an object which should be closed after this activity is shutdown.- Parameters:
closeable- An Autocloseable object
-
getActivityDef
ActivityDef getActivityDef() -
getAlias
-
getParams
-
initActivity
default void initActivity() -
closeAutoCloseables
void closeAutoCloseables()Close all autocloseables that have been registered with this Activity. -
getMotorDispenserDelegate
MotorDispenser<?> getMotorDispenserDelegate() -
setMotorDispenserDelegate
-
getInputDispenserDelegate
InputDispenser getInputDispenserDelegate() -
setInputDispenserDelegate
-
getActionDispenserDelegate
ActionDispenser getActionDispenserDelegate() -
setActionDispenserDelegate
-
getResultFilterDispenserDelegate
IntPredicateDispenser getResultFilterDispenserDelegate() -
setResultFilterDispenserDelegate
-
getMarkerDispenserDelegate
OutputDispenser getMarkerDispenserDelegate() -
setOutputDispenserDelegate
-
getRunState
RunState getRunState()- Specified by:
getRunStatein interfaceStateCapable
-
setRunState
-
getStartedAtMillis
long getStartedAtMillis() -
shutdownActivity
default void shutdownActivity() -
getCycleSummary
-
getCycleLimiter
RateLimiter getCycleLimiter()Get the current cycle rate limiter for this activity. The cycle rate limiter is used to throttle the rate at which cycles are dispatched across all threads in the activity- Returns:
- the cycle
RateLimiter
-
getStrideLimiter
RateLimiter getStrideLimiter()Get the current stride rate limiter for this activity. The stride rate limiter is used to throttle the rate at which new strides are dispatched across all threads in an activity.- Returns:
- The stride
RateLimiter
-
getInstrumentation
ActivityInstrumentation getInstrumentation()Get or create the instrumentation needed for this activity. This provides a single place to find and manage, and document instrumentation that is uniform across all activities.- Returns:
- A new or existing instrumentation object for this activity.
-
getConsoleOut
PrintWriter getConsoleOut() -
getConsoleIn
InputStream getConsoleIn() -
setConsoleOut
-
getExceptionMetrics
ErrorMetrics getExceptionMetrics() -
getMaxTries
int getMaxTries() -
getHdrDigits
default int getHdrDigits() -
getRunStateTally
RunStateTally getRunStateTally()
-