Class OpImpl<D>
java.lang.Object
io.nosqlbench.engine.api.activityapi.core.ops.fluent.opfacets.OpImpl<D>
- All Implemented Interfaces:
CompletedOp<D>,FailedOp<D>,OpFacets<D>,Payload<D>,SkippedOp<D>,StartedOp<D>,SucceededOp<D>,TrackedOp<D>,CycleMutable,CycleReadable,CycleResult,ResultReadable,Comparable<CycleResult>
- Direct Known Subclasses:
EventedOpImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfail(int status) Mark this op as failed as of the time it is called, and record the resulting status code.longReturn the nanos that have elapsed since this op was started at the time of this call, plus any prior waittime.longReturn the nanos that have elapsed since the op was started at the time of this call.longgetCycle()get the cycle number associated with this element.longintGet a result associated with some operation, according to the activity-specific result maplongintlongGet the nanosecond instant which was recorded for this operation to be started.intgetTries()retry()Reset the service timer on this op, and increment the tries countervoidsetCycle(long cycle) set the cycle number associated with this element.voidsetWaitTime(long waitTime) Indicate to this op, how much wait time elapsed between the time it was expected to start and the time it actually started.skip(int reason) Mark that this operation is being skipped by the activity type for some reason.start()Signify to NB that the associated operation is known to have started processing in some specific way according to the implementing activity type.succeed(int status) Mark this op as successful as of the time it is called, and record the resulting status code.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleResult
compareTo
-
Constructor Details
-
OpImpl
public OpImpl()
-
-
Method Details
-
start
Description copied from interface:TrackedOpSignify to NB that the associated operation is known to have started processing in some specific way according to the implementing activity type. This should be called after any operational setup work that would not occur in a typical application client scenario. The moment this is called, the start time for the operation is marked. -
setWaitTime
Description copied from interface:TrackedOpIndicate to this op, how much wait time elapsed between the time it was expected to start and the time it actually started. This is used to calculate the response time once service time is known.- Specified by:
setWaitTimein interfaceTrackedOp<D>- Parameters:
waitTime- nanosecond delay- Returns:
- a TrackedOp for method chaining
-
succeed
Description copied from interface:StartedOpMark this op as successful as of the time it is called, and record the resulting status code. -
fail
Description copied from interface:StartedOpMark this op as failed as of the time it is called, and record the resulting status code. -
retry
-
skip
Description copied from interface:TrackedOpMark that this operation is being skipped by the activity type for some reason. -
getCycle
public long getCycle()Description copied from interface:CycleReadableget the cycle number associated with this element.- Specified by:
getCyclein interfaceCycleReadable- Returns:
- a cycle number
-
setCycle
public void setCycle(long cycle) Description copied from interface:CycleMutableset the cycle number associated with this element.- Specified by:
setCyclein interfaceCycleMutable- Parameters:
cycle- The cycle for this operation
-
getStartedAtNanos
public long getStartedAtNanos()Description copied from interface:StartedOpGet the nanosecond instant which was recorded for this operation to be started. Specifically, this is when the operation was known to enter a native protocol or activity type section of logic which is more than just preparatory work by the client before execution.- Specified by:
getStartedAtNanosin interfaceCompletedOp<D>- Specified by:
getStartedAtNanosin interfaceStartedOp<D>- Returns:
- nanoseconds started instant
-
getOpData
-
setData
-
getTries
-
getCurrentServiceTimeNanos
public long getCurrentServiceTimeNanos()Description copied from interface:StartedOpReturn the nanos that have elapsed since the op was started at the time of this call.- Specified by:
getCurrentServiceTimeNanosin interfaceStartedOp<D>- Returns:
- nanosecond service time duration
-
getCurrentResponseTimeNanos
public long getCurrentResponseTimeNanos()Description copied from interface:StartedOpReturn the nanos that have elapsed since this op was started at the time of this call, plus any prior waittime.- Specified by:
getCurrentResponseTimeNanosin interfaceStartedOp<D>- Returns:
- nanosecond response time duration
-
getServiceTimeNanos
public long getServiceTimeNanos()- Specified by:
getServiceTimeNanosin interfaceCompletedOp<D>
-
getResponseTimeNanos
public long getResponseTimeNanos()- Specified by:
getResponseTimeNanosin interfaceCompletedOp<D>
-
getResult
public int getResult()Description copied from interface:ResultReadableGet a result associated with some operation, according to the activity-specific result map- Specified by:
getResultin interfaceResultReadable- Returns:
- an activity-specific result code
-
toString
-
getSkippedReason
public int getSkippedReason()- Specified by:
getSkippedReasonin interfaceSkippedOp<D>
-