Package oracle.pgx.api.expansion
Class AbstractGraphExpander<E extends AbstractGraphExpander<E>>
- java.lang.Object
-
- oracle.pgx.api.expansion.AbstractGraphExpander<E>
-
- Type Parameters:
E- The expansion type.
- Direct Known Subclasses:
GenericGraphExpander,PgqlViewGraphExpander
public abstract class AbstractGraphExpander<E extends AbstractGraphExpander<E>> extends java.lang.ObjectBase for graph expanders.
-
-
Constructor Summary
Constructors Constructor Description AbstractGraphExpander(PartitionedGraphConfig graphConfig, PgxSession session, java.util.function.Function<oracle.pgx.api.expansion.internal.GraphExpansionConfig,PgxFuture<PgxGraph>> expansionFunction, oracle.pgx.api.subgraph.internal.KeystoreLookup keystoreLookup)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EedgePropertiesMergingStrategy(PropertyMergeStrategy edgePropertyMergeStrategy)Set the strategy for how edge properties of duplicate elements are handled.PgxGraphexpand()Call the expand operation and await execution.PgxGraphexpand(java.lang.String newGraphName)Call the expand operation and await execution.PgxFuture<PgxGraph>expandAsync()Call the expand operation.PgxFuture<PgxGraph>expandAsync(java.lang.String newGraphName)Call the expand operation.PgxGraphexpandNewSnapshot()Blocking version ofexpandNewSnapshotAsync().PgxFuture<PgxGraph>expandNewSnapshotAsync()Call the expand operation.EvertexPropertiesMergingStrategy(PropertyMergeStrategy vertexPropertyMergeStrategy)Set the strategy for how vertex properties of duplicate elements are handled.EwithConfig(PartitionedGraphConfig config)Specify a graph config used to load the additional graph data.
-
-
-
Constructor Detail
-
AbstractGraphExpander
public AbstractGraphExpander(PartitionedGraphConfig graphConfig, PgxSession session, java.util.function.Function<oracle.pgx.api.expansion.internal.GraphExpansionConfig,PgxFuture<PgxGraph>> expansionFunction, oracle.pgx.api.subgraph.internal.KeystoreLookup keystoreLookup)
-
-
Method Detail
-
expandAsync
public PgxFuture<PgxGraph> expandAsync()
Call the expand operation.- Returns:
- The new graph.
-
expandAsync
public PgxFuture<PgxGraph> expandAsync(java.lang.String newGraphName)
Call the expand operation.- Returns:
- The new graph.
-
expandNewSnapshotAsync
public PgxFuture<PgxGraph> expandNewSnapshotAsync()
Call the expand operation. This creates a new snapshot of the base graph, instead of a new graph.- Returns:
- The new graph.
-
expand
public PgxGraph expand() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Call the expand operation and await execution.- Returns:
- The new graph.
- Throws:
java.util.concurrent.ExecutionException- when the execution fails.java.lang.InterruptedException- when the operation gets interrupted.
-
expand
public PgxGraph expand(java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Call the expand operation and await execution.- Parameters:
newGraphName- The new graph name.- Returns:
- The new graph.
- Throws:
java.util.concurrent.ExecutionException- when the execution fails.java.lang.InterruptedException- when the operation gets interrupted.
-
expandNewSnapshot
public PgxGraph expandNewSnapshot() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofexpandNewSnapshotAsync(). Calls the expand operation and awaits execution. This creates a new snapshot, instead of a new graph.- Returns:
- The new graph.
- Throws:
java.util.concurrent.ExecutionException- when the execution fails.java.lang.InterruptedException- when the operation gets interrupted.
-
vertexPropertiesMergingStrategy
public E vertexPropertiesMergingStrategy(PropertyMergeStrategy vertexPropertyMergeStrategy)
Set the strategy for how vertex properties of duplicate elements are handled. The default strategy is defined byPropertyMergeStrategy.getDefault().- Parameters:
vertexPropertyMergeStrategy- The vertex property merge strategy.- Returns:
- This expander.
-
edgePropertiesMergingStrategy
public E edgePropertiesMergingStrategy(PropertyMergeStrategy edgePropertyMergeStrategy)
Set the strategy for how edge properties of duplicate elements are handled. The default strategy is defined byPropertyMergeStrategy.getDefault().- Parameters:
edgePropertyMergeStrategy- The edge property merge strategy.- Returns:
- This expander.
-
withConfig
public E withConfig(PartitionedGraphConfig config)
Specify a graph config used to load the additional graph data. This config will always be used instead of the config of the base graph.- Parameters:
config- The graph config.- Returns:
- This expander.
-
-