Package org.neo4j.graphdb.traversal
Enum Class Uniqueness
- All Implemented Interfaces:
Serializable
,Comparable<Uniqueness>
,Constable
,UniquenessFactory
A catalog of convenient uniqueness factories.
-
Enum Constant Summary
Enum ConstantDescriptionA node cannot be traversed more than once.Entities on the same level are guaranteed to be unique.For each returned node there's a unique path from the start node to it.This is likeNODE_GLOBAL
, but only guarantees uniqueness among the most recent visited nodes, with a configurable count.No restriction (the user will have to manage it).A relationship cannot be traversed more than once, whereas nodes can.Entities on the same level are guaranteed to be unique.For each returned node there's a (relationship wise) unique path from the start node to it.Same as forNODE_RECENT
, but for relationships. -
Method Summary
Modifier and TypeMethodDescriptionstatic Uniqueness
Returns the enum constant of this class with the specified name.static Uniqueness[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from interface org.neo4j.graphdb.traversal.UniquenessFactory
create, eagerStartBranches
-
Enum Constant Details
-
NODE_GLOBAL
A node cannot be traversed more than once. This is what the legacy traversal framework does. -
NODE_PATH
For each returned node there's a unique path from the start node to it. -
NODE_RECENT
This is likeNODE_GLOBAL
, but only guarantees uniqueness among the most recent visited nodes, with a configurable count. Traversing a huge graph is quite memory intensive in that it keeps track of all the nodes it has visited. For huge graphs a traverser can hog all the memory in the JVM, causingOutOfMemoryError
. Together with thisUniqueness
you can supply a count, which is the number of most recent visited nodes. This can cause a node to be visited more than once, but scales infinitely. -
NODE_LEVEL
Entities on the same level are guaranteed to be unique. -
RELATIONSHIP_GLOBAL
A relationship cannot be traversed more than once, whereas nodes can. -
RELATIONSHIP_PATH
For each returned node there's a (relationship wise) unique path from the start node to it. -
RELATIONSHIP_RECENT
Same as forNODE_RECENT
, but for relationships. -
RELATIONSHIP_LEVEL
Entities on the same level are guaranteed to be unique. -
NONE
No restriction (the user will have to manage it).
-
-
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
-