Class AtomicInput
- All Implemented Interfaces:
com.codahale.metrics.Gauge<Long>,com.codahale.metrics.Metric,ActivityDefObserver,Input,NBComponent,NBComponentAdvisors,NBComponentEvents,NBComponentMetrics,NBComponentProps,NBComponentServices,NBComponentTimeline,NBProviderSearch,NBTokenWords,NBLabeledElement,AutoCloseable
TODO: This documentation is out of date as of 2.0.0
This input will provide threadsafe access to a sequence of long values.
Changes to the cycles or the targetrate will affect the provided inputs. If the min or max cycle is changed, then these are re-applied first to the max cycle and then to the min cycle. If the min cycle is changed, then the next cycle value is set to the assigned min value. Otherwise, the cycle will continue as usual till it reaches the max value. The ability to start the input while running by applying a new set of parameters makes it possible to re-trigger a sequence of inputs during a test.
This input, and Inputs in general do not actively prevent usage of values after the max value. They simply expose it to callers. It is up to the caller to check the value to determine when the input is deemed "used up."
-
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.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 TypeMethodDescriptiongetInputSegment(int stride) Return the next InputSegment available, or null if none were available.longgetValue()booleanvoidonActivityDefUpdate(ActivityDef activityDef) toString()Methods inherited from class io.nosqlbench.nb.api.components.core.NBBaseComponent
addAdvisor, addMetricsCloseable, attachChild, beforeDetach, close, create, detachChild, find, findParentService, getAdvisors, getChildren, getComponentOnlyLabels, getComponentProp, getComponentState, getLabels, getNanosSinceStart, getParent, getTokens, nanosof_close, nanosof_error, nanosof_start, nanosof_teardown, onError, onEvent, 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.nb.api.components.core.NBComponentAdvisors
getAdvisorResultsMethods inherited from interface io.nosqlbench.nb.api.components.core.NBComponentMetrics
addComponentMetric, findComponentMetrics, findComponentMetrics, findOneComponentMetric, findOneComponentMetric, getComponentMetric, getComponentMetricsMethods inherited from interface io.nosqlbench.nb.api.labels.NBLabeledElement
description
-
Constructor Details
-
AtomicInput
-
-
Method Details
-
getInputSegment
Description copied from interface:InputReturn the next InputSegment available, or null if none were available. This method is required to be thread safe.All implementations of this method are required to be thread-safe.
- Specified by:
getInputSegmentin interfaceInput- Parameters:
stride- The number of cycles (not necessarily contiguous) in the segment.- Returns:
- a segment, or null if none available.
-
toString
- Overrides:
toStringin classNBBaseComponent
-
onActivityDefUpdate
- Specified by:
onActivityDefUpdatein interfaceActivityDefObserver
-
getStartedAtMillis
public long getStartedAtMillis() -
isContiguous
public boolean isContiguous()- Specified by:
isContiguousin interfaceInput
-
getValue
-