Class ProfilingAware.ProfiledBarrier
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.step.ProfilingAware.ProfiledBarrier
- All Implemented Interfaces:
Barrier,MemoryComputing
- Enclosing interface:
- ProfilingAware
A helper class which holds a
Barrier and it's related ProfileStep so that the latter can have
its timer started and stopped appropriately.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBarrier(Object barrier) Add a barrier to the step.voiddone()A way to hard set that the barrier is complete.If a barrier is unproductive then provide an empty object suitable to the implementation which can be used to represent that state.TheMemoryComputeKeythat will be used by this step.booleanWhether or not the step has an accessible barrier.Get the next barrier within this step.voidProcess all left traversers by do not yield the resultant output.
-
Constructor Details
-
ProfiledBarrier
-
-
Method Details
-
processAllStarts
public void processAllStarts()Description copied from interface:BarrierProcess all left traversers by do not yield the resultant output. This method is useful for steps likeReducingBarrierStep, where traversers can be processed "on the fly" and thus, reduce memory consumption.- Specified by:
processAllStartsin interfaceBarrier
-
hasNextBarrier
public boolean hasNextBarrier()Description copied from interface:BarrierWhether or not the step has an accessible barrier.- Specified by:
hasNextBarrierin interfaceBarrier- Returns:
- whether a barrier exists or not
-
nextBarrier
Description copied from interface:BarrierGet the next barrier within this step. Barriers from parallel steps can be the be merged to create a single step with merge barriers.- Specified by:
nextBarrierin interfaceBarrier- Returns:
- the next barrier of the step
- Throws:
NoSuchElementException
-
addBarrier
Description copied from interface:BarrierAdd a barrier to the step. This typically happens when multiple parallel barriers need to become one barrier at a single step.- Specified by:
addBarrierin interfaceBarrier- Parameters:
barrier- the barrier to merge in
-
getEmptyBarrier
Description copied from interface:BarrierIf a barrier is unproductive then provide an empty object suitable to the implementation which can be used to represent that state. This is important for cases likeby(out().order().fold())where theorder()might filter but thefold()means the traversal is productive.- Specified by:
getEmptyBarrierin interfaceBarrier
-
getMemoryComputeKey
Description copied from interface:MemoryComputingTheMemoryComputeKeythat will be used by this step.- Specified by:
getMemoryComputeKeyin interfaceMemoryComputing- Returns:
- the MemoryComputeKey to use
-
done
public void done()Description copied from interface:BarrierA way to hard set that the barrier is complete. This is necessary when parallel barriers don't all have barriers and need hard resetting. The default implementation does nothing.
-