Enum GraphOptimizedFor
- java.lang.Object
-
- java.lang.Enum<GraphOptimizedFor>
-
- oracle.pgx.config.GraphOptimizedFor
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<GraphOptimizedFor>
public enum GraphOptimizedFor extends java.lang.Enum<GraphOptimizedFor>
Enumeration to specify the optimization strategy for graph operations in PGX.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
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GraphOptimizedFor
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static GraphOptimizedFor[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
READ
public static final GraphOptimizedFor 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
public static final GraphOptimizedFor 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 Detail
-
values
public static GraphOptimizedFor[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (GraphOptimizedFor c : GraphOptimizedFor.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GraphOptimizedFor valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-