Class PgxGraph

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.lang.Cloneable
    Direct Known Subclasses:
    BipartiteGraph

    public class PgxGraph
    extends PgxManagedObject
    implements java.lang.Cloneable
    This class is a reference to a graph on the server side: operations on objects of this class are executed on the server side onto the referenced graph.

    Note that a session can have multiple objects referencing the same graph: the result of any operation mutating the graph on any of those references will be visible on all of them.

    • Method Detail

      • getId

        public final oracle.pgx.common.PgxId getId()
        Returns an internal identifier for this graph snapshot. Only meant for internal usage.
        Returns:
        the internal identifier of this graph snapshot
        Since:
        19.4
      • getMetaData

        public GraphMetaData getMetaData()
        Provides the metadata associated to this graph snapshot which includes information about the structure of the graph, versioning information, etc.
        Returns:
        the metadata for the graph snapshot
        Since:
        21.1
      • getPgxInstance

        public ServerInstance getPgxInstance()
        Gets the server instance.
        Returns:
        the instance this graph belongs to.
      • getSession

        public PgxSession getSession()
        Gets the session.
        Returns:
        the session this graph belongs to.
      • getName

        public java.lang.String getName()
        Gets the name.
        Specified by:
        getName in class PgxManagedObject
        Returns:
        the name of this graph.
      • isTransient

        public boolean isTransient()
        Gets the transient flag of this graph.
        Returns:
        true if this graph is transient (session-bound, private), false otherwise.
      • getNumVertices

        public long getNumVertices()
        Gets the number of vertices
        Returns:
        the numVertices
      • getNumEdges

        public long getNumEdges()
        Gets the number of edges
        Returns:
        the numEdges
      • getMemoryMb

        public long getMemoryMb()
        Gets the estimated number of memory this graph (including its properties) consumes in memory (in megabytes).
        Returns:
        the number of estimated mega-bytes.
      • getDataSourceVersion

        public java.lang.String getDataSourceVersion()
        Gets the format-specific version identifier provided by data-source (timestamp for files, snapshot ID for databases).
        Returns:
        the dataSourceVersion. Can be null if graph was not created from a datasource ( isTransient() is true).
      • getConfig

        public GraphConfig getConfig()
        Gets the graph configuration object used to specify the data source of this graph.
        Returns:
        the config. Can be null if graph was not created from a datasource (isTransient() is true).
      • getCreationRequestTimestamp

        public long getCreationRequestTimestamp()
        Gets the timestamp when this graph was requested to be created.
        Returns:
        the timestamp when this graph was requested to be created in milliseconds since Jan 1st, 1970 (UTC).
      • getCreationTimestamp

        public long getCreationTimestamp()
        Gets the timestamp when this graph finished creation.
        Returns:
        the timestamp when this graph finished creation in milliseconds since Jan 1st, 1970 (UTC).
      • getVertexIdStrategy

        public IdStrategy getVertexIdStrategy()
        Gets the ID strategy used for the vertices of this graph.
        Returns:
        the vertex ID strategy.
      • getVertexIdType

        public IdType getVertexIdType()
        Gets the vertex ID type of this graph.
        Returns:
        the vertex ID type.
      • getEdgeIdStrategy

        public IdStrategy getEdgeIdStrategy()
        Gets the ID strategy used for the edges of this graph.
        Returns:
        the edge ID strategy.
      • addRedactionRuleAsync

        public PgxFuture<java.lang.Void> addRedactionRuleAsync​(oracle.pgx.config.PgxRedactionRuleConfig ruleConfig,
                                                               AuthorizationType type,
                                                               java.lang.String... names)
        Add a redaction rule configuration for an AuthorizationType names.
        Parameters:
        ruleConfig - the rule configuration to add for given names
        type - the type of the @link #AuthorizationType
        names - the AuthorizationType users to whom the rule configuration will be added
      • removeRedactionRuleAsync

        public PgxFuture<java.lang.Void> removeRedactionRuleAsync​(oracle.pgx.config.PgxRedactionRuleConfig ruleConfig,
                                                                  AuthorizationType type,
                                                                  java.lang.String... names)
        Removes a redaction rule for AuthorizationType names.
        Parameters:
        ruleConfig - the rule configuration to remove for given names
        type - the type of the @link #AuthorizationType
        names - the AuthorizationType users to whom the rule configuration will be removed
      • getRedactionRulesAsync

        public PgxFuture<java.util.List<oracle.pgx.config.PgxRedactionRuleConfig>> getRedactionRulesAsync​(AuthorizationType type,
                                                                                                          java.lang.String name)
        Gets redaction rules for an AuthorizationType name.
        Parameters:
        type - the type of the @link #AuthorizationType
        name - the AuthorizationType user from whom rules will be returned
      • createChangeSet

        public <ID extends java.lang.Comparable<ID>> GraphChangeSet<ID> createChangeSet()
        Creates a change set for updating the graph using IdGenerationStrategy.AUTO_GENERATED for edge ID generation strategy Note: This is currently not supported for undirected graphs.
        Returns:
        an empty change set
      • createChangeSet

        public <ID extends java.lang.Comparable<ID>> GraphChangeSet<ID> createChangeSet​(IdGenerationStrategy vertexIdGenerationStrategy,
                                                                                        IdGenerationStrategy edgeIdGenerationStrategy)
        Creates a change set for updating the graph. Note: This is currently not supported for undirected graphs.
        Parameters:
        vertexIdGenerationStrategy - the vertices Id generation strategy to be used
        edgeIdGenerationStrategy - the edges Id generation strategy to be used
        Returns:
        an empty change set
        Since:
        3.1.0
      • alterGraph

        public GraphAlterationBuilder alterGraph()
        Create a graph alteration builder to define the graph schema alterations to perform on the graph
        Returns:
        an empty graph alteration builder
        Since:
        20.1
      • expandGraph

        public GenericGraphExpander expandGraph()
        Create a graph expansion builder to define how to expand the graph (e.g. from a PG view according to some PGQL queries)
        Returns:
        the expansion builder
        Since:
        22.1.1
      • getVertexAsync

        public <ID> PgxFuture<PgxVertex<ID>> getVertexAsync​(ID id)
        Looks up a PgxVertex of this graph by ID.
        Parameters:
        id - the ID of the vertex
        Returns:
        the PgxVertex object
      • hasVertexAsync

        public <ID> PgxFuture<java.lang.Boolean> hasVertexAsync​(ID id)
        Looks up whether the graph has a Vertex with the given ID
        Parameters:
        id - the ID of the vertex
        Returns:
        true if the graph has a Vertex with the given ID
      • getEdgeAsync

        public PgxFuture<PgxEdge> getEdgeAsync​(long id)
        Looks up a PgxEdge of this graph by ID.
        Parameters:
        id - the ID of the edge
        Returns:
        the PgxEdge object
      • getEdgeAsync

        public PgxFuture<PgxEdge> getEdgeAsync​(java.lang.String id)
        Looks up a PgxEdge of this graph by ID.
        Parameters:
        id - the ID of the edge
        Returns:
        the PgxEdge object
      • hasEdgeAsync

        public PgxFuture<java.lang.Boolean> hasEdgeAsync​(long id)
        Looks up whether the graph has an Edge with the given ID
        Parameters:
        id - the ID of the edge
        Returns:
        true if the graph has an Edge with the given ID
      • hasEdgeAsync

        public PgxFuture<java.lang.Boolean> hasEdgeAsync​(java.lang.String id)
        Looks up whether the graph has an Edge with the given ID
        Parameters:
        id - the ID of the edge
        Returns:
        true if the graph has an Edge with the given ID
      • getRandomVertexAsync

        public <ID> PgxFuture<PgxVertex<ID>> getRandomVertexAsync()
        Picks a random vertex in the graph.
        Returns:
        a random vertex.
        Since:
        2.5.0
      • getRandomEdgeAsync

        public PgxFuture<PgxEdge> getRandomEdgeAsync()
        Picks a random edge in the graph.
        Returns:
        a random edge.
        Since:
        2.5.0
      • hasVertexLabelsAsync

        public PgxFuture<java.lang.Boolean> hasVertexLabelsAsync()
        Returns:
        true if the graph has vertex labels, false if not
      • getVertexLabelsAsync

        public <ID> PgxFuture<VertexLabels<ID>> getVertexLabelsAsync()
        Get the vertex labels belonging to this graph.
        Returns:
        the vertex labels, encoded as a VertexProperty.
      • hasEdgeLabelAsync

        public PgxFuture<java.lang.Boolean> hasEdgeLabelAsync()
        Returns:
        true if the graph has edge labels, false if not
      • getEdgeLabelAsync

        public PgxFuture<EdgeLabel> getEdgeLabelAsync()
        Get the edge labels belonging to this graph.
        Returns:
        the edge labels, encoded as an EdgeProperty.
      • getVertexPropertiesAsync

        public PgxFuture<java.util.Set<VertexProperty<?,​?>>> getVertexPropertiesAsync()
        Get the set of vertex properties belonging to this graph. This list might contain transient, private and published properties.
        Returns:
        all vertex properties of this graph
      • getEdgePropertiesAsync

        public PgxFuture<java.util.Set<EdgeProperty<?>>> getEdgePropertiesAsync()
        Get the set of edge properties belonging to this graph. This list might contain transient, private and published properties.
        Returns:
        all edge properties of this graph
      • getVertexPropertyAsync

        public <ID,​V> PgxFuture<VertexProperty<ID,​V>> getVertexPropertyAsync​(java.lang.String name)
        Gets a vertex property of this graph.

        The property will be first looked up in the session private namespace, if it is not found there it will be looked up in the public namespace. If a property with the given name is not found in either the private or public namespace, null is returned.

        Parameters:
        name - the name of the vertex property
        Returns:
        the vertex property object or null if no such property exists
        Throws:
        java.lang.NullPointerException - if the passed name is null
      • getEdgePropertyAsync

        public <V> PgxFuture<EdgeProperty<V>> getEdgePropertyAsync​(java.lang.String name)
        Gets an edge property of this graph

        The property will be first looked up in the session private namespace, if it is not found there it will be looked up in the public namespace. If a property with the given name is not found in either the private or public namespace, null is returned.

        Parameters:
        name - the name of the edge property
        Returns:
        the edge property object or null if no such property exists
        Throws:
        java.lang.NullPointerException - if the passed name is null
      • getVertexPropertyAsync

        public <ID,​V> PgxFuture<VertexProperty<ID,​V>> getVertexPropertyAsync​(Namespace namespace,
                                                                                         java.lang.String name)
        Gets a vertex property of this graph in the given namespace. If the namespace is null, use same semantics as getVertexPropertyAsync(String)
        Parameters:
        namespace - the namespace in which to look up the property. Can be null, which implies same behavior as getVertexPropertyAsync(String)
        name - the name of the vertex property
        Returns:
        the vertex property object or null if no such property exists
        Throws:
        java.lang.NullPointerException - if the passed name is null
      • getEdgePropertyAsync

        public <V> PgxFuture<EdgeProperty<V>> getEdgePropertyAsync​(Namespace namespace,
                                                                   java.lang.String name)
        Gets an edge property of this graph in the given namespace. If the namespace is null, use same semantics as getEdgePropertyAsync(String)
        Parameters:
        namespace - the namespace in which to look up the property. Can be null, which implies same behavior as getEdgePropertyAsync(String)
        name - the name of the edge property
        Returns:
        the edge property object or null if no such property exists
        Throws:
        java.lang.NullPointerException - if the passed name is null
      • storeAsync

        public PgxFuture<FileGraphConfig> storeAsync​(Format targetFormat,
                                                     java.lang.String targetPath)
        Stores this graph in a given file format on a file system. This is a convenience method around store(Format, String, boolean), setting the overwrite flag to false.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetPath - the path the graph should be written to. Use schemes to write to a specific file system.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.lang.String targetBasePath)
        Stores this graph in a given file format on a file system. This is a convenience method around store(ProviderFormat, String, boolean), setting the overwrite flag to false.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the path the graph should be written to. Use schemes to write to a specific file system.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        19.4.0
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.lang.String targetBasePath,
                                                            java.util.Set<java.lang.String> vertexProvidersToStore,
                                                            java.util.Set<java.lang.String> edgeProvidersToStore)
        Stores this graph in a given file format on a file system. This is a convenience method around store(ProviderFormat, String, boolean), setting the overwrite flag to false.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the path the graph should be written to. Use schemes to write to a specific file system.
        vertexProvidersToStore - for partitioned graphs, the vertex providers to store
        edgeProvidersToStore - for partitioned graphs, the edge providers to store
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        20.1
      • storeAsync

        public PgxFuture<FileGraphConfig> storeAsync​(Format targetFormat,
                                                     java.lang.String targetPath,
                                                     boolean overwrite)
        Stores this graph in a given file format on a file system. This is a convenience method around storeAsync(Format, String, Collection, Collection, boolean), storing all vertex and edge properties and no file system attributes.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetPath - the path the graph should be written to. Use schemes to write to a specific file system.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.lang.String targetBasePath,
                                                            boolean overwrite)
        Stores this graph in a given file format on a file system. This is a convenience method around storeAsync(ProviderFormat, String, Collection, Collection, boolean), storing all vertex and edge properties and no file system attributes.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the path the graph should be written to. Use schemes to write to a specific file system.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        19.4.0
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.lang.String targetBasePath,
                                                            java.util.Set<java.lang.String> vertexProvidersToStore,
                                                            java.util.Set<java.lang.String> edgeProvidersToStore,
                                                            boolean overwrite)
        Stores this graph in a given file format on a file system. This is a convenience method around storeAsync(ProviderFormat, String, Collection, Collection, boolean), storing all vertex and edge properties and no file system attributes.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the path the graph should be written to. Use schemes to write to a specific file system.
        vertexProvidersToStore - the vertex providers to store
        edgeProvidersToStore - the edge providers to store
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        20.1
      • storeAsync

        public PgxFuture<FileGraphConfig> storeAsync​(Format targetFormat,
                                                     java.lang.String targetPath,
                                                     java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                     java.util.Collection<EdgeProperty<?>> edgeProps,
                                                     boolean overwrite)
        Stores this graph in a given file format on a file system.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetPath - the path the graph should be written to. Use schemes to write to a specific file system.
        vertexProps - the collection of vertex properties to store together with the graph data. You can use VertexProperty.NONE or VertexProperty.ALL to indicate all or no properties.
        edgeProps - the collection of edge properties to store together with the graph data. You can use EdgeProperty.NONE or EdgeProperty.ALL to indicate all or no properties.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.lang.String targetBasePath,
                                                            java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                            java.util.Collection<EdgeProperty<?>> edgeProps,
                                                            boolean overwrite)
        Stores this graph in a given file format on a file system.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the path the graph should be written to. Use schemes to write to a specific file system.
        vertexProps - the collection of vertex properties to store together with the graph data. You can use VertexProperty.NONE or VertexProperty.ALL to indicate all or no properties.
        edgeProps - the collection of edge properties to store together with the graph data. You can use EdgeProperty.NONE or EdgeProperty.ALL to indicate all or no properties.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        19.4.0
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.lang.String targetBasePath,
                                                            java.util.Set<java.lang.String> vertexProvidersToStore,
                                                            java.util.Set<java.lang.String> edgeProvidersToStore,
                                                            java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                            java.util.Collection<EdgeProperty<?>> edgeProps,
                                                            boolean overwrite)
        Stores this graph in a given file format on a file system.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the path the graph should be written to. Use schemes to write to a specific file system.
        vertexProvidersToStore - for partitioned graphs, the vertex providers to store
        edgeProvidersToStore - for partitioned graphs, the edge providers to store
        vertexProps - the collection of vertex properties to store together with the graph data. You can use VertexProperty.NONE or VertexProperty.ALL to indicate all or no properties.
        edgeProps - the collection of edge properties to store together with the graph data. You can use EdgeProperty.NONE or EdgeProperty.ALL to indicate all or no properties.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        20.1
      • storeAsync

        public PgxFuture<FileGraphConfig> storeAsync​(Format targetFormat,
                                                     java.lang.String targetBasePath,
                                                     int numPartitions)
        Stores this graph in a given file format in multiple partitions on a file system. This is a convenience method around store(Format, String, int, boolean), setting the overwrite flag to false.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the base path to use for writing the graph. Use schemes to write to a specific file system.
        numPartitions - the number of partitions in which to write the graph.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.lang.String targetBasePath,
                                                            int numPartitions)
        Stores this graph in a given file format in multiple partitions on a file system. This is a convenience method around storeAsync(ProviderFormat, String, int, boolean), setting the overwrite flag to false.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the base path to use for writing the graph. Use schemes to write to a specific file system.
        numPartitions - the number of partitions in which to write the graph.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        19.4.0
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.lang.String targetBasePath,
                                                            int numPartitions,
                                                            java.util.Set<java.lang.String> vertexProvidersToStore,
                                                            java.util.Set<java.lang.String> edgeProvidersToStore)
        Stores this graph in a given file format in multiple partitions on a file system. This is a convenience method around storeAsync(ProviderFormat, String, int, boolean), setting the overwrite flag to false.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the base path to use for writing the graph. Use schemes to write to a specific file system.
        numPartitions - the number of partitions in which to write the graph.
        vertexProvidersToStore - for partitioned graphs, the vertex providers to store
        edgeProvidersToStore - for partitioned graphs, the edge providers to store
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        19.4.0
      • storeAsync

        public PgxFuture<FileGraphConfig> storeAsync​(Format targetFormat,
                                                     java.lang.String targetBasePath,
                                                     int numPartitions,
                                                     boolean overwrite)
        Stores this graph in a given file format in multiple partitions on a file system. This is a convenience method around storeAsync(Format, String, int, Collection, Collection, boolean), storing all vertex and edge properties and no file system attributes.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the base path to use for writing the graph. Use schemes to write to a specific file system.
        numPartitions - the number of partitions in which to write the graph.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.lang.String targetBasePath,
                                                            int numPartitions,
                                                            boolean overwrite)
        Stores this graph in a given file format in multiple partitions on a file system. This is a convenience method around storeAsync(ProviderFormat, String, int, Collection, Collection, boolean), storing all vertex and edge properties and no file system attributes.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the base path to use for writing the graph. Use schemes to write to a specific file system.
        numPartitions - the number of partitions in which to write the graph.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        19.4.0
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.lang.String targetBasePath,
                                                            int numPartitions,
                                                            java.util.Set<java.lang.String> vertexProvidersToStore,
                                                            java.util.Set<java.lang.String> edgeProvidersToStore,
                                                            boolean overwrite)
        Stores this graph in a given file format in multiple partitions on a file system. This is a convenience method around storeAsync(ProviderFormat, String, int, Collection, Collection, boolean), storing all vertex and edge properties and no file system attributes.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the base path to use for writing the graph. Use schemes to write to a specific file system.
        numPartitions - the number of partitions in which to write the graph.
        vertexProvidersToStore - the vertex providers to store
        edgeProvidersToStore - the edge providers to store
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        20.1
      • storeAsync

        public PgxFuture<FileGraphConfig> storeAsync​(Format targetFormat,
                                                     java.lang.String targetBasePath,
                                                     int numPartitions,
                                                     java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                     java.util.Collection<EdgeProperty<?>> edgeProps,
                                                     boolean overwrite)
        Stores this graph in a given file format in multiple partitions on a file system. This is a convenience method around storeAsync(Format, FileGraphStoringConfig, Collection, Collection, boolean).
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the base path to use for writing the graph. Use schemes to write to a specific file system.
        numPartitions - the number of partitions in which to write the graph.
        vertexProps - the collection of vertex properties to store together with the graph data. You can use VertexProperty.NONE or VertexProperty.ALL to indicate all or no properties.
        edgeProps - the collection of edge properties to store together with the graph data. You can use EdgeProperty.NONE or EdgeProperty.ALL to indicate all or no properties.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.lang.String targetBasePath,
                                                            int numPartitions,
                                                            java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                            java.util.Collection<EdgeProperty<?>> edgeProps,
                                                            boolean overwrite)
        Stores this graph in a given file format in multiple partitions on a file system. This is a convenience method around storeAsync(ProviderFormat, String, int, Set, Set, Map, Map, Collection, Collection, boolean).
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the base path to use for writing the graph. Use schemes to write to a specific file system.
        numPartitions - the number of partitions in which to write the graph.
        vertexProps - the collection of vertex properties to store together with the graph data. You can use VertexProperty.NONE or VertexProperty.ALL to indicate all or no properties.
        edgeProps - the collection of edge properties to store together with the graph data. You can use EdgeProperty.NONE or EdgeProperty.ALL to indicate all or no properties.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        19.4.0
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.lang.String targetBasePath,
                                                            int numPartitions,
                                                            java.util.Set<java.lang.String> vertexProvidersToStore,
                                                            java.util.Set<java.lang.String> edgeProvidersToStore,
                                                            java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                            java.util.Collection<EdgeProperty<?>> edgeProps,
                                                            boolean overwrite)
        Stores this graph in a given file format in multiple partitions on a file system. This is a convenience method around storeAsync(ProviderFormat, String, int, Set, Set, Map, Map, Collection, Collection, boolean).
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        targetBasePath - the base path to use for writing the graph. Use schemes to write to a specific file system.
        numPartitions - the number of partitions in which to write the graph.
        vertexProvidersToStore - the vertex providers to store
        edgeProvidersToStore - the edge providers to store
        vertexProps - the collection of vertex properties to store together with the graph data. You can use VertexProperty.NONE or VertexProperty.ALL to indicate all or no properties.
        edgeProps - the collection of edge properties to store together with the graph data. You can use EdgeProperty.NONE or EdgeProperty.ALL to indicate all or no properties.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        20.1
      • storeAsync

        public PgxFuture<FileGraphConfig> storeAsync​(Format targetFormat,
                                                     FileGraphStoringConfig storingConfig)
        Stores this graph in a given file format in multiple partitions on a file system. This is a convenience method around store(Format, FileGraphStoringConfig, boolean), setting the overwrite flag to false.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        storingConfig - the storing configuration to use for writing the graph.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.util.Map<java.lang.String,​FileGraphStoringConfig> vertexStoringConfigs,
                                                            java.util.Map<java.lang.String,​FileGraphStoringConfig> edgeStoringConfigs)
        Stores this graph in a given file format in multiple partitions on a file system. This is a convenience method around storeAsync(ProviderFormat, Map, Map, boolean), setting the overwrite flag to false.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        vertexStoringConfigs - the storing configurations to use for writing the vertices from the vertex providers.
        edgeStoringConfigs - the storing configurations to use for writing the edges from the edge providers.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        19.4.0
      • storeAsync

        public PgxFuture<FileGraphConfig> storeAsync​(Format targetFormat,
                                                     FileGraphStoringConfig storingConfig,
                                                     boolean overwrite)
        Stores this graph in a given file format in multiple partitions on a file system. This is a convenience method around storeAsync(Format, FileGraphStoringConfig, Collection, Collection, boolean), storing all vertex and edge properties and no file system attributes.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        storingConfig - the storing configuration to use for writing the graph.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.util.Map<java.lang.String,​FileGraphStoringConfig> vertexStoringConfigs,
                                                            java.util.Map<java.lang.String,​FileGraphStoringConfig> edgeStoringConfigs,
                                                            boolean overwrite)
        Stores this graph in a given file format in multiple partitions on a file system. This is a convenience method around storeAsync(ProviderFormat, Map, Map, Collection, Collection, boolean), storing all vertex and edge properties and no file system attributes.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        vertexStoringConfigs - the storing configurations to use for writing the vertices from the vertex providers.
        edgeStoringConfigs - the storing configurations to use for writing the edges from the edge providers.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        19.4.0
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.util.Set<java.lang.String> vertexProvidersToStore,
                                                            java.util.Set<java.lang.String> edgeProvidersToStore,
                                                            java.util.Map<java.lang.String,​FileGraphStoringConfig> vertexStoringConfigs,
                                                            java.util.Map<java.lang.String,​FileGraphStoringConfig> edgeStoringConfigs,
                                                            boolean overwrite)
        Stores this graph in a given file format in multiple partitions on a file system. This is a convenience method around storeAsync(ProviderFormat, Map, Map, Collection, Collection, boolean), storing all vertex and edge properties and no file system attributes.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        vertexProvidersToStore - for partitioned graphs, the vertex providers to store
        edgeProvidersToStore - for partitioned graphs, the edge providers to store
        vertexStoringConfigs - the storing configurations to use for writing the vertices from the vertex providers.
        edgeStoringConfigs - the storing configurations to use for writing the edges from the edge providers.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        20.1
      • storeAsync

        public PgxFuture<FileGraphConfig> storeAsync​(Format targetFormat,
                                                     FileGraphStoringConfig storingConfig,
                                                     java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                     java.util.Collection<EdgeProperty<?>> edgeProps,
                                                     boolean overwrite)
        Stores this graph in a given file format in multiple partitions on a file system.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        storingConfig - the storing configuration to use for writing the graph.
        vertexProps - the collection of vertex properties to store together with the graph data. You can use VertexProperty.NONE or VertexProperty.ALL to indicate all or no properties.
        edgeProps - the collection of edge properties to store together with the graph data. You can use EdgeProperty.NONE or EdgeProperty.ALL to indicate all or no properties.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.util.Map<java.lang.String,​FileGraphStoringConfig> vertexStoringConfigs,
                                                            java.util.Map<java.lang.String,​FileGraphStoringConfig> edgeStoringConfigs,
                                                            java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                            java.util.Collection<EdgeProperty<?>> edgeProps,
                                                            boolean overwrite)
        Stores this graph in a given file format in multiple partitions on a file system.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        vertexStoringConfigs - the storing configurations to use for writing the vertices from the vertex providers.
        edgeStoringConfigs - the storing configurations to use for writing the edges from the edge providers.
        vertexProps - the collection of vertex properties to store together with the graph data. You can use VertexProperty.NONE or VertexProperty.ALL to indicate all or no properties.
        edgeProps - the collection of edge properties to store together with the graph data. You can use EdgeProperty.NONE or EdgeProperty.ALL to indicate all or no properties.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        19.4.0
      • storeAsync

        public PgxFuture<PartitionedGraphConfig> storeAsync​(ProviderFormat targetFormat,
                                                            java.util.Set<java.lang.String> vertexProvidersToStore,
                                                            java.util.Set<java.lang.String> edgeProvidersToStore,
                                                            java.util.Map<java.lang.String,​FileGraphStoringConfig> vertexStoringConfigs,
                                                            java.util.Map<java.lang.String,​FileGraphStoringConfig> edgeStoringConfigs,
                                                            java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                            java.util.Collection<EdgeProperty<?>> edgeProps,
                                                            boolean overwrite)
        Stores this graph in a given file format in multiple partitions on a file system.
        Parameters:
        targetFormat - the format in which to store this graph. Note that only file formats with vertices and edge combined in same file are supported.
        vertexProvidersToStore - for partitioned graphs, the vertex providers to store
        edgeProvidersToStore - for partitioned graphs, the edge providers to store
        vertexStoringConfigs - the storing configurations to use for writing the vertices from the vertex providers.
        edgeStoringConfigs - the storing configurations to use for writing the edges from the edge providers.
        vertexProps - the collection of vertex properties to store together with the graph data. You can use VertexProperty.NONE or VertexProperty.ALL to indicate all or no properties.
        edgeProps - the collection of edge properties to store together with the graph data. You can use EdgeProperty.NONE or EdgeProperty.ALL to indicate all or no properties.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        A graph config object which can be used to load the stored graph back into memory.
        Since:
        20.1
      • storeAsync

        public PgxFuture<GraphConfig> storeAsync​(GraphConfig targetConfig,
                                                 boolean overwrite)
        Stores this graph in a file or database.
        Parameters:
        targetConfig - the graph configuration describing the stored graph.
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        the given graph config. Can be used to load the stored graph back into memory.
      • storeAsync

        public PgxFuture<GraphConfig> storeAsync​(GraphConfig targetConfig,
                                                 java.util.Set<java.lang.String> vertexProvidersToStore,
                                                 java.util.Set<java.lang.String> edgeProvidersToStore,
                                                 boolean overwrite)
        Stores this graph in a file or database.
        Parameters:
        targetConfig - the graph configuration describing the stored graph.
        vertexProvidersToStore - for partitioned graphs, the vertex providers to store
        edgeProvidersToStore - for partitioned graphs, the edge providers to store
        overwrite - Set this flag to true if you want to overwrite any existing file rather than getting an exception if the target path already exists.
        Returns:
        the given graph config. Can be used to load the stored graph back into memory.
        Since:
        20.1
      • destroyAsync

        public PgxFuture<java.lang.Void> destroyAsync()
        Destroy a graph with all its properties. After this operation, neither the graph nor its properties can be used anymore within this session.

        Note that if you have multiple PgxGraph objects referencing the same graph (e.g. because you called PgxSession.getGraph(String) multiple times with the same argument), they will ALL become invalid after calling this method; therefore, subsequent operations on ANY of them will result in an exception.

        Specified by:
        destroyAsync in class Destroyable
        Returns:
        a future which will be completed once the destruction request finishes.
      • destroyVertexPropertyIfExistsAsync

        public PgxFuture<java.lang.Void> destroyVertexPropertyIfExistsAsync​(java.lang.String name)
        Destroys a vertex property if it exists. Does nothing otherwise.
        Parameters:
        name - the name of the vertex property to destroy
        Since:
        3.1.0
      • destroyEdgePropertyIfExistsAsync

        public PgxFuture<java.lang.Void> destroyEdgePropertyIfExistsAsync​(java.lang.String name)
        Destroys an edge property if it exists. Does nothing otherwise.
        Parameters:
        name - the name of the edge property to destroy
        Since:
        3.1.0
      • isFreshAsync

        public PgxFuture<java.lang.Boolean> isFreshAsync()
        Check whether an in-memory representation of a graph is fresh. If the given graph is not the latest snapshot in memory the method will return false. If the given graph is the latest snapshot in memory, its snapshot version gets compared to the latest version reported by datasource (SCN for databases, last-modified timestamp for files).

        If the given graph is transient (private, session-bound), it is always considered fresh.

        Returns:
        true if given graph is fresh, false otherwise
      • createScalarAsync

        public <T> PgxFuture<Scalar<T>> createScalarAsync​(PropertyType type,
                                                          java.lang.String newScalarName)
        Create a session-bound scalar.
        Parameters:
        type - the type of scalar
        newScalarName - name of the scalar to be created
        Returns:
        the newly created scalar
      • createScalarAsync

        public <T> PgxFuture<Scalar<T>> createScalarAsync​(PropertyType type)
        Creates a new Scalar.
        Parameters:
        type - the Property Type
        Returns:
        newly created Scalar.
      • createVectorScalarAsync

        public <T> PgxFuture<Scalar<PgxVect<T>>> createVectorScalarAsync​(PropertyType type,
                                                                         int dimension,
                                                                         java.lang.String newScalarName)
        Create a session-bound vector scalar.
        Parameters:
        type - the type of vector scalar
        dimension - of vector scalar to be created
        newScalarName - name of the vector scalar to be created
        Returns:
        the newly created vector scalar
      • createVectorScalarAsync

        public <T> PgxFuture<Scalar<PgxVect<T>>> createVectorScalarAsync​(PropertyType type,
                                                                         int dimension)
        Create a session-bound vector scalar.
        Parameters:
        type - the type of vector scalar
        dimension - of vector scalar to be created
        Returns:
        the newly created vector scalar
      • createVertexPropertyAsync

        public <ID,​V> PgxFuture<VertexProperty<ID,​V>> createVertexPropertyAsync​(PropertyType type)
        Creates a session-bound vertex property
        Parameters:
        type - type of the property to create
        Returns:
        newly created property
      • createVertexPropertyAsync

        public <ID,​V> PgxFuture<VertexProperty<ID,​V>> createVertexPropertyAsync​(PropertyType type,
                                                                                            java.lang.String name)
        Creates a session-bound vertex property
        Parameters:
        type - type of property to create
        name - of property to be created
        Returns:
        newly created property
      • createVertexVectorPropertyAsync

        public <ID,​V> PgxFuture<VertexProperty<ID,​PgxVect<V>>> createVertexVectorPropertyAsync​(PropertyType type,
                                                                                                           int dimension)
        Creates a session-bound vertex vector property
        Parameters:
        type - type of the vector property to create
        dimension - of vector property to be created
        Returns:
        newly created vector property
      • createVertexVectorPropertyAsync

        public <ID,​V> PgxFuture<VertexProperty<ID,​PgxVect<V>>> createVertexVectorPropertyAsync​(PropertyType type,
                                                                                                           int dimension,
                                                                                                           java.lang.String name)
        Creates a session-bound vertex vector property
        Parameters:
        type - type of vector property to create
        dimension - of vector property to be created
        name - of vector property to be created
        Returns:
        newly created vector property
      • getOrCreateVertexPropertyAsync

        public <ID,​V> PgxFuture<VertexProperty<ID,​V>> getOrCreateVertexPropertyAsync​(PropertyType type,
                                                                                                 java.lang.String name)
        Gets or creates a vertex property
        Parameters:
        type - type of property to create
        name - of property to be created
        Returns:
        newly created property if vertex property with given name does not exist, the already existent vertex property otherwise
        Since:
        3.1.0
      • getOrCreateVertexVectorPropertyAsync

        public <ID,​V> PgxFuture<VertexProperty<ID,​PgxVect<V>>> getOrCreateVertexVectorPropertyAsync​(PropertyType type,
                                                                                                                int dimension,
                                                                                                                java.lang.String name)
        Gets or creates a vertex vector property
        Parameters:
        type - type of property to create
        name - of property to be created
        Returns:
        newly created property if vector vertex property with given name does not exist, the already existent vertex vector property otherwise
        Since:
        3.1.0
      • createEdgePropertyAsync

        public <V> PgxFuture<EdgeProperty<V>> createEdgePropertyAsync​(PropertyType type)
        Creates a session-bound edge property
        Parameters:
        type - type of property to create
        Returns:
        newly created property
      • createEdgePropertyAsync

        public <V> PgxFuture<EdgeProperty<V>> createEdgePropertyAsync​(PropertyType type,
                                                                      java.lang.String name)
        Creates a session-bound edge property
        Parameters:
        type - type of property to create
        name - of property to be created
        Returns:
        newly created property
      • createEdgeVectorPropertyAsync

        public <V> PgxFuture<EdgeProperty<PgxVect<V>>> createEdgeVectorPropertyAsync​(PropertyType type,
                                                                                     int dimension)
        Creates a session-bound edge vector property
        Parameters:
        type - type of vector property to create
        dimension - of vector property to be created
        Returns:
        newly created vector property
      • createEdgeVectorPropertyAsync

        public <V> PgxFuture<EdgeProperty<PgxVect<V>>> createEdgeVectorPropertyAsync​(PropertyType type,
                                                                                     int dimension,
                                                                                     java.lang.String name)
        Creates a session-bound edge vector property
        Parameters:
        type - type of vector property to create
        dimension - of vector property to be created
        name - of vector property to be created
        Returns:
        newly created vector property
      • getOrCreateEdgeVectorPropertyAsync

        public <V> PgxFuture<EdgeProperty<PgxVect<V>>> getOrCreateEdgeVectorPropertyAsync​(PropertyType type,
                                                                                          int dimension,
                                                                                          java.lang.String name)
        Gets or creates an edge vector property
        Parameters:
        type - type of property to create
        name - of property to be created
        Returns:
        newly created property if vector edge property with given name does not exist, the already existent edge vector property otherwise
        Since:
        3.1.0
      • getOrCreateEdgePropertyAsync

        public <V> PgxFuture<EdgeProperty<V>> getOrCreateEdgePropertyAsync​(PropertyType type,
                                                                           java.lang.String name)
        Gets or creates an edge property
        Parameters:
        type - type of property to create
        name - of property to be created
        Returns:
        newly created property if edge property with given name does not exist, the already existent edge property otherwise
        Since:
        3.1.0
      • getOrCreateEdgeVertexPropertyAsync

        public <V> PgxFuture<EdgeProperty<PgxVect<V>>> getOrCreateEdgeVertexPropertyAsync​(PropertyType type,
                                                                                          int dimension,
                                                                                          java.lang.String name)
        Gets or creates an edge vector property
        Parameters:
        type - type of property to create
        name - of property to be created
        Returns:
        newly created property if edge vector property with given name does not exist, the already existent edge vector property otherwise
        Since:
        3.1.0
      • createVertexSequenceAsync

        public <E> PgxFuture<VertexSequence<E>> createVertexSequenceAsync()
        Creates a new vertex sequence.
        Returns:
        newly created VertexSequence
      • createVertexSequenceAsync

        public <E> PgxFuture<VertexSequence<E>> createVertexSequenceAsync​(java.lang.String name)
        Creates a new vertex sequence.
        Parameters:
        name - the name of the collection to be created
        Returns:
        newly created VertexSequence
      • getVerticesAsync

        public <E> PgxFuture<VertexSet<E>> getVerticesAsync​(VertexFilter filter)
        Creates a new vertex set containing vertices according to the given filter expression.
        Parameters:
        filter - the vertex filter expression used to create the vertex set
        Returns:
        newly created vertex set
      • getVerticesAsync

        public <E> PgxFuture<VertexSet<E>> getVerticesAsync​(VertexFilter filter,
                                                            java.lang.String name)
        Creates a new vertex set containing vertices according to the given filter expression.
        Parameters:
        filter - the vertex filter expression used to create the vertex set
        name - the name of the collection to be created. If NULL, a name will be generated.
        Returns:
        newly created vertex set
      • getVerticesAsync

        public <E> PgxFuture<VertexSet<E>> getVerticesAsync()
        Creates a new vertex set containing all vertices.
        Returns:
        newly created vertex set
      • createVertexSetAsync

        public <E> PgxFuture<VertexSet<E>> createVertexSetAsync()
        Creates a new vertex set.
        Returns:
        the newly created vertex set
      • createVertexSetAsync

        public <E> PgxFuture<VertexSet<E>> createVertexSetAsync​(java.lang.String name)
        Creates a new vertex set.
        Parameters:
        name - name of the vertex set to be created
        Returns:
        the newly created vertex set
      • createEdgeSequenceAsync

        public PgxFuture<EdgeSequence> createEdgeSequenceAsync()
        Creates a new edge sequence.
        Returns:
        the newly created edge sequence
      • createEdgeSequenceAsync

        public PgxFuture<EdgeSequence> createEdgeSequenceAsync​(java.lang.String name)
        Creates a new edge sequence.
        Parameters:
        name - name of the edge sequence to be created
        Returns:
        the newly created edge sequence
      • createEdgeSetAsync

        public PgxFuture<EdgeSet> createEdgeSetAsync()
        Creates a new edge set.
        Returns:
        the newly created edge set
      • createEdgeSetAsync

        public PgxFuture<EdgeSet> createEdgeSetAsync​(java.lang.String name)
        Creates a new edge set.
        Parameters:
        name - name of the edge set to be created
        Returns:
        the newly created edge set
      • getEdgesAsync

        public <E> PgxFuture<EdgeSet> getEdgesAsync​(EdgeFilter filter)
        Creates a new edge set containing edges according to the given filter expression.
        Parameters:
        filter - the edge filter expression used to create the edge set
        Returns:
        newly created edge set
      • getEdgesAsync

        public PgxFuture<EdgeSet> getEdgesAsync​(EdgeFilter filter,
                                                java.lang.String name)
        Creates a new edge set containing edges according to the given filter expression.
        Parameters:
        filter - the edge filter expression used to create the edge set
        name - the name of the collection to be created. If NULL, a name will be generated.
        Returns:
        newly created edge set
      • getEdgesAsync

        public PgxFuture<EdgeSet> getEdgesAsync()
        Creates a new edge set containing all edges.
        Returns:
        newly created edges set
      • createMapAsync

        public <K,​V> PgxFuture<PgxMap<K,​V>> createMapAsync​(PropertyType keyType,
                                                                       PropertyType valType)
        Creates a session-bound map
        Parameters:
        keyType - Property type of the keys that are going to be stored inside the map
        valType - Property type of the values that are going to be stored inside the map
        Returns:
        newly created map
      • createMapAsync

        public <K,​V> PgxFuture<PgxMap<K,​V>> createMapAsync​(PropertyType keyType,
                                                                       PropertyType valType,
                                                                       java.lang.String mapName)
        Creates a session-bound map
        Parameters:
        keyType - Property type of the keys that are going to be stored inside the map
        valType - Property type of the values that are going to be stored inside the map
        mapName - how the map should be named
        Returns:
        newly created map
      • sortByDegreeAsync

        public PgxFuture<PgxGraph> sortByDegreeAsync()
        Create a sorted version of a graph and all its properties. The returned graph is sorted such that the node numbering is ordered by the degree of the nodes. Note that the returned graph and properties are transient.

        Convenience method around sortByDegree(String)

        Passing newGraphName as null

        Returns:
        newly created graph
      • sortByDegreeAsync

        public PgxFuture<PgxGraph> sortByDegreeAsync​(java.lang.String newGraphName)
        Create a sorted version of a graph and all its properties. The returned graph is sorted such that the node numbering is ordered by the degree of the nodes. Note that the returned graph and properties are transient.

        Convenience method around sortByDegree(SortOrder, Degree, Mode, String)

        Passing

        • SortOrder as SortOrder.DESCENDING
        • Degree as Degree.IN
        • Mode as Mode.CREATE_COPY

        Parameters:
        newGraphName - name of the new graph (only relevant if a new copy is being created). If null, a name will be generated.
        Returns:
        newly created graph
      • transposeAsync

        public PgxFuture<PgxGraph> transposeAsync​(java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                  java.util.Collection<EdgeProperty<?>> edgeProps,
                                                  java.util.Map<java.lang.String,​java.lang.String> edgeLabelMapping,
                                                  PgxGraph.Mode mode,
                                                  java.lang.String newGraphName)
        Creates a transpose of this graph. A transpose of a directed graph is another directed graph on the same set of vertices with all of the edges reversed. If this graph contains an edge (u,v) then the return graph will contain an edge (v,u) and vice versa. If this graph is undirected (isDirected() returns false), this operation has no effect and will either return a copy or act as identity function depending on the mode parameter.
        Parameters:
        vertexProps - vertex properties that should be kept in the mutated graph. Constants VertexProperty.ALL or VertexProperty.NONE can be used.
        edgeProps - edge properties that should be kept in the mutated graph. Constants EdgeProperty.ALL or EdgeProperty.NONE can be used.
        edgeLabelMapping - can be used to rename edge labels. For example, an edge (John,Mary) labeled "fatherOf" can be transformed to be labeled "hasFather" on the transpose graph's edge (Mary,John) by passing in a map like Collections.singletonMap("fatherOf", "hasFather"). If the given map is an empty map, the transpose graph will have the same edge labels as this graph. If the given map is NULL, the transpose graph won't contain any edge labels (all labels will be removed). If any key in the given map does not exist as an edge label, it will be ignored.
        mode - specifies if the graph should be mutated in place or a new one should be created. Constants PgxGraph.Mode.MUTATE_IN_PLACE or PgxGraph.Mode.CREATE_COPY should be used
        newGraphName - name of the new graph (only relevant if a new copy is being created). If null, a name will be generated.
        Returns:
        a future holding the transpose of this graph upon successful completion.
      • undirect

        public PgxGraph undirect​(oracle.pgx.common.mutations.MutationStrategy mutationStrategy)
                          throws java.util.concurrent.ExecutionException,
                                 java.lang.InterruptedException
        Parameters:
        mutationStrategy -
        Returns:
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • undirectAsync

        public PgxFuture<PgxGraph> undirectAsync​(java.lang.String newGraphName)
        Convenience method around undirectAsync(MultiEdges, SelfEdges, Mode, String)

        Passing

        • StrategyType as StrategyType.KEEP_MULTI_EDGES
        • SelfEdges as SelfEdges.KEEP_SELF_EDGES
        • Trivial Vertices as TrivialVertices.KEEP_TRIVIALVERTICES
        • Mode as Mode.CREATE_COPY

        Parameters:
        newGraphName - name of the new graph (only relevant if mode == PgxGraph.Mode.CREATE_COPY ). If null, a name will be generated.
        Returns:
        resulting graph
      • undirectAsync

        public PgxFuture<PgxGraph> undirectAsync​(oracle.pgx.common.mutations.MutationStrategy mutationStrategy)
        Create an undirected version of a graph. Note that the returned graph and properties are transient and therefore session bound. They can be explicitly destroyed and get automatically freed once the session dies.

        EdgeProperties are handled according to the provided MutationStrategy.

        Parameters:
        mutationStrategy -
        Returns:
        resulting graph
      • simplifyAsync

        public PgxFuture<PgxGraph> simplifyAsync​(java.lang.String newGraphName)
        Convenience method for simplifyAsync(MultiEdges, SelfEdges, TrivialVertices, Mode, String)
        Passing
        • StrategyType as StrategyType.REMOVE_MULTI_EDGES
        • SelfEdges as SelfEdges.REMOVE_SELF_EDGES
        • Trivial Vertices as TrivialVertices.REMOVE_TRIVIAL_VERTICES
        • Mode as Mode.CREATE_COPY

        Create a simplified version of a graph. Note that the returned graph and properties are transient and therefore session bound. They can be explicitly destroyed and get automatically freed once the session dies.

        Parameters:
        newGraphName - name of the new graph, if empty string, a name will be generated.
        Returns:
        resulting graph
      • simplifyAsync

        public PgxFuture<PgxGraph> simplifyAsync​(oracle.pgx.common.mutations.MutationStrategy mutationStrategy)
      • bipartiteSubGraphFromLeftSetAsync

        public PgxFuture<BipartiteGraph> bipartiteSubGraphFromLeftSetAsync​(java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                                           java.util.Collection<EdgeProperty<?>> edgeProps,
                                                                           VertexSet<?> vertexSet,
                                                                           java.lang.String newGraphName)
        Create a bipartite version of this graph with the given vertex set being the left set.
        Parameters:
        vertexProps - vertex properties belonging to graph specified by graph to be transformed as well. Constants VertexProperty.ALL or VertexProperty.NONE can be used.
        edgeProps - edge properties belonging to graph specified by graph to be transformed as well. Constants EdgeProperty.ALL or EdgeProperty.NONE can be used.
        vertexSet - vertex set representing the left side
        newGraphName - name of the new graph. If null, a name will be generated.
        Returns:
        resulting graph
      • bipartiteSubGraphFromLeftSetAsync

        public PgxFuture<BipartiteGraph> bipartiteSubGraphFromLeftSetAsync​(java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                                           java.util.Collection<EdgeProperty<?>> edgeProps,
                                                                           VertexSet<?> vertexSet,
                                                                           java.lang.String newGraphName,
                                                                           java.lang.String isLeftPropName)
        Create a bipartite version of this graph with the given vertex set being the left set.
        Parameters:
        vertexProps - vertex properties that should be kept in the mutated graph. Constants VertexProperty.ALL or VertexProperty.NONE can be used.
        edgeProps - edge properties that should be kept in the mutated graph. Constants EdgeProperty.ALL or EdgeProperty.NONE can be used.
        vertexSet - vertex set representing the left side
        newGraphName - name of the new graph. If null, a name will be generated.
        isLeftPropName - name of the boolean isLeft vertex property of the new graph. f null, a name will be generated.
        Returns:
        resulting graph
      • bipartiteSubGraphFromInDegreeAsync

        public PgxFuture<BipartiteGraph> bipartiteSubGraphFromInDegreeAsync()
        Create a bipartite version of this graph with all vertices of in-degree = 0 being the left set.
        Returns:
        resulting graph
      • bipartiteSubGraphFromInDegreeAsync

        public PgxFuture<BipartiteGraph> bipartiteSubGraphFromInDegreeAsync​(java.lang.String newGraphName)
        Create a bipartite version of this graph with all vertices of in-degree = 0 being the left set.
        Parameters:
        newGraphName - name of the new graph. If null, a name will be generated.
        Returns:
        resulting graph
      • bipartiteSubGraphFromInDegreeAsync

        public PgxFuture<BipartiteGraph> bipartiteSubGraphFromInDegreeAsync​(java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                                            java.util.Collection<EdgeProperty<?>> edgeProps,
                                                                            java.lang.String newGraphName)
        Create a bipartite version of this graph with all vertices of in-degree = 0 being the left set.
        Parameters:
        vertexProps - vertex properties belonging to graph specified by graph to be transformed as well. Constants VertexProperty.ALL or VertexProperty.NONE can be used.
        edgeProps - edge properties belonging to graph specified by graph to be transformed as well. Constants EdgeProperty.ALL or EdgeProperty.NONE can be used.
        newGraphName - name of the new graph. If null, a name will be generated.
        Returns:
        resulting graph
      • bipartiteSubGraphFromInDegreeAsync

        public PgxFuture<BipartiteGraph> bipartiteSubGraphFromInDegreeAsync​(java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                                            java.util.Collection<EdgeProperty<?>> edgeProps,
                                                                            java.lang.String newGraphName,
                                                                            java.lang.String isLeftPropName,
                                                                            boolean inPlace)
        Create a bipartite version of this graph with all vertices of in-degree = 0 being the left set.
        Parameters:
        vertexProps - vertex properties belonging to graph specified by graph to be transformed as well. Constants VertexProperty.ALL or VertexProperty.NONE can be used.
        edgeProps - edge properties belonging to graph specified by graph to be transformed as well. Constants EdgeProperty.ALL or EdgeProperty.NONE can be used.
        newGraphName - name of the new graph. If null, a name will be generated.
        isLeftPropName - name of the boolean isLeft vertex property of the new graph. f null, a name will be generated.
        inPlace - whether to create a new copy (false) or overwrite this graph (true)
        Returns:
        resulting graph
      • isBipartiteGraphAsync

        public <ID> PgxFuture<java.lang.Boolean> isBipartiteGraphAsync​(VertexProperty<ID,​java.lang.Boolean> isLeft)
        Checks whether a given graph is a bipartite graph. A graph is considered a bipartite graph if all nodes can be divided in a 'left' and a 'right' side where edges only go from nodes on the 'left' side to nodes on the 'right' side.
        Parameters:
        isLeft - boolean vertex property that - if the method returns true - will contain for each node whether it is on the 'left' side of the bipartite graph. If the method returns false, the content is undefined.
        Returns:
        true if the graph is a bipartite graph, false otherwise
      • sparsifyAsync

        public PgxFuture<PgxGraph> sparsifyAsync​(double e)
        Sparsifies the given graph and returns a new graph with less edges.

        Convenience method around sparsify(double, String)
        Passing

        • newGraphName as null

        Parameters:
        e - the sparsification coefficient
        Returns:
        resulting graph
      • sparsifyAsync

        public PgxFuture<PgxGraph> sparsifyAsync​(double e,
                                                 java.lang.String newGraphName)
        Sparsifies the given graph and returns a new graph with less edges.

        Convenience method around sparsify(Collection, Collection, double, String)
        Passing

        • vertexProps as VertexProperty.ALL
        • edgeProps as EdgeProperty.ALL

        Parameters:
        e - the sparsification coefficient. Must be between 0.0 and 1.0.
        newGraphName - name of the new graph. If null, a name will be generated.
        Returns:
        resulting graph
      • sparsifyAsync

        public PgxFuture<PgxGraph> sparsifyAsync​(java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                 java.util.Collection<EdgeProperty<?>> edgeProps,
                                                 double e,
                                                 java.lang.String newGraphName)
        Sparsifies the given graph and returns a new graph with less edges. The underlying algorithm is based on the paper by V. Satuluri, S. Parthasarathy, Y. Ruan: 'Local Graph Sparsification for Scalable Clustering'.
        Parameters:
        vertexProps - vertex properties that should be kept in the mutated graph. Constants VertexProperty.ALL or VertexProperty.NONE can be used.
        edgeProps - edge properties that should be kept in the mutated graph. Constants EdgeProperty.ALL or EdgeProperty.NONE can be used.
        e - the sparsification coefficient
        newGraphName - name of the new graph. If null, a name will be generated.
        Returns:
        resulting graph
      • filterAsync

        public PgxFuture<PgxGraph> filterAsync​(GraphFilter graphFilter)
        Create a subgraph of this graph. To create the subgraph, a given filter expression is used to determine which parts of the graph will be part of the subgraph.

        Convenience method around filterAsync(GraphFilter, String)
        Passing

        • newGraphName as null

        Parameters:
        graphFilter - GraphFilter object representing a filter expression that is applied to create the subgraph
        Returns:
        resulting graph
      • filterAsync

        public PgxFuture<PgxGraph> filterAsync​(GraphFilter graphFilter,
                                               java.lang.String newGraphName)
        Create a subgraph of this graph. To create the subgraph, a given filter expression is used to determine which parts of the graph will be part of the subgraph.

        Convenience method around filterAsync(Collection, Collection, GraphFilter, String)
        Passing

        • vertexProps as VertexProperty.ALL
        • edgeProps as EdgeProperty.ALL

        Parameters:
        graphFilter - GraphFilter object representing a filter expression that is applied to create the subgraph
        newGraphName - name of the new graph. If null, a name will be generated.
        Returns:
        resulting graph
      • filterAsync

        public PgxFuture<PgxGraph> filterAsync​(java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                               java.util.Collection<EdgeProperty<?>> edgeProps,
                                               GraphFilter graphFilter,
                                               java.lang.String newGraphName)
        Create a subgraph of this graph. To create the subgraph, a given filter expression is used to determine which parts of the graph will be part of the subgraph.
        Parameters:
        vertexProps - vertex properties that should be kept in the mutated graph. Constants VertexProperty.ALL or VertexProperty.NONE can be used.
        edgeProps - edge properties that should be kept in the mutated graph. Constants EdgeProperty.ALL or EdgeProperty.NONE can be used.
        graphFilter - GraphFilter object representing a filter expression that is applied to create the subgraph
        newGraphName - name of the new graph. If null, a name will be generated.
        Returns:
        resulting graph
      • cloneAsync

        public PgxFuture<PgxGraph> cloneAsync​(java.lang.String newGraphName)
        Convenience method of cloneAsync(Collection, Collection, String)
        Passing
        • Collection(vertexProperties) as VertexProperty.ALL
        • Collection(edgeProperties) as EdgeProperty.ALL
        Parameters:
        newGraphName - name of the new graph. If null, a name will be generated.
        Returns:
        resulting graph
      • cloneAsync

        public PgxFuture<PgxGraph> cloneAsync​(java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                              java.util.Collection<EdgeProperty<?>> edgeProps,
                                              java.lang.String newGraphName)
        Creates a deep copy of this graph. The resulting graph will be a session-private, full copy of this graph.
        Parameters:
        vertexProps - vertex properties belonging to graph specified by graph to be transformed as well. Constants VertexProperty.ALL or VertexProperty.NONE can be used.
        edgeProps - edge properties belonging to graph specified by graph to be transformed as well. Constants EdgeProperty.ALL or EdgeProperty.NONE can be used.
        newGraphName - name of the new graph. If null, a name will be generated.
        Returns:
        resulting graph
      • createPathAsync

        public <ID> PgxFuture<PgxPath<ID>> createPathAsync​(PgxVertex<ID> src,
                                                           PgxVertex<ID> dst,
                                                           EdgeProperty<java.lang.Double> cost,
                                                           VertexProperty<ID,​PgxVertex<ID>> parent,
                                                           VertexProperty<ID,​PgxEdge> parentEdge)
        Creates a PgxPath object representing the shortest path from one source to one destination (shortest regarding the given edge costs). If there are multiple shortest paths, an arbitrary one will be returned.
        Parameters:
        src - source vertex of the path
        dst - destination vertex of the path
        cost - property holding the edge costs. If null, the resulting cost will equal the hop distance.
        parent - property holding the parent vertices for each vertex of the shortest path. For example, if the shortest path is A -> B -> C, then parent[C] -> B and parent[B] -> A.
        parentEdge - property holding the parent edges for each vertex of the shortest path
        Returns:
        the PgxPath object.
      • createPathAsync

        public <ID> PgxFuture<PgxPath<ID>> createPathAsync​(VertexSequence<ID> nodeSequence,
                                                           EdgeSequence edgeSequence)
        Creates a PgxPath object from a sequence of vertices and edges.
        Parameters:
        nodeSequence - the vertices to be used for the path creation
        edgeSequence - the edges to be used for the path creation
        Returns:
        the PgxPath object.
      • createAllPathsAsync

        public <ID> PgxFuture<AllPaths<ID>> createAllPathsAsync​(PgxVertex<ID> src,
                                                                EdgeProperty<java.lang.Double> cost,
                                                                VertexProperty<ID,​java.lang.Double> dist,
                                                                VertexProperty<ID,​PgxVertex<ID>> parent,
                                                                VertexProperty<ID,​PgxEdge> parentEdge)
        Creates a AllPaths object representing all the shortest paths from a single source to all the possible destinations (shortest regarding the given edge costs).
        Parameters:
        src - source vertex
        cost - property holding the edge costs. If null, the resulting cost will equal the hop distance.
        dist - property holding the distance to the source vertex for each vertex in the graph.
        parent - property holding the parent vertices of all the shortest paths. For example, if the source vertex is A and the shortest path to C is A -> B -> C, then then parent[C] -> B and parent[B] -> A.
        parentEdge - property holding the parent edges for each vertex shortest path
        Returns:
        the AllPaths object.
      • createComponentsAsync

        public <ID> PgxFuture<Partition<ID>> createComponentsAsync​(VertexProperty<ID,​java.lang.Long> components,
                                                                   long numComponents)
        Creates a Partition object holding a collection of vertex sets, each representing a component.
        Parameters:
        components - property mapping each vertex to its component ID. Note that only component IDs in the range of [0..numComponents-1] are allowed. The returned future will complete exceptionally with an IllegalArgumentException if an invalid component ID is encountered. Gaps are supported: certain IDs not being associated with any vertices will yield to empty components.
        numComponents - how many different components the components property contains
        Returns:
        the Partition object.
      • queryPgqlAsync

        public PgxFuture<PgqlResultSet> queryPgqlAsync​(java.lang.String pgqlString)
        Submits a pattern matching select only query.
        Parameters:
        pgqlString - query string in PGQL
        Returns:
        the query result set
      • executePgqlAsync

        public PgxFuture<PgqlResultSet> executePgqlAsync​(java.lang.String pgqlString)
        Submits a PGQL (both select and modify) query.
        Parameters:
        pgqlString - query string in PGQL
        Returns:
        the query result set
        Since:
        19.1
      • cloneAndExecutePgqlAsync

        public PgxFuture<PgxGraph> cloneAndExecutePgqlAsync​(java.lang.String pgqlString)
        Convenience method of cloneAndExecutePgqlAsync(String, String)
        Passing
        • String(name) as null
        Parameters:
        pgqlString - query string in PGQL
        Returns:
        resulting graph
        Since:
        19.1
      • cloneAndExecutePgqlAsync

        public PgxFuture<PgxGraph> cloneAndExecutePgqlAsync​(java.lang.String pgqlString,
                                                            java.lang.String newGraphName)
        Submits a pattern matching query (from a PgxGraph) on a clone of the graph. Returns the new graph clone. Supports both select and modify queries.
        Parameters:
        pgqlString - query string in PGQL
        newGraphName - name of the new graph. If null, a name will be generated.
        Returns:
        resulting graph
        Since:
        19.1
      • preparePgqlAsync

        public PgxFuture<PgxPreparedStatement> preparePgqlAsync​(java.lang.String pgqlString)
        Prepares a PGQL query.
        Parameters:
        pgqlString - query string in PGQL
        Returns:
        a prepared statement object
      • explainPgqlAsync

        public PgxFuture<Operation> explainPgqlAsync​(java.lang.String pgqlString)
        Explain the execution plan of a pattern matching query. Note: Different PGX versions may return different execution plans.
        Parameters:
        pgqlString - query string in PGQL
        Returns:
        the query plan
      • combineVertexPropertiesIntoVectorPropertyAsync

        public <ID,​V> PgxFuture<VertexProperty<ID,​PgxVect<V>>> combineVertexPropertiesIntoVectorPropertyAsync​(java.util.List<VertexProperty<ID,​V>> vertexPropertyList)
        Takes a list of scalar vertex properties of same type and creates a new vertex vector property by combining them. The dimension of the vector property will be equals to the number of properties.
        Type Parameters:
        ID - property type
        V - vector property type
        Parameters:
        vertexPropertyList - list of scalar vertex properties
        Returns:
        a future holding a vertex vector or an exceptionally completed future if the list the list of given properties are not all the same type. Property will be created with default name just like createVertexProperty(PropertyType)
      • combineVertexPropertiesIntoVectorPropertyAsync

        public <ID,​V> PgxFuture<VertexProperty<ID,​PgxVect<V>>> combineVertexPropertiesIntoVectorPropertyAsync​(java.util.List<VertexProperty<ID,​V>> vertexPropertyList,
                                                                                                                          java.lang.String name)
        Takes a list of scalar vertex properties of same type and creates a new vertex vector property by combining them. The dimension of the vector property will be equals to the number of properties.
        Type Parameters:
        ID - property type
        V - vector property type
        Parameters:
        vertexPropertyList - list of scalar vertex properties
        name - name for the vector property. If not null, vector property will be named <name>. If that results in a name conflict, the returned future will complete exceptionally.
        Returns:
        a future holding a vertex vector or an exceptionally completed future if the list the list of given properties are not all the same type. Property will be created with default name just like createVertexProperty(PropertyType)
      • combineEdgePropertiesIntoVectorPropertyAsync

        public <E> PgxFuture<EdgeProperty<PgxVect<E>>> combineEdgePropertiesIntoVectorPropertyAsync​(java.util.List<EdgeProperty<E>> edgePropertyList)
        Takes a list of scalar edge properties of same type and creates a new edge vector property by combining them. The dimension of the vector property will be equals to the number of properties.
        Type Parameters:
        E - edge property type
        Parameters:
        edgePropertyList - list of scalar edge properties
        Returns:
        a future holding a vertex vector or an exceptionally completed future if the list the list of given properties are not all the same type. Property will be created with default name just like createEdgeProperty(PropertyType)
      • combineEdgePropertiesIntoVectorPropertyAsync

        public <E> PgxFuture<EdgeProperty<PgxVect<E>>> combineEdgePropertiesIntoVectorPropertyAsync​(java.util.List<EdgeProperty<E>> edgePropertyList,
                                                                                                    java.lang.String name)
        Takes a list of scalar edge properties of same type and creates a new edge vector property by combining them. The dimension of the vector property will be equals to the number of properties.
        Type Parameters:
        E - edge property type
        Parameters:
        edgePropertyList - list of scalar edge properties
        name - name for the vector property. If not null, vector property will be named <name>. If that results in a name conflict, the returned future will complete exceptionally.
        Returns:
        a future holding a vertex vector or an exceptionally completed future if the list the list of given properties are not all the same type. Property will be created with default name just like createEdgeProperty(PropertyType)
      • getCollectionsAsync

        public PgxFuture<java.util.Map<java.lang.String,​PgxCollection<? extends PgxEntity<?>,​?>>> getCollectionsAsync()
        Retrieves all currently allocated collections associated with the graph.
        Returns:
        a map that contains all collections of this graph as values and their names as keys
      • renameAsync

        public PgxFuture<java.lang.Void> renameAsync​(java.lang.String newGraphName)
        Renames this graph.
        Parameters:
        newGraphName - the new name.
      • publishAsync

        public PgxFuture<java.lang.Void> publishAsync()
        Publishes the graph so it can be shared between sessions.

        This moves the graph name from the private into the public namespace.

      • publishAsync

        public PgxFuture<java.lang.Void> publishAsync​(java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                      java.util.Collection<EdgeProperty<?>> edgeProps)
        Publishes the graph so It can be shared between sessions.

        This moves the graph name from the private into the public namespace.

        Parameters:
        vertexProps - list of vertex properties belonging to graph specified by graph to be published as well. Constants Properties.ALL or Properties.NONE can be used.
        edgeProps - list of edge properties belonging to graph specified by graph to be published as well. Constants Properties.ALL or Properties.NONE can be used.
      • publishWithSnapshotsAsync

        public PgxFuture<java.lang.Void> publishWithSnapshotsAsync()
        Publishes the graph and all its snapshots so they can be shared between sessions.
      • publishWithSnapshotsAsync

        public PgxFuture<java.lang.Void> publishWithSnapshotsAsync​(java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                                                   java.util.Collection<EdgeProperty<?>> edgeProps)
        Publishes the graph and all its snapshots so they can be shared between sessions.

        This moves the graph name from the private into the public namespace.

        Parameters:
        vertexProps - list of vertex properties belonging to graph specified by graph to be published as well. Constants Properties.ALL or Properties.NONE can be used.
        edgeProps - list of edge properties belonging to graph specified by graph to be published as well. Constants Properties.ALL or Properties.NONE can be used.
      • isPublishedAsync

        public PgxFuture<java.lang.Boolean> isPublishedAsync()
        Checks if this graph is published.
        Returns:
        true if this graph is published, false otherwise.
      • isPublishedWithSnapshotsAsync

        public PgxFuture<java.lang.Boolean> isPublishedWithSnapshotsAsync()
        Checks if this graph is published with snapshots.
        Returns:
        true if this graph is published, false otherwise.
      • getPermissionAsync

        public PgxFuture<PgxResourcePermission> getPermissionAsync()
        Get the permission that the current user has on the graph. Returns null in embedded mode
        Returns:
        the permission that the current user has on the graph
        Since:
        21.3.0
      • grantPermissionAsync

        public PgxFuture<java.lang.Void> grantPermissionAsync​(PgxUser user,
                                                              PgxResourcePermission permission)
        Grants a permission on this graph to the given user. Cannot grant PgxResourcePermission.MANAGE.
        Parameters:
        user - the user the permission is granted to
        permission - the permission
        Since:
        20.1.0
      • grantPermissionAsync

        public PgxFuture<java.lang.Void> grantPermissionAsync​(PgxRole role,
                                                              PgxResourcePermission permission)
        Grants a permission on this graph to the given role. Cannot grant PgxResourcePermission.MANAGE.
        Parameters:
        role - the role the permission is granted to
        permission - the permission
        Since:
        20.1.0
      • revokePermissionAsync

        public PgxFuture<java.lang.Void> revokePermissionAsync​(PgxUser user)
        Revokes all permissions on this graph from the given user.
        Parameters:
        user - the user for which all permissions will be revoked from
        Since:
        20.1.0
      • revokePermissionAsync

        public PgxFuture<java.lang.Void> revokePermissionAsync​(PgxRole role)
        Revokes all permissions on this graph from the given role.
        Parameters:
        role - the role for which all permissions will be revoked from
        Since:
        20.1.0
      • pinAsync

        public PgxFuture<java.lang.Void> pinAsync()
        For a published graph, pins the graph so that it stays published even if no sessions uses it. (this call pins the graph lineage, which ensures that at least the latest available snapshot stays published when no session uses the graph).
        Since:
        20.2.0
      • unpinAsync

        public PgxFuture<java.lang.Void> unpinAsync()
        For a published graph, unpins the graph so that if no snapshot of the graph is used by any session or pinned, the graph and all its snapshots can be removed.
        Since:
        20.2.0
      • isPinnedAsync

        public PgxFuture<java.lang.Boolean> isPinnedAsync()
        For a published graph, indicates if the graph is pinned. A pinned graph will stay published even if no session is using it.
        Since:
        20.2.0
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • store

        public FileGraphConfig store​(Format targetFormat,
                                     java.lang.String targetPath)
                              throws java.util.concurrent.ExecutionException,
                                     java.lang.InterruptedException
        Blocking version of storeAsync(Format, String). Calls storeAsync(Format, String) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • store

        public PartitionedGraphConfig store​(ProviderFormat targetFormat,
                                            java.lang.String targetBasePath)
                                     throws java.util.concurrent.ExecutionException,
                                            java.lang.InterruptedException
        Blocking version of storeAsync(ProviderFormat, String). Calls storeAsync(ProviderFormat, String) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
        Since:
        19.4.0
      • store

        public PartitionedGraphConfig store​(ProviderFormat targetFormat,
                                            java.lang.String targetBasePath,
                                            java.util.Set<java.lang.String> vertexProvidersToStore,
                                            java.util.Set<java.lang.String> edgeProvidersToStore)
                                     throws java.util.concurrent.ExecutionException,
                                            java.lang.InterruptedException
        Blocking version of storeAsync(ProviderFormat, String, Set, Set). Calls storeAsync(ProviderFormat, String) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
        Since:
        20.1
      • store

        public FileGraphConfig store​(Format targetFormat,
                                     java.lang.String targetPath,
                                     boolean overwrite)
                              throws java.util.concurrent.ExecutionException,
                                     java.lang.InterruptedException
        Blocking version of storeAsync(Format, String, boolean). Calls storeAsync(Format, String, boolean) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • store

        public PartitionedGraphConfig store​(ProviderFormat targetFormat,
                                            java.lang.String targetBasePath,
                                            boolean overwrite)
                                     throws java.util.concurrent.ExecutionException,
                                            java.lang.InterruptedException
        Blocking version of storeAsync(ProviderFormat, String, boolean). Calls storeAsync(Format, String, boolean) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
        Since:
        19.4.0
      • store

        public PartitionedGraphConfig store​(ProviderFormat targetFormat,
                                            java.lang.String targetBasePath,
                                            java.util.Set<java.lang.String> vertexProvidersToStore,
                                            java.util.Set<java.lang.String> edgeProvidersToStore,
                                            boolean overwrite)
                                     throws java.util.concurrent.ExecutionException,
                                            java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
        Since:
        20.1
      • store

        public FileGraphConfig store​(Format targetFormat,
                                     java.lang.String targetBasePath,
                                     int numPartitions)
                              throws java.util.concurrent.ExecutionException,
                                     java.lang.InterruptedException
        Blocking version of storeAsync(Format, String, int). Calls storeAsync(Format, String, int) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • store

        public PartitionedGraphConfig store​(ProviderFormat targetFormat,
                                            java.lang.String targetBasePath,
                                            int numPartitions)
                                     throws java.util.concurrent.ExecutionException,
                                            java.lang.InterruptedException
        Blocking version of storeAsync(ProviderFormat, String, int). Calls storeAsync(ProviderFormat, String, int) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
        Since:
        19.4.0
      • store

        public PartitionedGraphConfig store​(ProviderFormat targetFormat,
                                            java.lang.String targetBasePath,
                                            int numPartitions,
                                            java.util.Set<java.lang.String> vertexProvidersToStore,
                                            java.util.Set<java.lang.String> edgeProvidersToStore)
                                     throws java.util.concurrent.ExecutionException,
                                            java.lang.InterruptedException
        Blocking version of storeAsync(ProviderFormat, String, int, Set, Set). Calls storeAsync(ProviderFormat, String, int) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
        Since:
        20.1
      • store

        public FileGraphConfig store​(Format targetFormat,
                                     java.lang.String targetBasePath,
                                     int numPartitions,
                                     boolean overwrite)
                              throws java.util.concurrent.ExecutionException,
                                     java.lang.InterruptedException
        Blocking version of storeAsync(Format, String, int, boolean). Calls storeAsync(Format, String, int, boolean) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • store

        public PartitionedGraphConfig store​(ProviderFormat targetFormat,
                                            java.lang.String targetBasePath,
                                            int numPartitions,
                                            java.util.Set<java.lang.String> vertexProvidersToStore,
                                            java.util.Set<java.lang.String> edgeProvidersToStore,
                                            boolean overwrite)
                                     throws java.util.concurrent.ExecutionException,
                                            java.lang.InterruptedException
        Blocking version of {@link #storeAsync(ProviderFormat, String, int, Set, Set, , boolean)}. Calls storeAsync(ProviderFormat, String, int, boolean) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
        Since:
        20.1
      • store

        public GraphConfig store​(GraphConfig targetConfig,
                                 boolean overwrite)
                          throws java.util.concurrent.ExecutionException,
                                 java.lang.InterruptedException
        Blocking version of storeAsync(GraphConfig, boolean). Calls storeAsync(GraphConfig, boolean) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • store

        public GraphConfig store​(GraphConfig targetConfig,
                                 java.util.Set<java.lang.String> vertexProvidersToStore,
                                 java.util.Set<java.lang.String> edgeProvidersToStore,
                                 boolean overwrite)
                          throws java.util.concurrent.ExecutionException,
                                 java.lang.InterruptedException
        Blocking version of storeAsync(GraphConfig, Set, Set, boolean). Calls storeAsync(GraphConfig, boolean) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • isFresh

        public boolean isFresh()
                        throws java.util.concurrent.ExecutionException,
                               java.lang.InterruptedException
        Blocking version of isFreshAsync(). Calls isFreshAsync() and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • sortByDegree

        public PgxGraph sortByDegree()
                              throws java.util.concurrent.ExecutionException,
                                     java.lang.InterruptedException
        Blocking version of sortByDegreeAsync(). Calls sortByDegreeAsync() and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • sortByDegree

        public PgxGraph sortByDegree​(java.lang.String newGraphName)
                              throws java.util.concurrent.ExecutionException,
                                     java.lang.InterruptedException
        Blocking version of sortByDegreeAsync(String). Calls sortByDegreeAsync(String) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • transpose

        public PgxGraph transpose​(java.util.Collection<VertexProperty<?,​?>> vertexProps,
                                  java.util.Collection<EdgeProperty<?>> edgeProps,
                                  java.util.Map<java.lang.String,​java.lang.String> edgeLabelMapping,
                                  PgxGraph.Mode mode,
                                  java.lang.String newGraphName)
                           throws java.util.concurrent.ExecutionException,
                                  java.lang.InterruptedException
        Returns:
        resulting graph
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • transpose

        public PgxGraph transpose​(PgxGraph.Mode mode,
                                  java.lang.String newGraphName)
                           throws java.util.concurrent.ExecutionException,
                                  java.lang.InterruptedException
        Blocking version of transposeAsync(Mode, String)
        Returns:
        resulting graph
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • transpose

        public PgxGraph transpose​(java.lang.String newGraphName)
                           throws java.util.concurrent.ExecutionException,
                                  java.lang.InterruptedException
        Blocking version of transposeAsync(String)
        Returns:
        resulting graph
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • transpose

        public PgxGraph transpose​(PgxGraph.Mode mode)
                           throws java.util.concurrent.ExecutionException,
                                  java.lang.InterruptedException
        Blocking version of transposeAsync(Mode)
        Returns:
        resulting graph
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • transpose

        public PgxGraph transpose()
                           throws java.util.concurrent.ExecutionException,
                                  java.lang.InterruptedException
        Blocking version of transposeAsync()
        Returns:
        resulting graph
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • undirect

        public PgxGraph undirect()
                          throws java.util.concurrent.ExecutionException,
                                 java.lang.InterruptedException
        Blocking version of undirectAsync(). Calls undirectAsync() and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • isDirected

        public boolean isDirected()
      • undirect

        public PgxGraph undirect​(java.lang.String newGraphName)
                          throws java.util.concurrent.ExecutionException,
                                 java.lang.InterruptedException
        Blocking version of undirectAsync(String). Calls undirectAsync(String) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • createMergingStrategyBuilder

        public MergingStrategyBuilder createMergingStrategyBuilder()
                                                            throws java.util.concurrent.ExecutionException,
                                                                   java.lang.InterruptedException
        Creates a new MergingStrategyBuilder that can be used to build a new MutationStrategy to simplify this graph.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • createPickingStrategyBuilder

        public PickingStrategyBuilder createPickingStrategyBuilder()
                                                            throws java.util.concurrent.ExecutionException,
                                                                   java.lang.InterruptedException
        Creates a new PickingStrategyBuilder that can be used to build a new PickingStrategy to simplify this graph.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • simplify

        public PgxGraph simplify()
                          throws java.util.concurrent.ExecutionException,
                                 java.lang.InterruptedException
        Blocking version of simplifyAsync(). Calls simplifyAsync() and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • simplify

        public PgxGraph simplify​(oracle.pgx.common.mutations.MutationStrategy mutationStrategy)
                          throws java.util.concurrent.ExecutionException,
                                 java.lang.InterruptedException
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • simplify

        public PgxGraph simplify​(java.lang.String newGraphName)
                          throws java.util.concurrent.ExecutionException,
                                 java.lang.InterruptedException
        Blocking version of simplifyAsync(String). Calls simplifyAsync(String) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • bipartiteSubGraphFromLeftSet

        public BipartiteGraph bipartiteSubGraphFromLeftSet​(VertexSet<?> vertexSet)
                                                    throws java.util.concurrent.ExecutionException,
                                                           java.lang.InterruptedException
        Blocking version of bipartiteSubGraphFromLeftSetAsync(VertexSet). Calls bipartiteSubGraphFromLeftSetAsync(VertexSet) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • bipartiteSubGraphFromInDegree

        public BipartiteGraph bipartiteSubGraphFromInDegree()
                                                     throws java.util.concurrent.ExecutionException,
                                                            java.lang.InterruptedException
        Blocking version of bipartiteSubGraphFromInDegreeAsync(). Calls bipartiteSubGraphFromInDegreeAsync() and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • bipartiteSubGraphFromInDegree

        public BipartiteGraph bipartiteSubGraphFromInDegree​(java.lang.String newGraphName)
                                                     throws java.util.concurrent.ExecutionException,
                                                            java.lang.InterruptedException
        Blocking version of bipartiteSubGraphFromInDegreeAsync(String). Calls bipartiteSubGraphFromInDegreeAsync(String) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • isBipartiteGraph

        public java.lang.Boolean isBipartiteGraph​(VertexProperty<?,​java.lang.Boolean> isLeft)
                                           throws java.util.concurrent.ExecutionException,
                                                  java.lang.InterruptedException
        Blocking version of isBipartiteGraphAsync(VertexProperty). Calls isBipartiteGraphAsync(VertexProperty) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • sparsify

        public PgxGraph sparsify​(double e)
                          throws java.util.concurrent.ExecutionException,
                                 java.lang.InterruptedException
        Blocking version of sparsifyAsync(double). Calls sparsifyAsync(double) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • sparsify

        public PgxGraph sparsify​(double e,
                                 java.lang.String newGraphName)
                          throws java.util.concurrent.ExecutionException,
                                 java.lang.InterruptedException
        Blocking version of sparsifyAsync(double, String). Calls sparsifyAsync(double, String) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • filter

        public PgxGraph filter​(GraphFilter graphFilter)
                        throws java.util.concurrent.ExecutionException,
                               java.lang.InterruptedException
        Blocking version of filterAsync(GraphFilter). Calls filterAsync(GraphFilter) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • filter

        public PgxGraph filter​(GraphFilter graphFilter,
                               java.lang.String newGraphName)
                        throws java.util.concurrent.ExecutionException,
                               java.lang.InterruptedException
        Blocking version of filterAsync(GraphFilter, String). Calls filterAsync(GraphFilter, String) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • getVertices

        public <E> VertexSet<E> getVertices​(VertexFilter filter)
                                     throws java.lang.InterruptedException,
                                            java.util.concurrent.ExecutionException
        Blocking version of getVerticesAsync(VertexFilter). Calls getVerticesAsync(VertexFilter) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • getVertices

        public <E> VertexSet<E> getVertices​(VertexFilter filter,
                                            java.lang.String name)
                                     throws java.lang.InterruptedException,
                                            java.util.concurrent.ExecutionException
        Blocking version of getVerticesAsync(VertexFilter, String). Calls getVerticesAsync(VertexFilter, String) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • getEdges

        public EdgeSet getEdges​(EdgeFilter filter)
                         throws java.lang.InterruptedException,
                                java.util.concurrent.ExecutionException
        Blocking version of getEdges(EdgeFilter). Calls getEdgesAsync(EdgeFilter) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • getEdges

        public EdgeSet getEdges​(EdgeFilter filter,
                                java.lang.String name)
                         throws java.lang.InterruptedException,
                                java.util.concurrent.ExecutionException
        Blocking version of getEdges(EdgeFilter, String). Calls getEdgesAsync(EdgeFilter, String) and waits for returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • queryPgql

        public PgqlResultSet queryPgql​(java.lang.String pgqlString)
                                throws java.util.concurrent.ExecutionException,
                                       java.lang.InterruptedException
        Blocking version of queryPgql(String). Calls queryPgqlAsync(String) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • executePgql

        public PgqlResultSet executePgql​(java.lang.String pgqlString)
                                  throws java.util.concurrent.ExecutionException,
                                         java.lang.InterruptedException
        Blocking version of executePgqlAsync(String). Calls executePgqlAsync(String) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
        Since:
        19.1
      • cloneAndExecutePgql

        public PgxGraph cloneAndExecutePgql​(java.lang.String pgqlString)
                                     throws java.util.concurrent.ExecutionException,
                                            java.lang.InterruptedException
        Blocking version of cloneAndExecutePgqlAsync(String). Calls cloneAndExecutePgqlAsync(String) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
        Since:
        19.1
      • cloneAndExecutePgql

        public PgxGraph cloneAndExecutePgql​(java.lang.String pgqlString,
                                            java.lang.String graphName)
                                     throws java.util.concurrent.ExecutionException,
                                            java.lang.InterruptedException
        Blocking version of cloneAndExecutePgqlAsync(String, String). Calls cloneAndExecutePgqlAsync(String, String) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
        Since:
        19.1
      • explainPgql

        public Operation explainPgql​(java.lang.String pgqlString)
                              throws java.util.concurrent.ExecutionException,
                                     java.lang.InterruptedException
        Blocking version of explainPgql(String). Calls explainPgqlAsync(String) and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • publish

        public void publish​(java.util.Collection<VertexProperty<?,​?>> vertexProps,
                            java.util.Collection<EdgeProperty<?>> edgeProps)
      • createSynchronizer

        public <T extends SynchronizerSynchronizer createSynchronizer​(java.lang.Class<T> type)
                                                                 throws java.sql.SQLException
        Creates a synchronizer object which can be used to keep this graph in sync with changes happening in its original data source. Only partitioned graphs with all providers loaded from Oracle Database are supported.
        Parameters:
        type - implementation class of Synchronizer
        Throws:
        java.sql.SQLException
        Since:
        20.2.0
      • createSynchronizer

        public <T extends SynchronizerSynchronizer createSynchronizer​(java.lang.Class<T> type,
                                                                        java.sql.Connection conn)
                                                                 throws java.sql.SQLException
        Creates a synchronizer object which can be used to keep this graph in sync with changes happening in its original data source. Only partitioned graphs with all providers loaded from Oracle Database are supported.
        Parameters:
        type - Implementation class of Synchronizer.
        conn - Connection object to RDBMS.
        Throws:
        java.sql.SQLException
        Since:
        20.2.0
      • createSynchronizer

        public <T extends SynchronizerSynchronizer createSynchronizer​(java.lang.Class<T> type,
                                                                        java.sql.Connection conn,
                                                                        OnInvalidChange invalidChangePolicy)
                                                                 throws java.sql.SQLException
        Creates a synchronizer object which can be used to keep this graph in sync with changes happening in its original data source. Only partitioned graphs with all providers loaded from Oracle Database are supported.
        Parameters:
        type - Implementation class of Synchronizer.
        conn - Connection object to RDBMS.
        invalidChangePolicy - Sets the OnInvalidChange parameter to the Synchronizer ChangeSet.
        Throws:
        java.sql.SQLException
        Since:
        21.2.0