Class StandardActivity<R extends LongFunction,S>
java.lang.Object
io.nosqlbench.nb.api.components.core.NBBaseComponentMetrics
io.nosqlbench.nb.api.components.core.NBBaseComponent
io.nosqlbench.nb.api.components.status.NBStatusComponent
io.nosqlbench.engine.api.activityimpl.SimpleActivity
io.nosqlbench.engine.api.activityimpl.uniform.StandardActivity<R,S>
- Type Parameters:
R- A type of runnable which wraps the operations for this type of driver.S- The context type for the activity, AKA the 'space' for a named driver instance and its associated object graph
- All Implemented Interfaces:
SyntheticOpTemplateProvider,DriverAdapterDecorators,Activity,ActivityDefObserver,ProgressCapable,StateCapable,InvokableResult,NBComponent,NBComponentAdvisors,NBComponentEvents,NBComponentMetrics,NBComponentProps,NBComponentServices,NBComponentTimeline,NBProviderSearch,NBTokenWords,NBLabeledElement,AutoCloseable,Comparable<Activity>
public class StandardActivity<R extends LongFunction,S>
extends SimpleActivity
implements SyntheticOpTemplateProvider, ActivityDefObserver
This is a typed activity which is expected to become the standard
core of all new activity types. Extant NB drivers should also migrate
to this when possible.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.nosqlbench.nb.api.labels.NBLabeledElement
NBLabeledElement.BasicLabeledElement -
Field Summary
Fields inherited from class io.nosqlbench.engine.api.activityimpl.SimpleActivity
activityDefFields inherited from class io.nosqlbench.nb.api.components.core.NBBaseComponent
bufferOrphanedMetrics, closed_ns, error, errored_ns, labels, metricsBuffer, parent, started_epoch_ms, started_ns, state, teardown_nsFields 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOpSequence<OpDispenser<? extends CycleOp<?>>> getSyntheticOpTemplates(OpsDocList opsDocList, Map<String, Object> cfg) If a driver adapter supports creating example op templates from bindings, it must implement this method to do so.voidvoidonActivityDefUpdate(ActivityDef activityDef) voidvoidThis is done here since driver adapters are intended to keep all of their state within dedicated state space types.Methods inherited from class io.nosqlbench.engine.api.activityimpl.SimpleActivity
asResult, closeAutoCloseables, compareTo, createOpSequence, createOpSourceFromParsedOps, createOrUpdateCycleLimiter, createOrUpdateStrideLimiter, getActionDispenserDelegate, getActivityDef, getConsoleIn, getConsoleOut, getCycleLimiter, getErrorHandler, getExceptionMetrics, getInputDispenserDelegate, getInstrumentation, getMarkerDispenserDelegate, getMaxTries, getMotorDispenserDelegate, getProgressMeter, getResultFilterDispenserDelegate, getRunState, getRunStateTally, getStartedAtMillis, getStrideLimiter, initOrUpdateRateLimiters, loadOpTemplates, loadStmtsDocList, registerAutoCloseable, setActionDispenserDelegate, setConsoleOut, setDefaultsFromOpSequence, setInputDispenserDelegate, setMotorDispenserDelegate, setOutputDispenserDelegate, setResultFilterDispenserDelegate, setRunState, toStringMethods inherited from class io.nosqlbench.nb.api.components.status.NBStatusComponent
session_time_ms, statusMethods inherited from class io.nosqlbench.nb.api.components.core.NBBaseComponent
addAdvisor, addMetricsCloseable, attachChild, beforeDetach, close, create, detachChild, find, findParentService, getAdvisors, getChildren, getComponentOnlyLabels, getComponentProp, getComponentState, getNanosSinceStart, getParent, getTokens, nanosof_close, nanosof_error, nanosof_start, nanosof_teardown, onError, reportExecutionMetric, setComponentProp, started_epoch_ms, teardownMethods inherited from class io.nosqlbench.nb.api.components.core.NBBaseComponentMetrics
addComponentMetric, addListener, findComponentMetrics, findComponentMetrics, getComponentMetric, getComponentMetrics, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.nosqlbench.engine.api.activityapi.core.Activity
getAlias, getCycleSummary, getHdrDigits, getParamsMethods 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.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
descriptionMethods inherited from interface io.nosqlbench.nb.api.components.decorators.NBProviderSearch
findParentService
-
Constructor Details
-
StandardActivity
-
-
Method Details
-
initActivity
public void initActivity()- Specified by:
initActivityin interfaceActivity- Overrides:
initActivityin classSimpleActivity
-
getOpSequence
-
onActivityDefUpdate
- Specified by:
onActivityDefUpdatein interfaceActivityDefObserver- Overrides:
onActivityDefUpdatein classSimpleActivity
-
getSyntheticOpTemplates
Description copied from interface:SyntheticOpTemplateProviderIf a driver adapter supports creating example op templates from bindings, it must implement this method to do so.- Specified by:
getSyntheticOpTemplatesin interfaceSyntheticOpTemplateProvider- Parameters:
opsDocList- The existing doc structure, which should contain no fully defined op templates, but may contain other elements like bindings- Returns:
- A list of op templates, size zero or more
-
shutdownActivity
public void shutdownActivity()This is done here since driver adapters are intended to keep all of their state within dedicated state space types. Any space which implementsShutdownablewill be closed when this activity shuts down.- Specified by:
shutdownActivityin interfaceActivity
-
getLabels
- Specified by:
getLabelsin interfaceNBLabeledElement- Overrides:
getLabelsin classNBBaseComponent
-
onEvent
- Specified by:
onEventin interfaceNBComponentEvents- Overrides:
onEventin classNBBaseComponent
-