Skip to content

Commit 1e2012b

Browse files
committed
Merge branch '3.8-dev'
2 parents 2f52348 + b23c9f6 commit 1e2012b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/TraverserRequirement.java

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,54 @@
3131
*/
3232
public enum TraverserRequirement {
3333

34+
/**
35+
* Indicates that the {@link Traverser} maintains a bulk count, which represents the multiplicity of
36+
* traversers being processed. This allows optimization by grouping multiple traversers with the same
37+
* state and treating them as a single entity to reduce computational overhead.
38+
*/
3439
BULK,
40+
/**
41+
* Represents a {@link TraverserRequirement} indicating that the traverser must track labeled paths.
42+
* A labeled path is a collection of steps where specific steps have associated labels, enabling
43+
* retrieval of intermediate or final results based on these labels during a traversal.This requirement ensures
44+
* that the traverser has the capability to maintain and access this labeled path information as it progresses
45+
* through the traversal.
46+
*/
3547
LABELED_PATH,
48+
/**
49+
* Indicates that a {@link Traverser} supports handling nested loops within a traversal. This requirement is
50+
* relevant for traversals where steps can be executed within the context of multiple, potentially recursive
51+
* loop iterations, enabling complex traversal structures and control flow.
52+
*/
3653
NESTED_LOOP,
54+
/**
55+
* Denotes that a traverser is required to carry an arbitrary object as its state.
56+
*/
3757
OBJECT,
58+
/**
59+
* Represents a traverser requirement where each traverser instance is guaranteed to have a bulk of one. This
60+
* ensures that the traverser is processed individually and not in aggregated bulk.
61+
*/
3862
ONE_BULK,
63+
/**
64+
* Represents the requirement for a traverser to maintain a path of the elements it has visited. This ensures that
65+
* the traverser can track its journey through the traversal graph to support path-based computations.
66+
*/
3967
PATH,
68+
/**
69+
* Indicates that a traverser carries a "sack", which is a mutable structure used to hold aggregated or
70+
* intermediate results during the traversal process. This requirement allows steps to both read from and write to
71+
* the sack, enabling computations that span across multiple steps in a traversal.
72+
*/
4073
SACK,
74+
/**
75+
* Indicates that a traverser is expected to interact with and leverage side-effects during the traversal process.
76+
* Side-effects are data that are collected, shared, or mutated as part of the traversal.
77+
*/
4178
SIDE_EFFECTS,
79+
/**
80+
* Indicates that the traverser is required to support single loop iteration during the traversal.
81+
*/
4282
SINGLE_LOOP
4383

4484
}

0 commit comments

Comments
 (0)