Class AbstractGraphExpander<E extends AbstractGraphExpander<E>>

  • Type Parameters:
    E - The expansion type.
    Direct Known Subclasses:
    GenericGraphExpander, PgqlViewGraphExpander

    public abstract class AbstractGraphExpander<E extends AbstractGraphExpander<E>>
    extends java.lang.Object
    Base for graph expanders.
    • 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 of expandNewSnapshotAsync(). 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 by PropertyMergeStrategy.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 by PropertyMergeStrategy.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.