You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<8> `PathRetractionStrategy` will remove paths from the traversers and increase the likelihood of bulking as path data is not required after `select('b')`.
5936
5936
<9> `AdjacentToIncidentStrategy` will turn `out()` into `outE()` to increase data access locality.
5937
5937
5938
+
==== A note on Traversal Parameters
5939
+
5940
+
Certain gremlin steps are able to accept parameterized arguments in the form of one of more `GValue` objects. Please see
5941
+
the <<traversal-parameterization,parameterizable steps documentation>> for a complete listing of such steps.
5942
+
5943
+
When authoring strategies that interact with parameterizable steps, it's important to work with `StepContract` interfaces
5944
+
rather than concrete step classes. Parameterizable steps can exist as either concrete implementations or as placeholder
5945
+
steps that hold `GValue` objects (parameterized arguments). The placeholders are temporary proxies for the concrete
5946
+
steps which exist during strategy execution, but must be "reduced" to concrete steps prior to traversal execution. Both
5947
+
concrete and placeholder forms of a step implement the same contract interface, allowing strategies to work uniformly
5948
+
with either representation.
5949
+
5950
+
[source,java]
5951
+
----
5952
+
// Use contract interfaces for parameterizable steps
5953
+
for (GraphStepContract originalGraphStep : TraversalHelper.getStepsOfAssignableClass(GraphStepContract.class, traversal)) {
5954
+
// Work with all matching instances of a step through its contract <1>
Copy file name to clipboardExpand all lines: gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/provider/ProviderGValueReductionStrategy.java
0 commit comments