Enum Class TraverserRequirement
java.lang.Object
java.lang.Enum<TraverserRequirement>
org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement
- All Implemented Interfaces:
Serializable,Comparable<TraverserRequirement>,Constable
A
TraverserRequirement is a list of requirements that a Traversal requires of a Traverser.
The less requirements, the simpler the traverser can be (both in terms of space and time constraints).
Every Step provides its specific requirements via Step.getRequirements().- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that theTraversermaintains a bulk count, which represents the multiplicity of traversers being processed.Represents aTraverserRequirementindicating that the traverser must track labeled paths.Indicates that aTraversersupports handling nested loops within a traversal.Denotes that a traverser is required to carry an arbitrary object as its state.Represents a traverser requirement where each traverser instance is guaranteed to have a bulk of one.Represents the requirement for a traverser to maintain a path of the elements it has visited.Indicates that a traverser carries a "sack", which is a mutable structure used to hold aggregated or intermediate results during the traversal process.Indicates that a traverser is expected to interact with and leverage side-effects during the traversal process.Indicates that the traverser is required to support single loop iteration during the traversal. -
Method Summary
Modifier and TypeMethodDescriptionstatic TraverserRequirementReturns the enum constant of this class with the specified name.static TraverserRequirement[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BULK
Indicates that theTraversermaintains a bulk count, which represents the multiplicity of traversers being processed. This allows optimization by grouping multiple traversers with the same state and treating them as a single entity to reduce computational overhead. -
LABELED_PATH
Represents aTraverserRequirementindicating that the traverser must track labeled paths. A labeled path is a collection of steps where specific steps have associated labels, enabling retrieval of intermediate or final results based on these labels during a traversal.This requirement ensures that the traverser has the capability to maintain and access this labeled path information as it progresses through the traversal. -
NESTED_LOOP
Indicates that aTraversersupports handling nested loops within a traversal. This requirement is relevant for traversals where steps can be executed within the context of multiple, potentially recursive loop iterations, enabling complex traversal structures and control flow. -
OBJECT
Denotes that a traverser is required to carry an arbitrary object as its state. -
ONE_BULK
Represents a traverser requirement where each traverser instance is guaranteed to have a bulk of one. This ensures that the traverser is processed individually and not in aggregated bulk. -
PATH
Represents the requirement for a traverser to maintain a path of the elements it has visited. This ensures that the traverser can track its journey through the traversal graph to support path-based computations. -
SACK
Indicates that a traverser carries a "sack", which is a mutable structure used to hold aggregated or intermediate results during the traversal process. This requirement allows steps to both read from and write to the sack, enabling computations that span across multiple steps in a traversal. -
SIDE_EFFECTS
Indicates that a traverser is expected to interact with and leverage side-effects during the traversal process. Side-effects are data that are collected, shared, or mutated as part of the traversal. -
SINGLE_LOOP
Indicates that the traverser is required to support single loop iteration during the traversal.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-