Class ProfileStep<S>
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep<S,S>
-
- org.apache.tinkerpop.gremlin.process.traversal.step.util.ProfileStep<S>
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterator<Traverser.Admin<S>>
,Step<S,S>
,MemoryComputing<MutableMetrics>
public final class ProfileStep<S> extends AbstractStep<S,S> implements MemoryComputing<MutableMetrics>
- Author:
- Bob Briody (http://bobbriody.com)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProfileStep.ProfileBiOperator
-
Field Summary
-
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild
-
-
Constructor Summary
Constructors Constructor Description ProfileStep(Traversal.Admin traversal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProfileStep<S>
clone()
Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.MemoryComputeKey<MutableMetrics>
getMemoryComputeKey()
TheMemoryComputeKey
that will be used by this step.Optional<MutableMetrics>
getMetrics()
ReturnsOptional.empty()
if traversal is not iterated or if not locked after strategy application.boolean
hasNext()
Traverser.Admin<S>
next()
protected Traverser.Admin<S>
processNextStart()
void
start()
Starts the metrics timer.void
stop()
Stops the metrics timer.-
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
addLabel, addStart, addStarts, clearLabels, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hashCode, hasStarts, isTraverserStepIdAndLabelsSetByChild, prepareTraversalForNextStep, removeLabel, reset, setId, setNextStep, setPreviousStep, setTraversal, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Step
equals, getRequirements
-
-
-
-
Constructor Detail
-
ProfileStep
public ProfileStep(Traversal.Admin traversal)
-
-
Method Detail
-
getMetrics
public Optional<MutableMetrics> getMetrics()
ReturnsOptional.empty()
if traversal is not iterated or if not locked after strategy application.
-
next
public Traverser.Admin<S> next()
-
hasNext
public boolean hasNext()
-
processNextStart
protected Traverser.Admin<S> processNextStart() throws NoSuchElementException
- Specified by:
processNextStart
in classAbstractStep<S,S>
- Throws:
NoSuchElementException
-
getMemoryComputeKey
public MemoryComputeKey<MutableMetrics> getMemoryComputeKey()
Description copied from interface:MemoryComputing
TheMemoryComputeKey
that will be used by this step.- Specified by:
getMemoryComputeKey
in interfaceMemoryComputing<S>
- Returns:
- the MemoryComputeKey to use
-
clone
public ProfileStep<S> clone()
Description copied from interface:Step
Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication. When cloning a step, it is important that the steps, the cloned step is equivalent to the state of the step whenStep.reset()
is called. Moreover, the previous and next steps should be set toEmptyStep
.
-
start
public void start()
Starts the metrics timer.
-
stop
public void stop()
Stops the metrics timer.
-
-