Enum Class GraphOptimizedFor
- All Implemented Interfaces:
Serializable,Comparable<GraphOptimizedFor>,Constable
The optimization strategy determines whether the graph is optimized for read-intensive scenarios or for fast updates. This impacts the performance characteristics of graph operations such as querying and updating.
Choose the appropriate strategy based on your primary use case:
- Since:
- 20.1
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic GraphOptimizedForReturns the enum constant of this class with the specified name.static GraphOptimizedFor[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
READ
Optimize the graph for read-intensive scenarios.When this strategy is selected, the graph's data structures are replicated whenever a new graph or graph snapshot is created. This results in faster and more efficient read operations, such as traversals and queries, but can lead to performance overhead and increased memory usage during updates, and creating snapshots can be expensive.
Use this option when the primary operations on the graph are read-based, and updates are infrequent or non-existent.
-
UPDATES
Optimize the graph for fast update operations.When this strategy is selected, delta logs are used to manage updates. This approach makes updates more memory-efficient and faster. However, there may be some time overhead when querying the graph due to the need to apply these deltas.
Use this option when the graph is expected to undergo frequent updates, such as adding or removing nodes and edges, or modifying properties of existing elements.
-
-
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
-