public class JanusGraphHasStep<S extends org.apache.tinkerpop.gremlin.structure.Element> extends org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasStep<S> implements org.apache.tinkerpop.gremlin.process.traversal.step.Profiling, MultiQueriable<S,S>
HasStep and adds vertices multi-query optimization to this step.
Before this step is evaluated it usually receives multiple future vertices which might be processed next with this step. This step stores all these vertices which might be needed later for evaluation and whenever this step receives the vertex for evaluation which wasn't preFetched previously it sends multi-query for a batch of vertices to fetch their properties and / or labels.
PreFetch logic in this step fetches either all properties or only selected properties (depending on how this step is configured) for all registered vertices, but no more than `txVertexCacheSize`. If there are more registered vertices than `txVertexCacheSize`, they will be left for later preFetch operation when these vertices become necessary.
This step optimizes only access to Vertex properties and skips optimization for any other Element.
| Constructor and Description |
|---|
JanusGraphHasStep(org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasStep<S> originalStep) |
JanusGraphHasStep(org.apache.tinkerpop.gremlin.process.traversal.Traversal.Admin traversal,
org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer... hasContainers) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHasContainer(org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer hasContainer) |
protected boolean |
filter(org.apache.tinkerpop.gremlin.process.traversal.Traverser.Admin<S> traverser) |
boolean |
isPrefetchAllPropertiesRequired() |
void |
registerFirstNewLoopFutureVertexForPrefetching(org.apache.tinkerpop.gremlin.structure.Vertex futureVertex,
int futureVertexTraverserLoop)
Registers a vertex which will pass this step at some point in the future.
|
void |
registerNextLoopFutureVertexForPrefetching(org.apache.tinkerpop.gremlin.structure.Vertex futureVertex,
int futureVertexTraverserLoop)
Registers a vertex which will pass this step at some point in the future.
|
void |
registerSameLoopFutureVertexForPrefetching(org.apache.tinkerpop.gremlin.structure.Vertex futureVertex,
int futureVertexTraverserLoop)
Registers a vertex which will pass this step at some point in the future.
|
void |
removeHasContainer(org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer hasContainer) |
void |
setBatchSize(int batchSize) |
void |
setMetrics(org.apache.tinkerpop.gremlin.process.traversal.util.MutableMetrics metrics) |
void |
setPrefetchAllPropertiesRequired(boolean prefetchAllPropertiesRequired) |
void |
setTxVertexCacheSize(int txVertexCacheSize) |
void |
setUseMultiQuery(boolean useMultiQuery) |
void |
withPropertyPrefetch(String key) |
clone, configure, getHasContainers, getParameters, getRequirements, hashCode, toStringprocessNextStartaddLabel, addStart, addStarts, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hasNext, hasStarts, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, reset, setId, setNextStep, setPreviousStep, setTraversalfinalize, getClass, notify, notifyAll, wait, wait, waitaddLabel, addStart, addStarts, clone, equals, getId, getLabels, getNextStep, getPreviousStep, getRequirements, getTraversal, hasStarts, removeLabel, reset, setId, setNextStep, setPreviousStep, setTraversalforEachRemaining, hasNext, next, removepublic JanusGraphHasStep(org.apache.tinkerpop.gremlin.process.traversal.Traversal.Admin traversal,
org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer... hasContainers)
public JanusGraphHasStep(org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasStep<S> originalStep)
public void addHasContainer(org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer hasContainer)
addHasContainer in interface org.apache.tinkerpop.gremlin.process.traversal.step.HasContainerHolderaddHasContainer in class org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasStep<S extends org.apache.tinkerpop.gremlin.structure.Element>public void removeHasContainer(org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer hasContainer)
removeHasContainer in interface org.apache.tinkerpop.gremlin.process.traversal.step.HasContainerHolderremoveHasContainer in class org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasStep<S extends org.apache.tinkerpop.gremlin.structure.Element>protected boolean filter(org.apache.tinkerpop.gremlin.process.traversal.Traverser.Admin<S> traverser)
filter in class org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasStep<S extends org.apache.tinkerpop.gremlin.structure.Element>public void setUseMultiQuery(boolean useMultiQuery)
setUseMultiQuery in interface MultiQueriable<S extends org.apache.tinkerpop.gremlin.structure.Element,S extends org.apache.tinkerpop.gremlin.structure.Element>public void setBatchSize(int batchSize)
setBatchSize in interface MultiQueriable<S extends org.apache.tinkerpop.gremlin.structure.Element,S extends org.apache.tinkerpop.gremlin.structure.Element>public void registerFirstNewLoopFutureVertexForPrefetching(org.apache.tinkerpop.gremlin.structure.Vertex futureVertex,
int futureVertexTraverserLoop)
MultiQueriableregisterFirstNewLoopFutureVertexForPrefetching in interface MultiQueriable<S extends org.apache.tinkerpop.gremlin.structure.Element,S extends org.apache.tinkerpop.gremlin.structure.Element>futureVertex - The vertex which will reach the step in the future.futureVertexTraverserLoop - In case traverser of the vertex supports loop then it should be provided
via this parameter. Otherwise, `0` should be provided.public void registerSameLoopFutureVertexForPrefetching(org.apache.tinkerpop.gremlin.structure.Vertex futureVertex,
int futureVertexTraverserLoop)
MultiQueriableregisterSameLoopFutureVertexForPrefetching in interface MultiQueriable<S extends org.apache.tinkerpop.gremlin.structure.Element,S extends org.apache.tinkerpop.gremlin.structure.Element>futureVertex - The vertex which will reach the step in the future.futureVertexTraverserLoop - In case traverser of the vertex supports loop then it should be provided
via this parameter. Otherwise, `0` should be provided.public void registerNextLoopFutureVertexForPrefetching(org.apache.tinkerpop.gremlin.structure.Vertex futureVertex,
int futureVertexTraverserLoop)
MultiQueriableregisterNextLoopFutureVertexForPrefetching in interface MultiQueriable<S extends org.apache.tinkerpop.gremlin.structure.Element,S extends org.apache.tinkerpop.gremlin.structure.Element>futureVertex - The vertex which will reach the step in the future.futureVertexTraverserLoop - In case traverser of the vertex supports loop then it should be provided
* via this parameter. Otherwise, `0` should be provided.public void setMetrics(org.apache.tinkerpop.gremlin.process.traversal.util.MutableMetrics metrics)
setMetrics in interface org.apache.tinkerpop.gremlin.process.traversal.step.Profilingpublic void setTxVertexCacheSize(int txVertexCacheSize)
public void withPropertyPrefetch(String key)
public boolean isPrefetchAllPropertiesRequired()
public void setPrefetchAllPropertiesRequired(boolean prefetchAllPropertiesRequired)
Copyright © 2012–2023. All rights reserved.