Class PgxGraph
- java.lang.Object
-
- oracle.pgx.api.internal.ApiObject
-
- oracle.pgx.api.Destroyable
-
- oracle.pgx.api.PgxManagedObject
-
- oracle.pgx.api.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PgxGraph.Degree
The degree.static class
PgxGraph.Mode
The mutation mode.static class
PgxGraph.MultiEdges
The multi-edges behavior.static class
PgxGraph.SelfEdges
The self-edges behavior.static class
PgxGraph.SortOrder
The direction.static class
PgxGraph.TrivialVertices
The trivial vertices behavior.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRedactionRule(oracle.pgx.config.PgxRedactionRuleConfig ruleConfig, AuthorizationType type, java.lang.String... names)
Blocking version ofaddRedactionRule(PgxRedactionRuleConfig, AuthorizationType, String...)
CallsaddRedactionRuleAsync(PgxRedactionRuleConfig, AuthorizationType, String...)
)} and waits for the returnedPgxFuture
to complete.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.GraphAlterationBuilder
alterGraph()
Create a graph alteration builder to define the graph schema alterations to perform on the graphBipartiteGraph
bipartiteSubGraphFromInDegree()
Blocking version ofbipartiteSubGraphFromInDegreeAsync()
.BipartiteGraph
bipartiteSubGraphFromInDegree(java.lang.String newGraphName)
Blocking version ofbipartiteSubGraphFromInDegreeAsync(String)
.BipartiteGraph
bipartiteSubGraphFromInDegree(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, java.lang.String newGraphName)
Blocking version ofbipartiteSubGraphFromInDegreeAsync(Collection, Collection, String)
.BipartiteGraph
bipartiteSubGraphFromInDegree(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, java.lang.String newGraphName, java.lang.String isLeftPropName, boolean inPlace)
Blocking version ofbipartiteSubGraphFromInDegreeAsync(Collection, Collection, String, String, boolean)
.PgxFuture<BipartiteGraph>
bipartiteSubGraphFromInDegreeAsync()
Create a bipartite version of this graph with all vertices of in-degree = 0 being the left set.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.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.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.BipartiteGraph
bipartiteSubGraphFromLeftSet(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, VertexSet<?> vertexSet, java.lang.String newGraphName)
Blocking version ofbipartiteSubGraphFromLeftSetAsync(Collection, Collection, VertexSet, String)
.BipartiteGraph
bipartiteSubGraphFromLeftSet(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, VertexSet<?> vertexSet, java.lang.String newGraphName, java.lang.String isLeftPropName)
Blocking version ofbipartiteSubGraphFromLeftSetAsync(Collection, Collection, VertexSet, String, String)
.BipartiteGraph
bipartiteSubGraphFromLeftSet(VertexSet<?> vertexSet)
Blocking version ofbipartiteSubGraphFromLeftSetAsync(VertexSet)
.BipartiteGraph
bipartiteSubGraphFromLeftSet(VertexSet<?> vertexSet, java.lang.String newGraphName)
Blocking version ofbipartiteSubGraphFromLeftSetAsync(VertexSet, String)
.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.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.PgxFuture<BipartiteGraph>
bipartiteSubGraphFromLeftSetAsync(VertexSet<?> vertexSet)
Create a bipartite version of this graph with the given vertex set being the left set.PgxFuture<BipartiteGraph>
bipartiteSubGraphFromLeftSetAsync(VertexSet<?> vertexSet, java.lang.String newGraphName)
Create a bipartite version of this graph with the given vertex set being the left set.PgxGraph
clone()
Blocking version ofcloneAsync()
.PgxGraph
clone(java.lang.String newGraphName)
Blocking version ofcloneAsync(String)
.PgxGraph
clone(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, java.lang.String newGraphName)
Blocking version ofcloneAsync()
.PgxGraph
cloneAndExecutePgql(java.lang.String pgqlString)
Blocking version ofcloneAndExecutePgqlAsync(String)
.PgxGraph
cloneAndExecutePgql(java.lang.String pgqlString, java.lang.String graphName)
Blocking version ofcloneAndExecutePgqlAsync(String, String)
.PgxFuture<PgxGraph>
cloneAndExecutePgqlAsync(java.lang.String pgqlString)
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.PgxFuture<PgxGraph>
cloneAsync()
PgxFuture<PgxGraph>
cloneAsync(java.lang.String newGraphName)
Convenience method ofcloneAsync(Collection, Collection, String)
Passing Collection(vertexProperties) asVertexProperty.ALL
Collection(edgeProperties) asEdgeProperty.ALL
PgxFuture<PgxGraph>
cloneAsync(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, java.lang.String newGraphName)
Creates a deep copy of this graph.<E> EdgeProperty<PgxVect<E>>
combineEdgePropertiesIntoVectorProperty(java.util.List<EdgeProperty<E>> edgePropertyList)
Blocking version ofcombineEdgePropertiesIntoVectorPropertyAsync(List)
CallscombineEdgePropertiesIntoVectorPropertyAsync(List)
and waits for the returnedPgxFuture
to complete.<E> EdgeProperty<PgxVect<E>>
combineEdgePropertiesIntoVectorProperty(java.util.List<EdgeProperty<E>> edgePropertyList, java.lang.String name)
Blocking version ofcombineEdgePropertiesIntoVectorPropertyAsync(List, String)
CallscombineEdgePropertiesIntoVectorPropertyAsync(List, String)
and waits for the returnedPgxFuture
to complete.<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.<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.<ID,V>
VertexProperty<ID,PgxVect<V>>combineVertexPropertiesIntoVectorProperty(java.util.List<VertexProperty<ID,V>> vertexPropertyList)
Blocking version ofcombineVertexPropertiesIntoVectorPropertyAsync(List)
CallscombineVertexPropertiesIntoVectorPropertyAsync(List)
and waits for the returnedPgxFuture
to complete.<ID,V>
VertexProperty<ID,PgxVect<V>>combineVertexPropertiesIntoVectorProperty(java.util.List<VertexProperty<ID,V>> vertexPropertyList, java.lang.String name)
Blocking version ofcombineVertexPropertiesIntoVectorPropertyAsync(List, String)
CallscombineVertexPropertiesIntoVectorPropertyAsync(List, String)
and waits for the returnedPgxFuture
to complete.<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.<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.<ID> AllPaths<ID>
createAllPaths(PgxVertex<ID> src, EdgeProperty<java.lang.Double> cost, VertexProperty<ID,java.lang.Double> dist, VertexProperty<ID,PgxVertex<ID>> parent, VertexProperty<ID,PgxEdge> parentEdge)
<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 aAllPaths
object representing all the shortest paths from a single source to all the possible destinations (shortest regarding the given edge costs).<ID extends java.lang.Comparable<ID>>
GraphChangeSet<ID>createChangeSet()
Creates a change set for updating the graph usingIdGenerationStrategy.AUTO_GENERATED
for edge ID generation strategy Note: This is currently not supported for undirected graphs.<ID extends java.lang.Comparable<ID>>
GraphChangeSet<ID>createChangeSet(IdGenerationStrategy vertexIdGenerationStrategy, IdGenerationStrategy edgeIdGenerationStrategy)
Creates a change set for updating the graph.<ID> Partition<ID>
createComponents(VertexProperty<ID,java.lang.Long> components, long numComponents)
Blocking version ofcreateComponentsAsync(VertexProperty, long)
.<ID> PgxFuture<Partition<ID>>
createComponentsAsync(VertexProperty<ID,java.lang.Long> components, long numComponents)
Creates aPartition
object holding a collection of vertex sets, each representing a component.<V> EdgeProperty<V>
createEdgeProperty(PropertyType type)
Blocking version ofcreateEdgePropertyAsync(PropertyType)
.<V> EdgeProperty<V>
createEdgeProperty(PropertyType type, int dimension, java.lang.String name, boolean hardName)
Blocking version ofcreateEdgePropertyAsync(PropertyType, int, String, boolean)
.<V> EdgeProperty<V>
createEdgeProperty(PropertyType type, java.lang.String name)
Blocking version ofcreateEdgePropertyAsync(PropertyType, String)
.<V> PgxFuture<EdgeProperty<V>>
createEdgePropertyAsync(PropertyType type)
Creates a session-bound edge property<V> PgxFuture<EdgeProperty<V>>
createEdgePropertyAsync(PropertyType type, java.lang.String name)
Creates a session-bound edge propertyEdgeSequence
createEdgeSequence()
Blocking version ofcreateEdgeSequenceAsync()
.EdgeSequence
createEdgeSequence(java.lang.String name)
Blocking version ofcreateEdgeSequenceAsync(String)
.PgxFuture<EdgeSequence>
createEdgeSequenceAsync()
Creates a new edge sequence.PgxFuture<EdgeSequence>
createEdgeSequenceAsync(java.lang.String name)
Creates a new edge sequence.EdgeSet
createEdgeSet()
Blocking version ofcreateEdgeSetAsync()
.EdgeSet
createEdgeSet(java.lang.String name)
Blocking version ofcreateEdgeSetAsync(String)
.PgxFuture<EdgeSet>
createEdgeSetAsync()
Creates a new edge set.PgxFuture<EdgeSet>
createEdgeSetAsync(java.lang.String name)
Creates a new edge set.<V> EdgeProperty<PgxVect<V>>
createEdgeVectorProperty(PropertyType type, int dimension)
Blocking version ofcreateEdgeVectorPropertyAsync(PropertyType, int)
.<V> EdgeProperty<PgxVect<V>>
createEdgeVectorProperty(PropertyType type, int dimension, java.lang.String name)
Blocking version ofcreateEdgeVectorPropertyAsync(PropertyType, int, String)
.<V> PgxFuture<EdgeProperty<PgxVect<V>>>
createEdgeVectorPropertyAsync(PropertyType type, int dimension)
Creates a session-bound edge vector property<V> PgxFuture<EdgeProperty<PgxVect<V>>>
createEdgeVectorPropertyAsync(PropertyType type, int dimension, java.lang.String name)
Creates a session-bound edge vector property<K,V>
PgxMap<K,V>createMap(PropertyType keyType, PropertyType valType)
Blocking version ofcreateMapAsync(PropertyType, PropertyType)
.<K,V>
PgxMap<K,V>createMap(PropertyType keyType, PropertyType valType, java.lang.String mapName)
Blocking version ofcreateMapAsync(PropertyType, PropertyType, String)
.<K,V>
PgxFuture<PgxMap<K,V>>createMapAsync(PropertyType keyType, PropertyType valType)
Creates a session-bound map<K,V>
PgxFuture<PgxMap<K,V>>createMapAsync(PropertyType keyType, PropertyType valType, java.lang.String mapName)
Creates a session-bound mapMergingStrategyBuilder
createMergingStrategyBuilder()
Creates a newMergingStrategyBuilder
that can be used to build a newMutationStrategy
to simplify this graph.<ID> PgxPath<ID>
createPath(PgxVertex<ID> src, PgxVertex<ID> dst, EdgeProperty<java.lang.Double> cost, VertexProperty<ID,PgxVertex<ID>> parent, VertexProperty<ID,PgxEdge> parentEdge)
Blocking version ofcreatePathAsync(PgxVertex, PgxVertex, EdgeProperty, VertexProperty, VertexProperty)
.<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 aPgxPath
object representing the shortest path from one source to one destination (shortest regarding the given edge costs).<ID> PgxFuture<PgxPath<ID>>
createPathAsync(VertexSequence<ID> nodeSequence, EdgeSequence edgeSequence)
Creates aPgxPath
object from a sequence of vertices and edges.PickingStrategyBuilder
createPickingStrategyBuilder()
Creates a newPickingStrategyBuilder
that can be used to build a newPickingStrategy
to simplify this graph.<T> Scalar<T>
createScalar(PropertyType type)
Blocking version ofcreateScalarAsync(PropertyType)
.<T> Scalar<T>
createScalar(PropertyType type, java.lang.String newScalarName)
Blocking version ofcreateScalarAsync(PropertyType, String)
.<T> PgxFuture<Scalar<T>>
createScalarAsync(PropertyType type)
Creates a new Scalar.<T> PgxFuture<Scalar<T>>
createScalarAsync(PropertyType type, java.lang.String newScalarName)
Create a session-bound scalar.<T extends Synchronizer>
SynchronizercreateSynchronizer(java.lang.Class<T> type)
Creates a synchronizer object which can be used to keep this graph in sync with changes happening in its original data source.<T extends Synchronizer>
SynchronizercreateSynchronizer(java.lang.Class<T> type, java.sql.Connection conn)
Creates a synchronizer object which can be used to keep this graph in sync with changes happening in its original data source.<T extends Synchronizer>
SynchronizercreateSynchronizer(java.lang.Class<T> type, java.sql.Connection conn, OnInvalidChange invalidChangePolicy)
Creates a synchronizer object which can be used to keep this graph in sync with changes happening in its original data source.<T> Scalar<PgxVect<T>>
createVectorScalar(PropertyType type, int dimension)
Blocking version ofcreateVectorScalarAsync(PropertyType, int)
.<T> Scalar<PgxVect<T>>
createVectorScalar(PropertyType type, int dimension, java.lang.String newScalarName)
Blocking version ofcreateVectorScalarAsync(PropertyType, int, String)
.<T> PgxFuture<Scalar<PgxVect<T>>>
createVectorScalarAsync(PropertyType type, int dimension)
Create a session-bound vector scalar.<T> PgxFuture<Scalar<PgxVect<T>>>
createVectorScalarAsync(PropertyType type, int dimension, java.lang.String newScalarName)
Create a session-bound vector scalar.<ID,V>
VertexProperty<ID,V>createVertexProperty(PropertyType type)
Blocking version ofcreateVertexPropertyAsync(PropertyType)
.<ID,V>
VertexProperty<ID,V>createVertexProperty(PropertyType type, int dimension, java.lang.String name, boolean hardName)
Blocking version ofcreateVertexPropertyAsync(PropertyType, int, String, boolean)
.<ID,V>
VertexProperty<ID,V>createVertexProperty(PropertyType type, java.lang.String name)
Blocking version ofcreateVertexPropertyAsync(PropertyType, String)
.<ID,V>
PgxFuture<VertexProperty<ID,V>>createVertexPropertyAsync(PropertyType type)
Creates a session-bound vertex property<ID,V>
PgxFuture<VertexProperty<ID,V>>createVertexPropertyAsync(PropertyType type, java.lang.String name)
Creates a session-bound vertex property<E> VertexSequence<E>
createVertexSequence()
Blocking version ofcreateVertexSequenceAsync()
.<E> VertexSequence<E>
createVertexSequence(java.lang.String name)
Blocking version ofcreateVertexSequenceAsync(String)
.<E> PgxFuture<VertexSequence<E>>
createVertexSequenceAsync()
Creates a new vertex sequence.<E> PgxFuture<VertexSequence<E>>
createVertexSequenceAsync(java.lang.String name)
Creates a new vertex sequence.<E> VertexSet<E>
createVertexSet()
Blocking version ofcreateVertexSetAsync()
.<E> VertexSet<E>
createVertexSet(java.lang.String name)
Blocking version ofcreateVertexSetAsync(String)
.<E> PgxFuture<VertexSet<E>>
createVertexSetAsync()
Creates a new vertex set.<E> PgxFuture<VertexSet<E>>
createVertexSetAsync(java.lang.String name)
Creates a new vertex set.<ID,V>
VertexProperty<ID,PgxVect<V>>createVertexVectorProperty(PropertyType type, int dimension)
Blocking version ofcreateVertexVectorPropertyAsync(PropertyType, int)
.<ID,V>
VertexProperty<ID,PgxVect<V>>createVertexVectorProperty(PropertyType type, int dimension, java.lang.String name)
Blocking version ofcreateVertexVectorPropertyAsync(PropertyType, int, String)
.<ID,V>
PgxFuture<VertexProperty<ID,PgxVect<V>>>createVertexVectorPropertyAsync(PropertyType type, int dimension)
Creates a session-bound vertex vector property<ID,V>
PgxFuture<VertexProperty<ID,PgxVect<V>>>createVertexVectorPropertyAsync(PropertyType type, int dimension, java.lang.String name)
Creates a session-bound vertex vector propertyvoid
destroy()
Blocking version ofdestroyAsync()
.PgxFuture<java.lang.Void>
destroyAsync()
Destroy a graph with all its properties.void
destroyEdgePropertyIfExists(java.lang.String name)
Blocking version ofdestroyEdgePropertyIfExistsAsync(String)
.PgxFuture<java.lang.Void>
destroyEdgePropertyIfExistsAsync(java.lang.String name)
Destroys an edge property if it exists.void
destroyVertexPropertyIfExists(java.lang.String name)
Blocking version ofdestroyVertexPropertyIfExistsAsync(String)
.PgxFuture<java.lang.Void>
destroyVertexPropertyIfExistsAsync(java.lang.String name)
Destroys a vertex property if it exists.boolean
equals(java.lang.Object obj)
PgqlResultSet
executePgql(java.lang.String pgqlString)
Blocking version ofexecutePgqlAsync(String)
.PgxFuture<PgqlResultSet>
executePgqlAsync(java.lang.String pgqlString)
Submits a PGQL (both select and modify) query.GenericGraphExpander
expandGraph()
Create a graph expansion builder to define how to expand the graph (e.g.Operation
explainPgql(java.lang.String pgqlString)
Blocking version ofexplainPgql(String)
.PgxFuture<Operation>
explainPgqlAsync(java.lang.String pgqlString)
Explain the execution plan of a pattern matching query.PgxGraph
filter(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, GraphFilter graphFilter, java.lang.String newGraphName)
Blocking version offilterAsync(Collection, Collection, GraphFilter, String)
.PgxGraph
filter(GraphFilter graphFilter)
Blocking version offilterAsync(GraphFilter)
.PgxGraph
filter(GraphFilter graphFilter, java.lang.String newGraphName)
Blocking version offilterAsync(GraphFilter, String)
.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.PgxFuture<PgxGraph>
filterAsync(GraphFilter graphFilter)
Create a subgraph of this graph.PgxFuture<PgxGraph>
filterAsync(GraphFilter graphFilter, java.lang.String newGraphName)
Create a subgraph of this graph.java.util.Map<java.lang.String,PgxCollection<? extends PgxEntity<?>,?>>
getCollections()
Blocking version ofgetCollectionsAsync()
.PgxFuture<java.util.Map<java.lang.String,PgxCollection<? extends PgxEntity<?>,?>>>
getCollectionsAsync()
Retrieves all currently allocated collections associated with the graph.GraphConfig
getConfig()
Gets the graph configuration object used to specify the data source of this graph.long
getCreationRequestTimestamp()
Gets the timestamp when this graph was requested to be created.long
getCreationTimestamp()
Gets the timestamp when this graph finished creation.java.lang.String
getDataSourceVersion()
Gets the format-specific version identifier provided by data-source (timestamp for files, snapshot ID for databases).PgxEdge
getEdge(long id)
Blocking version ofgetEdgeAsync(long)
CallsgetEdgeAsync(long)
and waits for the returnedPgxFuture
to complete.PgxEdge
getEdge(java.lang.String id)
Blocking version ofgetEdgeAsync(long)
CallsgetEdgeAsync(long)
and waits for the returnedPgxFuture
to complete.PgxFuture<PgxEdge>
getEdgeAsync(long id)
Looks up aPgxEdge
of this graph by ID.PgxFuture<PgxEdge>
getEdgeAsync(java.lang.String id)
Looks up aPgxEdge
of this graph by ID.IdStrategy
getEdgeIdStrategy()
Gets the ID strategy used for the edges of this graph.EdgeLabel
getEdgeLabel()
Blocking version ofgetEdgeLabelAsync()
.PgxFuture<EdgeLabel>
getEdgeLabelAsync()
Get the edge labels belonging to this graph.java.util.Set<EdgeProperty<?>>
getEdgeProperties()
Blocking version ofgetEdgePropertiesAsync()
.PgxFuture<java.util.Set<EdgeProperty<?>>>
getEdgePropertiesAsync()
Get the set of edge properties belonging to this graph.<V> EdgeProperty<V>
getEdgeProperty(java.lang.String name)
Blocking version ofgetEdgePropertyAsync(String)
.<V> EdgeProperty<V>
getEdgeProperty(Namespace namespace, java.lang.String name)
Blocking version ofgetEdgePropertyAsync(Namespace, String)
.<V> PgxFuture<EdgeProperty<V>>
getEdgePropertyAsync(java.lang.String name)
Gets an edge property of this graph<V> PgxFuture<EdgeProperty<V>>
getEdgePropertyAsync(Namespace namespace, java.lang.String name)
Gets an edge property of this graph in the given namespace.EdgeSet
getEdges()
Blocking version ofgetEdges()
.EdgeSet
getEdges(EdgeFilter filter)
Blocking version ofgetEdges(EdgeFilter)
.EdgeSet
getEdges(EdgeFilter filter, java.lang.String name)
Blocking version ofgetEdges(EdgeFilter, String)
.PgxFuture<EdgeSet>
getEdgesAsync()
Creates a new edge set containing all edges.<E> PgxFuture<EdgeSet>
getEdgesAsync(EdgeFilter filter)
Creates a new edge set containing edges according to the given filter expression.PgxFuture<EdgeSet>
getEdgesAsync(EdgeFilter filter, java.lang.String name)
Creates a new edge set containing edges according to the given filter expression.oracle.pgx.common.PgxId
getId()
Returns an internal identifier for this graph snapshot.long
getMemoryMb()
Gets the estimated number of memory this graph (including its properties) consumes in memory (in megabytes).GraphMetaData
getMetaData()
Provides the metadata associated to this graph snapshot which includes information about the structure of the graph, versioning information, etc.java.lang.String
getName()
Gets the name.long
getNumEdges()
Gets the number of edgeslong
getNumVertices()
Gets the number of vertices<V> EdgeProperty<V>
getOrCreateEdgeProperty(PropertyType type, java.lang.String name)
Blocking version ofgetOrCreateEdgePropertyAsync(PropertyType, String)
.<V> PgxFuture<EdgeProperty<V>>
getOrCreateEdgePropertyAsync(PropertyType type, java.lang.String name)
Gets or creates an edge property<V> EdgeProperty<PgxVect<V>>
getOrCreateEdgeVectorProperty(PropertyType type, int dimension, java.lang.String name)
Blocking version ofgetOrCreateEdgeVectorPropertyAsync(PropertyType, int, String)
.<V> PgxFuture<EdgeProperty<PgxVect<V>>>
getOrCreateEdgeVectorPropertyAsync(PropertyType type, int dimension, java.lang.String name)
Gets or creates an edge vector property<V> PgxFuture<EdgeProperty<PgxVect<V>>>
getOrCreateEdgeVertexPropertyAsync(PropertyType type, int dimension, java.lang.String name)
Gets or creates an edge vector property<ID,V>
VertexProperty<ID,V>getOrCreateVertexProperty(PropertyType type, java.lang.String name)
Blocking version ofgetOrCreateVertexPropertyAsync(PropertyType, String)
.<ID,V>
PgxFuture<VertexProperty<ID,V>>getOrCreateVertexPropertyAsync(PropertyType type, java.lang.String name)
Gets or creates a vertex property<ID,V>
VertexProperty<ID,PgxVect<V>>getOrCreateVertexVectorProperty(PropertyType type, int dimension, java.lang.String name)
Blocking version ofgetOrCreateVertexVectorPropertyAsync(PropertyType, int, String)
.<ID,V>
PgxFuture<VertexProperty<ID,PgxVect<V>>>getOrCreateVertexVectorPropertyAsync(PropertyType type, int dimension, java.lang.String name)
Gets or creates a vertex vector propertyPgxResourcePermission
getPermission()
Blocking version ofgetPermissionAsync()
.PgxFuture<PgxResourcePermission>
getPermissionAsync()
Get the permission that the current user has on the graph.ServerInstance
getPgxInstance()
Gets the server instance.PgxEdge
getRandomEdge()
Blocking version ofgetRandomEdgeAsync()
.PgxFuture<PgxEdge>
getRandomEdgeAsync()
Picks a random edge in the graph.<ID> PgxVertex<ID>
getRandomVertex()
Blocking version ofgetRandomVertexAsync()
.<ID> PgxFuture<PgxVertex<ID>>
getRandomVertexAsync()
Picks a random vertex in the graph.java.util.List<oracle.pgx.config.PgxRedactionRuleConfig>
getRedactionRules(AuthorizationType type, java.lang.String name)
Blocking version ofgetRedactionRules(AuthorizationType, String)
CallsgetRedactionRulesAsync(AuthorizationType, String)
)} and waits for the returnedPgxFuture
to complete.PgxFuture<java.util.List<oracle.pgx.config.PgxRedactionRuleConfig>>
getRedactionRulesAsync(AuthorizationType type, java.lang.String name)
Gets redaction rules for an AuthorizationType name.PgxSession
getSession()
Gets the session.<ID> PgxVertex<ID>
getVertex(ID id)
Blocking version ofgetVertexAsync(Object)
.<ID> PgxFuture<PgxVertex<ID>>
getVertexAsync(ID id)
Looks up aPgxVertex
of this graph by ID.IdStrategy
getVertexIdStrategy()
Gets the ID strategy used for the vertices of this graph.IdType
getVertexIdType()
Gets the vertex ID type of this graph.<ID> VertexLabels<ID>
getVertexLabels()
Blocking version ofgetVertexLabelsAsync()
.<ID> PgxFuture<VertexLabels<ID>>
getVertexLabelsAsync()
Get the vertex labels belonging to this graph.java.util.Set<VertexProperty<?,?>>
getVertexProperties()
Blocking version ofgetVertexPropertiesAsync()
.PgxFuture<java.util.Set<VertexProperty<?,?>>>
getVertexPropertiesAsync()
Get the set of vertex properties belonging to this graph.<ID,V>
VertexProperty<ID,V>getVertexProperty(java.lang.String name)
Blocking version ofgetVertexPropertyAsync(String)
.<ID,V>
VertexProperty<ID,V>getVertexProperty(Namespace namespace, java.lang.String name)
Blocking version ofgetVertexPropertyAsync(Namespace, String)
.<ID,V>
PgxFuture<VertexProperty<ID,V>>getVertexPropertyAsync(java.lang.String name)
Gets a vertex property of this graph.<ID,V>
PgxFuture<VertexProperty<ID,V>>getVertexPropertyAsync(Namespace namespace, java.lang.String name)
Gets a vertex property of this graph in the given namespace.<E> VertexSet<E>
getVertices()
Blocking version ofgetVerticesAsync()
.<E> VertexSet<E>
getVertices(VertexFilter filter)
Blocking version ofgetVerticesAsync(VertexFilter)
.<E> VertexSet<E>
getVertices(VertexFilter filter, java.lang.String name)
Blocking version ofgetVerticesAsync(VertexFilter, String)
.<E> PgxFuture<VertexSet<E>>
getVerticesAsync()
Creates a new vertex set containing all vertices.<E> PgxFuture<VertexSet<E>>
getVerticesAsync(VertexFilter filter)
Creates a new vertex set containing vertices according to the given filter expression.<E> PgxFuture<VertexSet<E>>
getVerticesAsync(VertexFilter filter, java.lang.String name)
Creates a new vertex set containing vertices according to the given filter expression.void
grantPermission(PgxRole role, PgxResourcePermission permission)
Blocking version ofgrantPermissionAsync(PgxRole, PgxResourcePermission)
.void
grantPermission(PgxUser user, PgxResourcePermission permission)
Blocking version ofgrantPermissionAsync(PgxUser, PgxResourcePermission)
.PgxFuture<java.lang.Void>
grantPermissionAsync(PgxRole role, PgxResourcePermission permission)
Grants a permission on this graph to the given role.PgxFuture<java.lang.Void>
grantPermissionAsync(PgxUser user, PgxResourcePermission permission)
Grants a permission on this graph to the given user.boolean
hasEdge(long id)
Blocking version ofhasEdgeAsync(long)
CallshasEdgeAsync(long)
and waits for the returnedPgxFuture
to complete.boolean
hasEdge(java.lang.String id)
Blocking version ofhasEdgeAsync(long)
CallshasEdgeAsync(String)
and waits for the returnedPgxFuture
to complete.PgxFuture<java.lang.Boolean>
hasEdgeAsync(long id)
Looks up whether the graph has an Edge with the given IDPgxFuture<java.lang.Boolean>
hasEdgeAsync(java.lang.String id)
Looks up whether the graph has an Edge with the given IDboolean
hasEdgeLabel()
Blocking version ofhasEdgeLabelAsync()
.PgxFuture<java.lang.Boolean>
hasEdgeLabelAsync()
int
hashCode()
<ID> boolean
hasVertex(ID id)
Blocking version ofhasVertexAsync(Object)
.<ID> PgxFuture<java.lang.Boolean>
hasVertexAsync(ID id)
Looks up whether the graph has a Vertex with the given IDboolean
hasVertexLabels()
Blocking version ofhasVertexLabelsAsync()
.PgxFuture<java.lang.Boolean>
hasVertexLabelsAsync()
java.lang.Boolean
isBipartiteGraph(VertexProperty<?,java.lang.Boolean> isLeft)
Blocking version ofisBipartiteGraphAsync(VertexProperty)
.<ID> PgxFuture<java.lang.Boolean>
isBipartiteGraphAsync(VertexProperty<ID,java.lang.Boolean> isLeft)
Checks whether a given graph is a bipartite graph.boolean
isDirected()
boolean
isFresh()
Blocking version ofisFreshAsync()
.PgxFuture<java.lang.Boolean>
isFreshAsync()
Check whether an in-memory representation of a graph is fresh.boolean
isPinned()
Blocking version ofisPinnedAsync()
.PgxFuture<java.lang.Boolean>
isPinnedAsync()
For a published graph, indicates if the graph is pinned.boolean
isPublished()
Blocking version ofisPublishedAsync()
.PgxFuture<java.lang.Boolean>
isPublishedAsync()
Checks if this graph is published.boolean
isPublishedWithSnapshots()
Blocking version ofisPublishedWithSnapshotsAsync()
.PgxFuture<java.lang.Boolean>
isPublishedWithSnapshotsAsync()
Checks if this graph is published with snapshots.boolean
isTransient()
Gets the transient flag of this graph.void
pin()
Blocking version ofpinAsync()
.PgxFuture<java.lang.Void>
pinAsync()
For a published graph, pins the graph so that it stays published even if no sessions uses it.PgxPreparedStatement
preparePgql(java.lang.String pgqlString)
Blocking version ofpreparePgql(String)
.PgxFuture<PgxPreparedStatement>
preparePgqlAsync(java.lang.String pgqlString)
Prepares a PGQL query.void
publish()
Blocking version ofpublishAsync()
.void
publish(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps)
PgxFuture<java.lang.Void>
publishAsync()
Publishes the graph so it can be shared between sessions.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.void
publishWithSnapshots()
Blocking version ofpublishWithSnapshotsAsync()
.void
publishWithSnapshots(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps)
Blocking version ofpublishWithSnapshotsAsync(Collection, Collection)
.PgxFuture<java.lang.Void>
publishWithSnapshotsAsync()
Publishes the graph and all its snapshots so they can be shared between sessions.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.PgqlResultSet
queryPgql(java.lang.String pgqlString)
Blocking version ofqueryPgql(String)
.PgxFuture<PgqlResultSet>
queryPgqlAsync(java.lang.String pgqlString)
Submits a pattern matching select only query.void
removeRedactionRule(oracle.pgx.config.PgxRedactionRuleConfig ruleConfig, AuthorizationType type, java.lang.String... names)
Blocking version ofremoveRedactionRule(PgxRedactionRuleConfig, AuthorizationType, String...)
CallsremoveRedactionRuleAsync(PgxRedactionRuleConfig, AuthorizationType, String...)
)} and waits for the returnedPgxFuture
to complete.PgxFuture<java.lang.Void>
removeRedactionRuleAsync(oracle.pgx.config.PgxRedactionRuleConfig ruleConfig, AuthorizationType type, java.lang.String... names)
Removes a redaction rule for AuthorizationType names.void
rename(java.lang.String newGraphName)
Blocking version ofrenameAsync(String)
.PgxFuture<java.lang.Void>
renameAsync(java.lang.String newGraphName)
Renames this graph.void
revokePermission(PgxRole role)
Blocking version ofrevokePermissionAsync(PgxRole)
.void
revokePermission(PgxUser user)
Blocking version ofrevokePermissionAsync(PgxUser)
.PgxFuture<java.lang.Void>
revokePermissionAsync(PgxRole role)
Revokes all permissions on this graph from the given role.PgxFuture<java.lang.Void>
revokePermissionAsync(PgxUser user)
Revokes all permissions on this graph from the given user.PgxGraph
simplify()
Blocking version ofsimplifyAsync()
.PgxGraph
simplify(java.lang.String newGraphName)
Blocking version ofsimplifyAsync(String)
.PgxGraph
simplify(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.TrivialVertices trivialVertices, PgxGraph.Mode mode, java.lang.String newGraphName)
PgxGraph
simplify(PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.TrivialVertices trivialVertices, PgxGraph.Mode mode, java.lang.String newGraphName)
Blocking version ofsimplifyAsync(MultiEdges, SelfEdges, TrivialVertices, Mode, String)
.PgxGraph
simplify(oracle.pgx.common.mutations.MutationStrategy mutationStrategy)
PgxFuture<PgxGraph>
simplifyAsync()
Convenience method aroundsimplifyAsync(String)
passing null as getId()PgxFuture<PgxGraph>
simplifyAsync(java.lang.String newGraphName)
Convenience method forsimplifyAsync(MultiEdges, SelfEdges, TrivialVertices, Mode, String)
Passing StrategyType asStrategyType.REMOVE_MULTI_EDGES
SelfEdges asSelfEdges.REMOVE_SELF_EDGES
Trivial Vertices asTrivialVertices.REMOVE_TRIVIAL_VERTICES
Mode asMode.CREATE_COPY
PgxFuture<PgxGraph>
simplifyAsync(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.TrivialVertices trivialVertices, PgxGraph.Mode mode, java.lang.String newGraphName)
Create a simplified version of a graph.PgxFuture<PgxGraph>
simplifyAsync(PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.TrivialVertices trivialVertices, PgxGraph.Mode mode, java.lang.String newGraphName)
Convenience method forsimplifyAsync(Collection, Collection, MultiEdges, SelfEdges, TrivialVertices, Mode, String)
Passing Collection(vertexProperties) asVertexProperty.ALL
Collection(edgeProperties) asEdgeProperty.ALL
PgxFuture<PgxGraph>
simplifyAsync(oracle.pgx.common.mutations.MutationStrategy mutationStrategy)
PgxGraph
sortByDegree()
Blocking version ofsortByDegreeAsync()
.PgxGraph
sortByDegree(java.lang.String newGraphName)
Blocking version ofsortByDegreeAsync(String)
.PgxGraph
sortByDegree(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, PgxGraph.SortOrder sortOrder, PgxGraph.Degree degree, PgxGraph.Mode mode, java.lang.String newGraphName)
Blocking version ofsortByDegreeAsync(Collection, Collection, SortOrder, Degree, Mode, String)
.PgxGraph
sortByDegree(PgxGraph.SortOrder sortOrder, PgxGraph.Degree degree, PgxGraph.Mode mode, java.lang.String newGraphName)
Blocking version ofsortByDegreeAsync(SortOrder, Degree, Mode, String)
.PgxFuture<PgxGraph>
sortByDegreeAsync()
Create a sorted version of a graph and all its properties.PgxFuture<PgxGraph>
sortByDegreeAsync(java.lang.String newGraphName)
Create a sorted version of a graph and all its properties.PgxFuture<PgxGraph>
sortByDegreeAsync(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, PgxGraph.SortOrder sortOrder, PgxGraph.Degree degree, PgxGraph.Mode mode, java.lang.String newGraphName)
Create a sorted version of a graph and all its properties.PgxFuture<PgxGraph>
sortByDegreeAsync(PgxGraph.SortOrder sortOrder, PgxGraph.Degree degree, PgxGraph.Mode mode, java.lang.String newGraphName)
Create a sorted version of a graph and all its properties.PgxGraph
sparsify(double e)
Blocking version ofsparsifyAsync(double)
.PgxGraph
sparsify(double e, java.lang.String newGraphName)
Blocking version ofsparsifyAsync(double, String)
.PgxGraph
sparsify(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, double e, java.lang.String newGraphName)
Blocking version ofsparsifyAsync(Collection, Collection, double, String)
.PgxFuture<PgxGraph>
sparsifyAsync(double e)
Sparsifies the given graph and returns a new graph with less edges.PgxFuture<PgxGraph>
sparsifyAsync(double e, java.lang.String newGraphName)
Sparsifies the given graph and returns a new graph with less edges.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.FileGraphConfig
store(Format targetFormat, java.lang.String targetPath)
Blocking version ofstoreAsync(Format, String)
.FileGraphConfig
store(Format targetFormat, java.lang.String targetPath, boolean overwrite)
Blocking version ofstoreAsync(Format, String, boolean)
.FileGraphConfig
store(Format targetFormat, java.lang.String targetBasePath, int numPartitions)
Blocking version ofstoreAsync(Format, String, int)
.FileGraphConfig
store(Format targetFormat, java.lang.String targetBasePath, int numPartitions, boolean overwrite)
Blocking version ofstoreAsync(Format, String, int, boolean)
.FileGraphConfig
store(Format targetFormat, java.lang.String targetBasePath, int numPartitions, java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, boolean overwrite)
Blocking version ofstoreAsync(Format, String, int, Collection, Collection, boolean)
.FileGraphConfig
store(Format targetFormat, java.lang.String targetPath, java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, boolean overwrite)
Blocking version ofstoreAsync(Format, String, Collection, Collection, boolean)
.FileGraphConfig
store(Format targetFormat, FileGraphStoringConfig storingConfig)
Blocking version ofstoreAsync(Format, FileGraphStoringConfig)
.FileGraphConfig
store(Format targetFormat, FileGraphStoringConfig storingConfig, boolean overwrite)
Blocking version ofstoreAsync(Format, FileGraphStoringConfig, boolean)
.FileGraphConfig
store(Format targetFormat, FileGraphStoringConfig storingConfig, java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, boolean overwrite)
Blocking version ofstoreAsync(Format, FileGraphStoringConfig, Collection, Collection, boolean)
.GraphConfig
store(GraphConfig targetConfig, boolean overwrite)
Blocking version ofstoreAsync(GraphConfig, boolean)
.GraphConfig
store(GraphConfig targetConfig, java.util.Set<java.lang.String> vertexProvidersToStore, java.util.Set<java.lang.String> edgeProvidersToStore, boolean overwrite)
Blocking version ofstoreAsync(GraphConfig, Set, Set, boolean)
.PartitionedGraphConfig
store(ProviderFormat targetFormat, java.lang.String targetBasePath)
Blocking version ofstoreAsync(ProviderFormat, String)
.PartitionedGraphConfig
store(ProviderFormat targetFormat, java.lang.String targetBasePath, boolean overwrite)
Blocking version ofstoreAsync(ProviderFormat, String, boolean)
.PartitionedGraphConfig
store(ProviderFormat targetFormat, java.lang.String targetBasePath, int numPartitions)
Blocking version ofstoreAsync(ProviderFormat, String, int)
.PartitionedGraphConfig
store(ProviderFormat targetFormat, java.lang.String targetBasePath, int numPartitions, boolean overwrite)
Blocking version ofstoreAsync(ProviderFormat, String, int, boolean)
.PartitionedGraphConfig
store(ProviderFormat targetFormat, java.lang.String targetBasePath, int numPartitions, java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, boolean overwrite)
Blocking version ofstoreAsync(ProviderFormat, String, int, Collection, Collection, boolean)
.PartitionedGraphConfig
store(ProviderFormat targetFormat, java.lang.String targetBasePath, int numPartitions, java.util.Set<java.lang.String> vertexProvidersToStore, java.util.Set<java.lang.String> edgeProvidersToStore)
Blocking version ofstoreAsync(ProviderFormat, String, int, Set, Set)
.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)
Blocking version of {@link #storeAsync(ProviderFormat, String, int, Set, Set, , boolean)}.PartitionedGraphConfig
store(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)
Blocking version ofstoreAsync(ProviderFormat, String, int, Set, Set, Collection, Collection, boolean)
.PartitionedGraphConfig
store(ProviderFormat targetFormat, java.lang.String targetBasePath, java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, boolean overwrite)
Blocking version ofstoreAsync(ProviderFormat, String, Collection, Collection, boolean)
.PartitionedGraphConfig
store(ProviderFormat targetFormat, java.lang.String targetBasePath, java.util.Set<java.lang.String> vertexProvidersToStore, java.util.Set<java.lang.String> edgeProvidersToStore)
Blocking version ofstoreAsync(ProviderFormat, String, Set, Set)
.PartitionedGraphConfig
store(ProviderFormat targetFormat, java.lang.String targetBasePath, java.util.Set<java.lang.String> vertexProvidersToStore, java.util.Set<java.lang.String> edgeProvidersToStore, boolean overwrite)
Blocking version ofstoreAsync(ProviderFormat, String, boolean)
.PartitionedGraphConfig
store(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)
Blocking version ofstoreAsync(ProviderFormat, String, Set, Set, Collection, Collection, boolean)
.PartitionedGraphConfig
store(ProviderFormat targetFormat, java.util.Map<java.lang.String,FileGraphStoringConfig> vertexStoringConfigs, java.util.Map<java.lang.String,FileGraphStoringConfig> edgeStoringConfigs)
Blocking version ofstoreAsync(ProviderFormat, Map, Map)
.PartitionedGraphConfig
store(ProviderFormat targetFormat, java.util.Map<java.lang.String,FileGraphStoringConfig> vertexStoringConfigs, java.util.Map<java.lang.String,FileGraphStoringConfig> edgeStoringConfigs, boolean overwrite)
Blocking version ofstoreAsync(ProviderFormat, Map, Map, boolean)
.PartitionedGraphConfig
store(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)
Blocking version ofstoreAsync(ProviderFormat, Map, Map, Collection, Collection, boolean)
.PartitionedGraphConfig
store(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)
Blocking version ofstoreAsync(ProviderFormat, Set, Set, Map, Map, boolean)
.PartitionedGraphConfig
store(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)
Blocking version ofstoreAsync(ProviderFormat, Set, Set, Map, Map, Collection, Collection, boolean)
.PgxFuture<FileGraphConfig>
storeAsync(Format targetFormat, java.lang.String targetPath)
Stores this graph in a given file format on a file system.PgxFuture<FileGraphConfig>
storeAsync(Format targetFormat, java.lang.String targetPath, boolean overwrite)
Stores this graph in a given file format on a file system.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.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.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.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.PgxFuture<FileGraphConfig>
storeAsync(Format targetFormat, FileGraphStoringConfig storingConfig)
Stores this graph in a given file format in multiple partitions on a file system.PgxFuture<FileGraphConfig>
storeAsync(Format targetFormat, FileGraphStoringConfig storingConfig, boolean overwrite)
Stores this graph in a given file format in multiple partitions on a file system.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.PgxFuture<GraphConfig>
storeAsync(GraphConfig targetConfig, boolean overwrite)
Stores this graph in a file or database.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.PgxFuture<PartitionedGraphConfig>
storeAsync(ProviderFormat targetFormat, java.lang.String targetBasePath)
Stores this graph in a given file format on a file system.PgxFuture<PartitionedGraphConfig>
storeAsync(ProviderFormat targetFormat, java.lang.String targetBasePath, boolean overwrite)
Stores this graph in a given file format on a file system.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.java.lang.String
toString()
PgxGraph
transpose()
Blocking version oftransposeAsync()
PgxGraph
transpose(java.lang.String newGraphName)
Blocking version oftransposeAsync(String)
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)
Blocking version oftransposeAsync(Collection, Collection, Map, Mode, String)
PgxGraph
transpose(PgxGraph.Mode mode)
Blocking version oftransposeAsync(Mode)
PgxGraph
transpose(PgxGraph.Mode mode, java.lang.String newGraphName)
Blocking version oftransposeAsync(Mode, String)
PgxFuture<PgxGraph>
transposeAsync()
Convenience method aroundtransposeAsync(String)
passing null as getId()PgxFuture<PgxGraph>
transposeAsync(java.lang.String newGraphName)
Convenience method aroundtransposeAsync(Mode, String)
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.PgxFuture<PgxGraph>
transposeAsync(PgxGraph.Mode mode)
Convenience method aroundtransposeAsync(Mode, String)
passing null as getId()PgxFuture<PgxGraph>
transposeAsync(PgxGraph.Mode mode, java.lang.String newGraphName)
Convenience method aroundtransposeAsync(Collection, Collection, Map, Mode, String)
PgxGraph
undirect()
Blocking version ofundirectAsync()
.PgxGraph
undirect(java.lang.String newGraphName)
Blocking version ofundirectAsync(String)
.PgxGraph
undirect(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.TrivialVertices trivialVertices, PgxGraph.Mode mode, java.lang.String newGraphName)
Blocking version ofundirectAsync(Collection, Collection, MultiEdges, SelfEdges, Mode, String)
.PgxGraph
undirect(PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.Mode mode, java.lang.String newGraphName)
Blocking version ofundirectAsync(MultiEdges, SelfEdges, Mode, String)
.PgxGraph
undirect(oracle.pgx.common.mutations.MutationStrategy mutationStrategy)
Blocking version ofundirectAsync(MutationStrategy)
PgxFuture<PgxGraph>
undirectAsync()
Convenience method aroundundirectAsync(String)
passing null as getId()PgxFuture<PgxGraph>
undirectAsync(java.lang.String newGraphName)
Convenience method aroundundirectAsync(MultiEdges, SelfEdges, Mode, String)
PgxFuture<PgxGraph>
undirectAsync(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.Mode mode, java.lang.String newGraphName)
Convenience method to create forundirectAsync(MutationStrategy)
.PgxFuture<PgxGraph>
undirectAsync(PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.Mode mode, java.lang.String newGraphName)
Convenience method forundirectAsync(Collection, Collection, MultiEdges, SelfEdges, Mode, String)
PgxFuture<PgxGraph>
undirectAsync(oracle.pgx.common.mutations.MutationStrategy mutationStrategy)
Create an undirected version of a graph.void
unpin()
Blocking version ofunpinAsync()
.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.-
Methods inherited from class oracle.pgx.api.Destroyable
close
-
-
-
-
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 classPgxManagedObject
- 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()
istrue
).
-
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()
istrue
).
-
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.
-
addRedactionRule
public void addRedactionRule(oracle.pgx.config.PgxRedactionRuleConfig ruleConfig, AuthorizationType type, java.lang.String... names)
Blocking version ofaddRedactionRule(PgxRedactionRuleConfig, AuthorizationType, String...)
CallsaddRedactionRuleAsync(PgxRedactionRuleConfig, AuthorizationType, String...)
)} and waits for the returnedPgxFuture
to complete.
-
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 namestype
- the type of the @link #AuthorizationTypenames
- the AuthorizationType users to whom the rule configuration will be added
-
removeRedactionRule
public void removeRedactionRule(oracle.pgx.config.PgxRedactionRuleConfig ruleConfig, AuthorizationType type, java.lang.String... names)
Blocking version ofremoveRedactionRule(PgxRedactionRuleConfig, AuthorizationType, String...)
CallsremoveRedactionRuleAsync(PgxRedactionRuleConfig, AuthorizationType, String...)
)} and waits for the returnedPgxFuture
to complete.
-
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 namestype
- the type of the @link #AuthorizationTypenames
- the AuthorizationType users to whom the rule configuration will be removed
-
getRedactionRules
public java.util.List<oracle.pgx.config.PgxRedactionRuleConfig> getRedactionRules(AuthorizationType type, java.lang.String name)
Blocking version ofgetRedactionRules(AuthorizationType, String)
CallsgetRedactionRulesAsync(AuthorizationType, String)
)} and waits for the returnedPgxFuture
to complete.
-
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 #AuthorizationTypename
- 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 usingIdGenerationStrategy.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 usededgeIdGenerationStrategy
- 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 aPgxVertex
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 aPgxEdge
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 aPgxEdge
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 graphThe 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 isnull
, use same semantics asgetVertexPropertyAsync(String)
- Parameters:
namespace
- the namespace in which to look up the property. Can be null, which implies same behavior asgetVertexPropertyAsync(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 isnull
, use same semantics asgetEdgePropertyAsync(String)
- Parameters:
namespace
- the namespace in which to look up the property. Can be null, which implies same behavior asgetEdgePropertyAsync(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 aroundstore(Format, String, boolean)
, setting the overwrite flag tofalse
.- 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 aroundstore(ProviderFormat, String, boolean)
, setting the overwrite flag tofalse
.- 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 aroundstore(ProviderFormat, String, boolean)
, setting the overwrite flag tofalse
.- 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 storeedgeProvidersToStore
- 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 aroundstoreAsync(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 totrue
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 aroundstoreAsync(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 totrue
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 aroundstoreAsync(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 storeedgeProvidersToStore
- the edge providers to storeoverwrite
- Set this flag totrue
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 useVertexProperty.NONE
orVertexProperty.ALL
to indicate all or no properties.edgeProps
- the collection of edge properties to store together with the graph data. You can useEdgeProperty.NONE
orEdgeProperty.ALL
to indicate all or no properties.overwrite
- Set this flag totrue
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 useVertexProperty.NONE
orVertexProperty.ALL
to indicate all or no properties.edgeProps
- the collection of edge properties to store together with the graph data. You can useEdgeProperty.NONE
orEdgeProperty.ALL
to indicate all or no properties.overwrite
- Set this flag totrue
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 storeedgeProvidersToStore
- for partitioned graphs, the edge providers to storevertexProps
- the collection of vertex properties to store together with the graph data. You can useVertexProperty.NONE
orVertexProperty.ALL
to indicate all or no properties.edgeProps
- the collection of edge properties to store together with the graph data. You can useEdgeProperty.NONE
orEdgeProperty.ALL
to indicate all or no properties.overwrite
- Set this flag totrue
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 aroundstore(Format, String, int, boolean)
, setting the overwrite flag tofalse
.- 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 aroundstoreAsync(ProviderFormat, String, int, boolean)
, setting the overwrite flag tofalse
.- 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 aroundstoreAsync(ProviderFormat, String, int, boolean)
, setting the overwrite flag tofalse
.- 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 storeedgeProvidersToStore
- 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 aroundstoreAsync(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 totrue
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 aroundstoreAsync(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 totrue
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 aroundstoreAsync(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 storeedgeProvidersToStore
- the edge providers to storeoverwrite
- Set this flag totrue
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 aroundstoreAsync(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 useVertexProperty.NONE
orVertexProperty.ALL
to indicate all or no properties.edgeProps
- the collection of edge properties to store together with the graph data. You can useEdgeProperty.NONE
orEdgeProperty.ALL
to indicate all or no properties.overwrite
- Set this flag totrue
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 aroundstoreAsync(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 useVertexProperty.NONE
orVertexProperty.ALL
to indicate all or no properties.edgeProps
- the collection of edge properties to store together with the graph data. You can useEdgeProperty.NONE
orEdgeProperty.ALL
to indicate all or no properties.overwrite
- Set this flag totrue
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 aroundstoreAsync(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 storeedgeProvidersToStore
- the edge providers to storevertexProps
- the collection of vertex properties to store together with the graph data. You can useVertexProperty.NONE
orVertexProperty.ALL
to indicate all or no properties.edgeProps
- the collection of edge properties to store together with the graph data. You can useEdgeProperty.NONE
orEdgeProperty.ALL
to indicate all or no properties.overwrite
- Set this flag totrue
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 aroundstore(Format, FileGraphStoringConfig, boolean)
, setting the overwrite flag tofalse
.- 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 aroundstoreAsync(ProviderFormat, Map, Map, boolean)
, setting the overwrite flag tofalse
.- 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 aroundstoreAsync(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 totrue
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 aroundstoreAsync(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 totrue
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 aroundstoreAsync(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 storeedgeProvidersToStore
- for partitioned graphs, the edge providers to storevertexStoringConfigs
- 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 totrue
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 useVertexProperty.NONE
orVertexProperty.ALL
to indicate all or no properties.edgeProps
- the collection of edge properties to store together with the graph data. You can useEdgeProperty.NONE
orEdgeProperty.ALL
to indicate all or no properties.overwrite
- Set this flag totrue
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 useVertexProperty.NONE
orVertexProperty.ALL
to indicate all or no properties.edgeProps
- the collection of edge properties to store together with the graph data. You can useEdgeProperty.NONE
orEdgeProperty.ALL
to indicate all or no properties.overwrite
- Set this flag totrue
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 storeedgeProvidersToStore
- for partitioned graphs, the edge providers to storevertexStoringConfigs
- 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 useVertexProperty.NONE
orVertexProperty.ALL
to indicate all or no properties.edgeProps
- the collection of edge properties to store together with the graph data. You can useEdgeProperty.NONE
orEdgeProperty.ALL
to indicate all or no properties.overwrite
- Set this flag totrue
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 totrue
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 storeedgeProvidersToStore
- for partitioned graphs, the edge providers to storeoverwrite
- Set this flag totrue
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 calledPgxSession.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 classDestroyable
- 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 scalarnewScalarName
- 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 scalardimension
- of vector scalar to be creatednewScalarName
- 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 scalardimension
- 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 createname
- 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 createdimension
- 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 createdimension
- of vector property to be createdname
- 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 createname
- 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 createname
- 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 createname
- 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 createdimension
- 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 createdimension
- of vector property to be createdname
- 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 createname
- 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 createname
- 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 createname
- 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 setname
- the name of the collection to be created. IfNULL
, 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 setname
- the name of the collection to be created. IfNULL
, 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 mapvalType
- 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 mapvalType
- Property type of the values that are going to be stored inside the mapmapName
- 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 aroundsortByDegree(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 aroundsortByDegree(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
- SortOrder as
-
sortByDegreeAsync
public PgxFuture<PgxGraph> sortByDegreeAsync(PgxGraph.SortOrder sortOrder, PgxGraph.Degree degree, PgxGraph.Mode mode, 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 aroundsortByDegreeAsync(Collection, Collection, SortOrder, Degree, Mode, String)
Passing
- Collection(vertexProps) as
VertexProperty.ALL
- Collection(edgeProps) as
EdgeProperty.ALL
- Parameters:
sortOrder
- sort order. ConstantsPgxGraph.SortOrder.ASCENDING
orPgxGraph.SortOrder.DESCENDING
should be useddegree
- degree sorting mode. ConstantsPgxGraph.Degree.OUT
orPgxGraph.Degree.IN
should be usedmode
- it specifies if the graph should be mutated in place or a new one should be created. ConstantsPgxGraph.Mode.MUTATE_IN_PLACE
orPgxGraph.Mode.CREATE_COPY
should be usednewGraphName
- 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
- Collection(vertexProps) as
-
sortByDegreeAsync
public PgxFuture<PgxGraph> sortByDegreeAsync(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, PgxGraph.SortOrder sortOrder, PgxGraph.Degree degree, PgxGraph.Mode mode, 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.This operation will be ignored for partitioned graphs, i.e., if
isHomogeneous()
isfalse
. Setting the mutation mode toPgxGraph.Mode.CREATE_COPY
will, in this case, create a copy of this graph throughcloneAsync(Collection, Collection, String)
.- Parameters:
vertexProps
- vertex properties belonging to graph specified by graph to be transformed as well. ConstantsVertexProperty.ALL
orVertexProperty.NONE
can be used.edgeProps
- edge properties belonging to graph specified by graph to be transformed as well. ConstantsEdgeProperty.ALL
orEdgeProperty.NONE
can be used.sortOrder
- sort order. ConstantsPgxGraph.SortOrder.ASCENDING
orPgxGraph.SortOrder.DESCENDING
should be useddegree
- degree sorting mode. ConstantsPgxGraph.Degree.OUT
orPgxGraph.Degree.IN
should be usedmode
- it specifies if the graph should be mutated in place or a new one should be created. ConstantsPgxGraph.Mode.MUTATE_IN_PLACE
orPgxGraph.Mode.CREATE_COPY
should be usednewGraphName
- 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()
Convenience method aroundtransposeAsync(String)
passing null as getId()- Returns:
- the resulting graph
-
transposeAsync
public PgxFuture<PgxGraph> transposeAsync(PgxGraph.Mode mode)
Convenience method aroundtransposeAsync(Mode, String)
passing null as getId()- Returns:
- the resulting graph
-
transposeAsync
public PgxFuture<PgxGraph> transposeAsync(java.lang.String newGraphName)
- 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
-
transposeAsync
public PgxFuture<PgxGraph> transposeAsync(PgxGraph.Mode mode, java.lang.String newGraphName)
Convenience method aroundtransposeAsync(Collection, Collection, Map, Mode, String)
Passing
- Collection(vertexProps) as
VertexProperty.ALL
- Collection(edgeProps) as
EdgeProperty.ALL
*
- 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
- Collection(vertexProps) as
-
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()
returnsfalse
), this operation has no effect and will either return a copy or act as identity function depending on themode
parameter.- Parameters:
vertexProps
- vertex properties that should be kept in the mutated graph. ConstantsVertexProperty.ALL
orVertexProperty.NONE
can be used.edgeProps
- edge properties that should be kept in the mutated graph. ConstantsEdgeProperty.ALL
orEdgeProperty.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 likeCollections.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 isNULL
, 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. ConstantsPgxGraph.Mode.MUTATE_IN_PLACE
orPgxGraph.Mode.CREATE_COPY
should be usednewGraphName
- 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
Blocking version ofundirectAsync(MutationStrategy)
- Parameters:
mutationStrategy
-- Returns:
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
undirectAsync
public PgxFuture<PgxGraph> undirectAsync()
Convenience method aroundundirectAsync(String)
passing null as getId()- Returns:
- the resulting graph
-
undirectAsync
public PgxFuture<PgxGraph> undirectAsync(java.lang.String newGraphName)
Convenience method aroundundirectAsync(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
- StrategyType as
-
undirectAsync
public PgxFuture<PgxGraph> undirectAsync(PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.Mode mode, java.lang.String newGraphName)
Convenience method forundirectAsync(Collection, Collection, MultiEdges, SelfEdges, Mode, String)
Passing Collection(vertexProps) as
VertexProperty.ALL
and Collection(edgeProps) asEdgeProperty.ALL
- Parameters:
multiEdges
- defines if multi-edges should be kept in the result.selfEdges
- defines if self-edges should be kept in the result. ConstantsPgxGraph.SelfEdges.KEEP_SELF_EDGES
orPgxGraph.SelfEdges.REMOVE_SELF_EDGES
can be used.mode
- defines if a copy of the graph should be created, otherwise graph is mutated in place. ConstantsPgxGraph.Mode.MUTATE_IN_PLACE
orPgxGraph.Mode.CREATE_COPY
can be usednewGraphName
- 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(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.Mode mode, java.lang.String newGraphName)
Convenience method to create forundirectAsync(MutationStrategy)
.- Parameters:
vertexProps
- vertex properties that should be kept in the mutated graph. ConstantsVertexProperty.ALL
orVertexProperty.NONE
can be used.edgeProps
- edge properties that should be kept in the mutated graph. ConstantsEdgeProperty.ALL
orEdgeProperty.NONE
can be used.multiEdges
- defines if multi-edges should be kept in the result. ConstantsPgxGraph.MultiEdges.KEEP_MULTI_EDGES
orPgxGraph.MultiEdges.REMOVE_MULTI_EDGES
can be usedselfEdges
- defines if self-edges should be kept in the result. ConstantsPgxGraph.SelfEdges.KEEP_SELF_EDGES
orPgxGraph.SelfEdges.REMOVE_SELF_EDGES
can be used.mode
- defines if a copy of the graph should be created, otherwise graph is mutated in place. ConstantsPgxGraph.Mode.MUTATE_IN_PLACE
orPgxGraph.Mode.CREATE_COPY
can be usednewGraphName
- 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()
Convenience method aroundsimplifyAsync(String)
passing null as getId()- Returns:
- the resulting graph
-
simplifyAsync
public PgxFuture<PgxGraph> simplifyAsync(java.lang.String newGraphName)
Convenience method forsimplifyAsync(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
- StrategyType as
-
simplifyAsync
public PgxFuture<PgxGraph> simplifyAsync(PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.TrivialVertices trivialVertices, PgxGraph.Mode mode, java.lang.String newGraphName)
Convenience method forsimplifyAsync(Collection, Collection, MultiEdges, SelfEdges, TrivialVertices, Mode, String)
Passing- Collection(vertexProperties) as
VertexProperty.ALL
- Collection(edgeProperties) as
EdgeProperty.ALL
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:
multiEdges
- defines if multi-edges should be kept in the result. ConstantsPgxGraph.MultiEdges.KEEP_MULTI_EDGES
orPgxGraph.MultiEdges.REMOVE_MULTI_EDGES
can be usedselfEdges
- defines if self-edges should be kept in the result. ConstantsPgxGraph.SelfEdges.KEEP_SELF_EDGES
orPgxGraph.SelfEdges.REMOVE_SELF_EDGES
can be used.trivialVertices
- defines if isolated nodes should be kept in the result. ConstantsPgxGraph.TrivialVertices.KEEP_TRIVIAL_VERTICES
orPgxGraph.TrivialVertices.REMOVE_TRIVIAL_VERTICES
can be usedmode
- defines if a copy of the graph should be created, otherwise graph is mutated in place. ConstantsPgxGraph.Mode.MUTATE_IN_PLACE
orPgxGraph.Mode.CREATE_COPY
can be usednewGraphName
- name of the new graph (only relevant if mode ==PgxGraph.Mode.CREATE_COPY
). If null, a name will be generated.- Returns:
- resulting graph
- Collection(vertexProperties) as
-
simplifyAsync
public PgxFuture<PgxGraph> simplifyAsync(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.TrivialVertices trivialVertices, PgxGraph.Mode mode, java.lang.String newGraphName)
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:
vertexProps
- vertex properties that should be kept in the mutated graph. ConstantsVertexProperty.ALL
orVertexProperty.NONE
can be used.edgeProps
- edge properties that should be kept in the mutated graph. ConstantsEdgeProperty.ALL
orEdgeProperty.NONE
can be used.multiEdges
- defines if multi-edges should be kept in the result. ConstantsPgxGraph.MultiEdges.KEEP_MULTI_EDGES
orPgxGraph.MultiEdges.REMOVE_MULTI_EDGES
can be usedselfEdges
- defines if self-edges should be kept in the result. ConstantsPgxGraph.SelfEdges.KEEP_SELF_EDGES
orPgxGraph.SelfEdges.REMOVE_SELF_EDGES
can be used.trivialVertices
- defines if isolated nodes should be kept in the result. ConstantsPgxGraph.TrivialVertices.KEEP_TRIVIAL_VERTICES
orPgxGraph.TrivialVertices.REMOVE_TRIVIAL_VERTICES
can be usedmode
- defines if a copy of the graph should be created, otherwise graph is mutated in place. ConstantsPgxGraph.Mode.MUTATE_IN_PLACE
orPgxGraph.Mode.CREATE_COPY
can be usednewGraphName
- name of the new graph (only relevant if mode ==PgxGraph.Mode.CREATE_COPY
). If null, a name will be generated.- Returns:
- resulting graph
-
simplifyAsync
public PgxFuture<PgxGraph> simplifyAsync(oracle.pgx.common.mutations.MutationStrategy mutationStrategy)
-
bipartiteSubGraphFromLeftSetAsync
public PgxFuture<BipartiteGraph> bipartiteSubGraphFromLeftSetAsync(VertexSet<?> vertexSet)
Create a bipartite version of this graph with the given vertex set being the left set.Convenience method around
bipartiteSubGraphFromLeftSetAsync(Collection, Collection, VertexSet, String, String)
passing vertexProps asVertexProperty.ALL
newGraphName, edgeProps asEdgeProperty.ALL
and isLeftPropName asnull
- Parameters:
vertexSet
- vertex set representing the left side- Returns:
- resulting graph
-
bipartiteSubGraphFromLeftSetAsync
public PgxFuture<BipartiteGraph> bipartiteSubGraphFromLeftSetAsync(VertexSet<?> vertexSet, java.lang.String newGraphName)
Create a bipartite version of this graph with the given vertex set being the left set.Convenience method around
bipartiteSubGraphFromLeftSetAsync(Collection, Collection, VertexSet, String, String)
passing newGraphName and isLeftPropName asnull
- Parameters:
vertexSet
- vertex set representing the left sidenewGraphName
- name of the new graph- Returns:
- resulting graph
-
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. ConstantsVertexProperty.ALL
orVertexProperty.NONE
can be used.edgeProps
- edge properties belonging to graph specified by graph to be transformed as well. ConstantsEdgeProperty.ALL
orEdgeProperty.NONE
can be used.vertexSet
- vertex set representing the left sidenewGraphName
- 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. ConstantsVertexProperty.ALL
orVertexProperty.NONE
can be used.edgeProps
- edge properties that should be kept in the mutated graph. ConstantsEdgeProperty.ALL
orEdgeProperty.NONE
can be used.vertexSet
- vertex set representing the left sidenewGraphName
- 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. ConstantsVertexProperty.ALL
orVertexProperty.NONE
can be used.edgeProps
- edge properties belonging to graph specified by graph to be transformed as well. ConstantsEdgeProperty.ALL
orEdgeProperty.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. ConstantsVertexProperty.ALL
orVertexProperty.NONE
can be used.edgeProps
- edge properties belonging to graph specified by graph to be transformed as well. ConstantsEdgeProperty.ALL
orEdgeProperty.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
- newGraphName as
-
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
- vertexProps as
-
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. ConstantsVertexProperty.ALL
orVertexProperty.NONE
can be used.edgeProps
- edge properties that should be kept in the mutated graph. ConstantsEdgeProperty.ALL
orEdgeProperty.NONE
can be used.e
- the sparsification coefficientnewGraphName
- 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
- newGraphName as
-
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 subgraphnewGraphName
- name of the new graph. If null, a name will be generated.- Returns:
- resulting graph
- vertexProps as
-
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. ConstantsVertexProperty.ALL
orVertexProperty.NONE
can be used.edgeProps
- edge properties that should be kept in the mutated graph. ConstantsEdgeProperty.ALL
orEdgeProperty.NONE
can be used.graphFilter
- GraphFilter object representing a filter expression that is applied to create the subgraphnewGraphName
- 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 ofcloneAsync(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
- Collection(vertexProperties) as
-
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. ConstantsVertexProperty.ALL
orVertexProperty.NONE
can be used.edgeProps
- edge properties belonging to graph specified by graph to be transformed as well. ConstantsEdgeProperty.ALL
orEdgeProperty.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 aPgxPath
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 pathdst
- destination vertex of the pathcost
- property holding the edge costs. Ifnull
, 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 aPgxPath
object from a sequence of vertices and edges.- Parameters:
nodeSequence
- the vertices to be used for the path creationedgeSequence
- 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 aAllPaths
object representing all the shortest paths from a single source to all the possible destinations (shortest regarding the given edge costs).- Parameters:
src
- source vertexcost
- property holding the edge costs. Ifnull
, 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 aPartition
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 anIllegalArgumentException
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)
- 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 PGQLnewGraphName
- 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 typeV
- 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 typeV
- vector property type- Parameters:
vertexPropertyList
- list of scalar vertex propertiesname
- name for the vector property. If notnull
, 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 propertiesname
- name for the vector property. If notnull
, 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. ConstantsProperties.ALL
orProperties.NONE
can be used.edgeProps
- list of edge properties belonging to graph specified by graph to be published as well. ConstantsProperties.ALL
orProperties.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. ConstantsProperties.ALL
orProperties.NONE
can be used.edgeProps
- list of edge properties belonging to graph specified by graph to be published as well. ConstantsProperties.ALL
orProperties.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. Returnsnull
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 grantPgxResourcePermission.MANAGE
.- Parameters:
user
- the user the permission is granted topermission
- 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 grantPgxResourcePermission.MANAGE
.- Parameters:
role
- the role the permission is granted topermission
- 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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classPgxManagedObject
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classPgxManagedObject
-
getRandomVertex
public <ID> PgxVertex<ID> getRandomVertex()
Blocking version ofgetRandomVertexAsync()
. CallsgetRandomVertexAsync()
and waits for returnedPgxFuture
to complete.- Since:
- 2.5.0
-
getRandomEdge
public PgxEdge getRandomEdge()
Blocking version ofgetRandomEdgeAsync()
. CallsgetRandomEdgeAsync()
and waits for returnedPgxFuture
to complete.
-
hasVertexLabels
public boolean hasVertexLabels()
Blocking version ofhasVertexLabelsAsync()
. CallshasVertexLabelsAsync()
and waits for returnedPgxFuture
to complete.
-
getVertexLabels
public <ID> VertexLabels<ID> getVertexLabels()
Blocking version ofgetVertexLabelsAsync()
. CallsgetVertexLabelsAsync()
and waits for the returnedPgxFuture
to complete.
-
getEdgeLabel
public EdgeLabel getEdgeLabel()
Blocking version ofgetEdgeLabelAsync()
. CallsgetEdgeLabelAsync()
and waits for the returnedPgxFuture
to complete.
-
hasEdgeLabel
public boolean hasEdgeLabel()
Blocking version ofhasEdgeLabelAsync()
. CallshasEdgeLabelAsync()
and waits for returnedPgxFuture
to complete.
-
getVertexProperties
public java.util.Set<VertexProperty<?,?>> getVertexProperties()
Blocking version ofgetVertexPropertiesAsync()
. CallsgetVertexPropertiesAsync()
and waits for returnedPgxFuture
to complete.
-
getEdgeProperties
public java.util.Set<EdgeProperty<?>> getEdgeProperties()
Blocking version ofgetEdgePropertiesAsync()
. CallsgetEdgePropertiesAsync()
and waits for returnedPgxFuture
to complete.
-
getVertexProperty
public <ID,V> VertexProperty<ID,V> getVertexProperty(java.lang.String name)
Blocking version ofgetVertexPropertyAsync(String)
. CallsgetVertexPropertyAsync(String)
and waits for returnedPgxFuture
to complete.
-
getEdgeProperty
public <V> EdgeProperty<V> getEdgeProperty(java.lang.String name)
Blocking version ofgetEdgePropertyAsync(String)
. CallsgetEdgePropertyAsync(String)
and waits for returnedPgxFuture
to complete.
-
getVertexProperty
public <ID,V> VertexProperty<ID,V> getVertexProperty(Namespace namespace, java.lang.String name)
Blocking version ofgetVertexPropertyAsync(Namespace, String)
. CallsgetVertexPropertyAsync(Namespace, String)
and waits for returnedPgxFuture
to complete.
-
getEdgeProperty
public <V> EdgeProperty<V> getEdgeProperty(Namespace namespace, java.lang.String name)
Blocking version ofgetEdgePropertyAsync(Namespace, String)
. CallsgetEdgePropertyAsync(Namespace, String)
and waits for returnedPgxFuture
to complete.
-
store
public FileGraphConfig store(Format targetFormat, java.lang.String targetPath) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(Format, String)
. CallsstoreAsync(Format, String)
and waits for returnedPgxFuture
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 ofstoreAsync(ProviderFormat, String)
. CallsstoreAsync(ProviderFormat, String)
and waits for returnedPgxFuture
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 ofstoreAsync(ProviderFormat, String, Set, Set)
. CallsstoreAsync(ProviderFormat, String)
and waits for returnedPgxFuture
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 ofstoreAsync(Format, String, boolean)
. CallsstoreAsync(Format, String, boolean)
and waits for returnedPgxFuture
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 ofstoreAsync(ProviderFormat, String, boolean)
. CallsstoreAsync(Format, String, boolean)
and waits for returnedPgxFuture
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
Blocking version ofstoreAsync(ProviderFormat, String, boolean)
. CallsstoreAsync(ProviderFormat, String, Set, Set, boolean)
and waits for returnedPgxFuture
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, java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, boolean overwrite) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(Format, String, Collection, Collection, boolean)
. CallsstoreAsync(Format, String, Collection, Collection, boolean)
and waits for returnedPgxFuture
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, java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, boolean overwrite) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(ProviderFormat, String, Collection, Collection, boolean)
. CallsstoreAsync(Format, String, Collection, Collection, boolean)
and waits for returnedPgxFuture
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, java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, boolean overwrite) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(ProviderFormat, String, Set, Set, Collection, Collection, boolean)
. CallsstoreAsync(Format, String, Collection, Collection, boolean)
and waits for returnedPgxFuture
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) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(Format, String, int)
. CallsstoreAsync(Format, String, int)
and waits for returnedPgxFuture
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 ofstoreAsync(ProviderFormat, String, int)
. CallsstoreAsync(ProviderFormat, String, int)
and waits for returnedPgxFuture
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 ofstoreAsync(ProviderFormat, String, int, Set, Set)
. CallsstoreAsync(ProviderFormat, String, int)
and waits for returnedPgxFuture
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 ofstoreAsync(Format, String, int, boolean)
. CallsstoreAsync(Format, String, int, boolean)
and waits for returnedPgxFuture
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, boolean overwrite) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(ProviderFormat, String, int, boolean)
. CallsstoreAsync(ProviderFormat, String, int, boolean)
and waits for returnedPgxFuture
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, boolean overwrite) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version of {@link #storeAsync(ProviderFormat, String, int, Set, Set, , boolean)}. CallsstoreAsync(ProviderFormat, String, int, boolean)
and waits for returnedPgxFuture
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, java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, boolean overwrite) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(Format, String, int, Collection, Collection, boolean)
. CallsstoreAsync(Format, String, int, Collection, Collection, boolean)
and waits for returnedPgxFuture
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.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, boolean overwrite) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(ProviderFormat, String, int, Collection, Collection, boolean)
. CallsstoreAsync(ProviderFormat, String, int, Collection, Collection, boolean)
and waits for returnedPgxFuture
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, java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, boolean overwrite) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(ProviderFormat, String, int, Set, Set, Collection, Collection, boolean)
. CallsstoreAsync(ProviderFormat, String, int, Collection, Collection, boolean)
and waits for returnedPgxFuture
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, FileGraphStoringConfig storingConfig) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(Format, FileGraphStoringConfig)
. CallsstoreAsync(Format, FileGraphStoringConfig)
and waits for returnedPgxFuture
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.util.Map<java.lang.String,FileGraphStoringConfig> vertexStoringConfigs, java.util.Map<java.lang.String,FileGraphStoringConfig> edgeStoringConfigs) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(ProviderFormat, Map, Map)
. CallsstoreAsync(ProviderFormat, Map, Map)
and waits for returnedPgxFuture
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 FileGraphConfig store(Format targetFormat, FileGraphStoringConfig storingConfig, boolean overwrite) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(Format, FileGraphStoringConfig, boolean)
. CallsstoreAsync(Format, FileGraphStoringConfig, boolean)
and waits for returnedPgxFuture
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.util.Map<java.lang.String,FileGraphStoringConfig> vertexStoringConfigs, java.util.Map<java.lang.String,FileGraphStoringConfig> edgeStoringConfigs, boolean overwrite) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(ProviderFormat, Map, Map, boolean)
. CallsstoreAsync(ProviderFormat, Map, Map, boolean)
and waits for returnedPgxFuture
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.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) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(ProviderFormat, Set, Set, Map, Map, boolean)
. CallsstoreAsync(ProviderFormat, Map, Map, boolean)
and waits for returnedPgxFuture
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, FileGraphStoringConfig storingConfig, java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, boolean overwrite) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(Format, FileGraphStoringConfig, Collection, Collection, boolean)
. CallsstoreAsync(Format, FileGraphStoringConfig, Collection, Collection, boolean)
and waits for returnedPgxFuture
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.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) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(ProviderFormat, Map, Map, Collection, Collection, boolean)
. CallsstoreAsync(ProviderFormat, Map, Map, Collection, Collection, boolean)
and waits for returnedPgxFuture
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.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) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstoreAsync(ProviderFormat, Set, Set, Map, Map, Collection, Collection, boolean)
. CallsstoreAsync(ProviderFormat, Map, Map, Collection, Collection, boolean)
and waits for returnedPgxFuture
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 ofstoreAsync(GraphConfig, boolean)
. CallsstoreAsync(GraphConfig, boolean)
and waits for returnedPgxFuture
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 ofstoreAsync(GraphConfig, Set, Set, boolean)
. CallsstoreAsync(GraphConfig, boolean)
and waits for returnedPgxFuture
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 ofisFreshAsync()
. CallsisFreshAsync()
and waits for the returnedPgxFuture
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.
-
createScalar
public <T> Scalar<T> createScalar(PropertyType type, java.lang.String newScalarName)
Blocking version ofcreateScalarAsync(PropertyType, String)
. CallscreateScalarAsync(PropertyType, String)
and waits for the returnedPgxFuture
to complete.
-
createScalar
public <T> Scalar<T> createScalar(PropertyType type)
Blocking version ofcreateScalarAsync(PropertyType)
. CallscreateScalarAsync(PropertyType)
and waits for the returnedPgxFuture
to complete.
-
createVectorScalar
public <T> Scalar<PgxVect<T>> createVectorScalar(PropertyType type, int dimension, java.lang.String newScalarName)
Blocking version ofcreateVectorScalarAsync(PropertyType, int, String)
. CallscreateVectorScalarAsync(PropertyType, int, String)
and waits for the returnedPgxFuture
to complete.
-
createVectorScalar
public <T> Scalar<PgxVect<T>> createVectorScalar(PropertyType type, int dimension)
Blocking version ofcreateVectorScalarAsync(PropertyType, int)
. CallscreateVectorScalarAsync(PropertyType, int)
and waits for the returnedPgxFuture
to complete.
-
createVertexProperty
public <ID,V> VertexProperty<ID,V> createVertexProperty(PropertyType type)
Blocking version ofcreateVertexPropertyAsync(PropertyType)
. CallscreateVertexPropertyAsync(PropertyType)
and waits for returnedPgxFuture
to complete.
-
createVertexProperty
public <ID,V> VertexProperty<ID,V> createVertexProperty(PropertyType type, java.lang.String name)
Blocking version ofcreateVertexPropertyAsync(PropertyType, String)
. CallscreateVertexPropertyAsync(PropertyType, String)
and waits for returnedPgxFuture
to complete.
-
getOrCreateVertexProperty
public <ID,V> VertexProperty<ID,V> getOrCreateVertexProperty(PropertyType type, java.lang.String name)
Blocking version ofgetOrCreateVertexPropertyAsync(PropertyType, String)
. CallsgetOrCreateVertexPropertyAsync(PropertyType, String)
and waits for returnedPgxFuture
to complete.- Since:
- 3.1.0
-
createVertexProperty
public <ID,V> VertexProperty<ID,V> createVertexProperty(PropertyType type, int dimension, java.lang.String name, boolean hardName)
Blocking version ofcreateVertexPropertyAsync(PropertyType, int, String, boolean)
. CallscreateVertexPropertyAsync(PropertyType, int, String, boolean)
and waits for returnedPgxFuture
to complete.
-
createVertexVectorProperty
public <ID,V> VertexProperty<ID,PgxVect<V>> createVertexVectorProperty(PropertyType type, int dimension, java.lang.String name)
Blocking version ofcreateVertexVectorPropertyAsync(PropertyType, int, String)
. CallscreateVertexVectorPropertyAsync(PropertyType, int, String)
and waits for returnedPgxFuture
to complete.
-
getOrCreateVertexVectorProperty
public <ID,V> VertexProperty<ID,PgxVect<V>> getOrCreateVertexVectorProperty(PropertyType type, int dimension, java.lang.String name)
Blocking version ofgetOrCreateVertexVectorPropertyAsync(PropertyType, int, String)
. CallsgetOrCreateVertexVectorPropertyAsync(PropertyType, int, String)
and waits for returnedPgxFuture
to complete.- Since:
- 3.1.0
-
createVertexVectorProperty
public <ID,V> VertexProperty<ID,PgxVect<V>> createVertexVectorProperty(PropertyType type, int dimension)
Blocking version ofcreateVertexVectorPropertyAsync(PropertyType, int)
. CallscreateVertexVectorPropertyAsync(PropertyType, int)
and waits for returnedPgxFuture
to complete.
-
createEdgeProperty
public <V> EdgeProperty<V> createEdgeProperty(PropertyType type)
Blocking version ofcreateEdgePropertyAsync(PropertyType)
. CallscreateEdgePropertyAsync(PropertyType)
and waits for returnedPgxFuture
to complete.
-
createEdgeProperty
public <V> EdgeProperty<V> createEdgeProperty(PropertyType type, java.lang.String name)
Blocking version ofcreateEdgePropertyAsync(PropertyType, String)
. CallscreateEdgePropertyAsync(PropertyType, String)
and waits for returnedPgxFuture
to complete.
-
getOrCreateEdgeProperty
public <V> EdgeProperty<V> getOrCreateEdgeProperty(PropertyType type, java.lang.String name)
Blocking version ofgetOrCreateEdgePropertyAsync(PropertyType, String)
. CallsgetOrCreateEdgePropertyAsync(PropertyType, String)
and waits for returnedPgxFuture
to complete.- Since:
- 3.1.0
-
createEdgeProperty
public <V> EdgeProperty<V> createEdgeProperty(PropertyType type, int dimension, java.lang.String name, boolean hardName)
Blocking version ofcreateEdgePropertyAsync(PropertyType, int, String, boolean)
. CallscreateEdgePropertyAsync(PropertyType, int, String, boolean)
and waits for returnedPgxFuture
to complete.
-
createEdgeVectorProperty
public <V> EdgeProperty<PgxVect<V>> createEdgeVectorProperty(PropertyType type, int dimension, java.lang.String name)
Blocking version ofcreateEdgeVectorPropertyAsync(PropertyType, int, String)
. CallscreateEdgeVectorPropertyAsync(PropertyType, int, String)
and waits for returnedPgxFuture
to complete.
-
getOrCreateEdgeVectorProperty
public <V> EdgeProperty<PgxVect<V>> getOrCreateEdgeVectorProperty(PropertyType type, int dimension, java.lang.String name)
Blocking version ofgetOrCreateEdgeVectorPropertyAsync(PropertyType, int, String)
. CallsgetOrCreateEdgeVectorPropertyAsync(PropertyType, int, String)
and waits for returnedPgxFuture
to complete.- Since:
- 3.1.0
-
createEdgeVectorProperty
public <V> EdgeProperty<PgxVect<V>> createEdgeVectorProperty(PropertyType type, int dimension)
Blocking version ofcreateEdgeVectorPropertyAsync(PropertyType, int)
. CallscreateEdgeVectorPropertyAsync(PropertyType, int)
and waits for returnedPgxFuture
to complete.
-
createVertexSequence
public <E> VertexSequence<E> createVertexSequence()
Blocking version ofcreateVertexSequenceAsync()
. CallscreateVertexSequenceAsync()
and waits for returnedPgxFuture
to complete.
-
createVertexSequence
public <E> VertexSequence<E> createVertexSequence(java.lang.String name)
Blocking version ofcreateVertexSequenceAsync(String)
. CallscreateVertexSequenceAsync(String)
and waits for returnedPgxFuture
to complete.
-
createVertexSet
public <E> VertexSet<E> createVertexSet()
Blocking version ofcreateVertexSetAsync()
. CallscreateVertexSetAsync()
and waits for returnedPgxFuture
to complete.
-
createVertexSet
public <E> VertexSet<E> createVertexSet(java.lang.String name)
Blocking version ofcreateVertexSetAsync(String)
. CallscreateVertexSetAsync(String)
and waits for returnedPgxFuture
to complete.
-
createEdgeSequence
public EdgeSequence createEdgeSequence()
Blocking version ofcreateEdgeSequenceAsync()
. CallscreateEdgeSequenceAsync()
and waits for returnedPgxFuture
to complete.
-
createEdgeSequence
public EdgeSequence createEdgeSequence(java.lang.String name)
Blocking version ofcreateEdgeSequenceAsync(String)
. CallscreateEdgeSequenceAsync(String)
and waits for returnedPgxFuture
to complete.
-
createEdgeSet
public EdgeSet createEdgeSet()
Blocking version ofcreateEdgeSetAsync()
. CallscreateEdgeSetAsync()
and waits for the returnedPgxFuture
to complete.
-
createEdgeSet
public EdgeSet createEdgeSet(java.lang.String name)
Blocking version ofcreateEdgeSetAsync(String)
. CallscreateEdgeSetAsync(String)
and waits for the returnedPgxFuture
to complete.
-
createMap
public <K,V> PgxMap<K,V> createMap(PropertyType keyType, PropertyType valType)
Blocking version ofcreateMapAsync(PropertyType, PropertyType)
. CallscreateMapAsync(PropertyType, PropertyType)
and waits for the returnedPgxFuture
to complete.
-
createMap
public <K,V> PgxMap<K,V> createMap(PropertyType keyType, PropertyType valType, java.lang.String mapName)
Blocking version ofcreateMapAsync(PropertyType, PropertyType, String)
. CallscreateMapAsync(PropertyType, PropertyType, String)
and waits for the returnedPgxFuture
to complete.
-
sortByDegree
public PgxGraph sortByDegree() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofsortByDegreeAsync()
. CallssortByDegreeAsync()
and waits for the returnedPgxFuture
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 ofsortByDegreeAsync(String)
. CallssortByDegreeAsync(String)
and waits for the returnedPgxFuture
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(PgxGraph.SortOrder sortOrder, PgxGraph.Degree degree, PgxGraph.Mode mode, java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofsortByDegreeAsync(SortOrder, Degree, Mode, String)
. CallssortByDegreeAsync(SortOrder, Degree, Mode, String)
and waits for the returnedPgxFuture
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.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, PgxGraph.SortOrder sortOrder, PgxGraph.Degree degree, PgxGraph.Mode mode, java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofsortByDegreeAsync(Collection, Collection, SortOrder, Degree, Mode, String)
. CallssortByDegreeAsync(Collection, Collection, SortOrder, Degree, Mode, String)
and waits for the returnedPgxFuture
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
Blocking version oftransposeAsync(Collection, Collection, Map, Mode, String)
- 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 oftransposeAsync(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 oftransposeAsync(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 oftransposeAsync(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 oftransposeAsync()
- 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 ofundirectAsync()
. CallsundirectAsync()
and waits for the returnedPgxFuture
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 ofundirectAsync(String)
. CallsundirectAsync(String)
and waits for the returnedPgxFuture
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.
-
undirect
public PgxGraph undirect(PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.Mode mode, java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofundirectAsync(MultiEdges, SelfEdges, Mode, String)
. CallsundirectAsync(MultiEdges, SelfEdges, Mode, String)
and waits for the returnedPgxFuture
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.
-
undirect
public PgxGraph undirect(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.TrivialVertices trivialVertices, PgxGraph.Mode mode, java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofundirectAsync(Collection, Collection, MultiEdges, SelfEdges, Mode, String)
. CallsundirectAsync(Collection, Collection, MultiEdges, SelfEdges, Mode, String)
and waits for the returnedPgxFuture
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 newMergingStrategyBuilder
that can be used to build a newMutationStrategy
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 newPickingStrategyBuilder
that can be used to build a newPickingStrategy
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 ofsimplifyAsync()
. CallssimplifyAsync()
and waits for the returnedPgxFuture
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 ofsimplifyAsync(String)
. CallssimplifyAsync(String)
and waits for the returnedPgxFuture
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(PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.TrivialVertices trivialVertices, PgxGraph.Mode mode, java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofsimplifyAsync(MultiEdges, SelfEdges, TrivialVertices, Mode, String)
. CallssimplifyAsync(MultiEdges, SelfEdges, TrivialVertices, Mode, String)
and waits for the returnedPgxFuture
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(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, PgxGraph.MultiEdges multiEdges, PgxGraph.SelfEdges selfEdges, PgxGraph.TrivialVertices trivialVertices, PgxGraph.Mode mode, java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofsimplifyAsync(Collection, Collection, MultiEdges, SelfEdges, TrivialVertices, Mode, String)
. CallssimplifyAsync(Collection, Collection, MultiEdges, SelfEdges, TrivialVertices, Mode, String)
and waits for the returnedPgxFuture
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 ofbipartiteSubGraphFromLeftSetAsync(VertexSet)
. CallsbipartiteSubGraphFromLeftSetAsync(VertexSet)
and waits for the returnedPgxFuture
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, java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofbipartiteSubGraphFromLeftSetAsync(VertexSet, String)
. CallsbipartiteSubGraphFromLeftSetAsync(VertexSet, String)
and waits for the returnedPgxFuture
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(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, VertexSet<?> vertexSet, java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofbipartiteSubGraphFromLeftSetAsync(Collection, Collection, VertexSet, String)
. CallsbipartiteSubGraphFromLeftSetAsync(Collection, Collection, VertexSet, String)
and waits for the returnedPgxFuture
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(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, VertexSet<?> vertexSet, java.lang.String newGraphName, java.lang.String isLeftPropName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofbipartiteSubGraphFromLeftSetAsync(Collection, Collection, VertexSet, String, String)
. CallsbipartiteSubGraphFromLeftSetAsync(Collection, Collection, VertexSet, String, String)
and waits for the returnedPgxFuture
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 ofbipartiteSubGraphFromInDegreeAsync()
. CallsbipartiteSubGraphFromInDegreeAsync()
and waits for the returnedPgxFuture
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 ofbipartiteSubGraphFromInDegreeAsync(String)
. CallsbipartiteSubGraphFromInDegreeAsync(String)
and waits for the returnedPgxFuture
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.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofbipartiteSubGraphFromInDegreeAsync(Collection, Collection, String)
. CallsbipartiteSubGraphFromInDegreeAsync(Collection, Collection, String)
and waits for the returnedPgxFuture
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.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, java.lang.String newGraphName, java.lang.String isLeftPropName, boolean inPlace) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofbipartiteSubGraphFromInDegreeAsync(Collection, Collection, String, String, boolean)
. CallsbipartiteSubGraphFromInDegreeAsync(Collection, Collection, String, String, boolean)
and waits for the returnedPgxFuture
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 ofisBipartiteGraphAsync(VertexProperty)
. CallsisBipartiteGraphAsync(VertexProperty)
and waits for the returnedPgxFuture
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 ofsparsifyAsync(double)
. CallssparsifyAsync(double)
and waits for the returnedPgxFuture
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 ofsparsifyAsync(double, String)
. CallssparsifyAsync(double, String)
and waits for the returnedPgxFuture
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(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, double e, java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofsparsifyAsync(Collection, Collection, double, String)
. CallssparsifyAsync(Collection, Collection, double, String)
and waits for the returnedPgxFuture
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 offilterAsync(GraphFilter)
. CallsfilterAsync(GraphFilter)
and waits for the returnedPgxFuture
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 offilterAsync(GraphFilter, String)
. CallsfilterAsync(GraphFilter, String)
and waits for the returnedPgxFuture
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(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, GraphFilter graphFilter, java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version offilterAsync(Collection, Collection, GraphFilter, String)
. CallsfilterAsync(Collection, Collection, GraphFilter, String)
and waits for the returnedPgxFuture
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.
-
clone
public PgxGraph clone()
Blocking version ofcloneAsync()
. CallscloneAsync()
and waits for the returnedPgxFuture
to complete.
-
clone
public PgxGraph clone(java.lang.String newGraphName)
Blocking version ofcloneAsync(String)
. CallscloneAsync(String)
and waits for the returnedPgxFuture
to complete.
-
clone
public PgxGraph clone(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps, java.lang.String newGraphName)
Blocking version ofcloneAsync()
. CallscloneAsync()
and waits for the returnedPgxFuture
to complete.
-
createPath
public <ID> PgxPath<ID> createPath(PgxVertex<ID> src, PgxVertex<ID> dst, EdgeProperty<java.lang.Double> cost, VertexProperty<ID,PgxVertex<ID>> parent, VertexProperty<ID,PgxEdge> parentEdge)
Blocking version ofcreatePathAsync(PgxVertex, PgxVertex, EdgeProperty, VertexProperty, VertexProperty)
. CallscreatePathAsync(PgxVertex, PgxVertex, EdgeProperty, VertexProperty, VertexProperty)
and waits for the returnedPgxFuture
to complete.
-
createAllPaths
public <ID> AllPaths<ID> createAllPaths(PgxVertex<ID> src, EdgeProperty<java.lang.Double> cost, VertexProperty<ID,java.lang.Double> dist, VertexProperty<ID,PgxVertex<ID>> parent, VertexProperty<ID,PgxEdge> parentEdge)
Blocking version ofcreateAllPathsAsync(PgxVertex, EdgeProperty, VertexProperty, VertexProperty, VertexProperty)
. CallscreateAllPathsAsync(PgxVertex, EdgeProperty, VertexProperty, VertexProperty, VertexProperty)
and waits for the returnedPgxFuture
to complete.
-
createComponents
public <ID> Partition<ID> createComponents(VertexProperty<ID,java.lang.Long> components, long numComponents)
Blocking version ofcreateComponentsAsync(VertexProperty, long)
. CallscreateComponentsAsync(VertexProperty, long)
and waits for returnedPgxFuture
to complete.
-
getVertices
public <E> VertexSet<E> getVertices(VertexFilter filter) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
Blocking version ofgetVerticesAsync(VertexFilter)
. CallsgetVerticesAsync(VertexFilter)
and waits for returnedPgxFuture
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 ofgetVerticesAsync(VertexFilter, String)
. CallsgetVerticesAsync(VertexFilter, String)
and waits for returnedPgxFuture
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()
Blocking version ofgetVerticesAsync()
. CallsgetVerticesAsync()
and waits for returnedPgxFuture
to complete.
-
getEdges
public EdgeSet getEdges(EdgeFilter filter) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
Blocking version ofgetEdges(EdgeFilter)
. CallsgetEdgesAsync(EdgeFilter)
and waits for returnedPgxFuture
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 ofgetEdges(EdgeFilter, String)
. CallsgetEdgesAsync(EdgeFilter, String)
and waits for returnedPgxFuture
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()
-
queryPgql
public PgqlResultSet queryPgql(java.lang.String pgqlString) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofqueryPgql(String)
. CallsqueryPgqlAsync(String)
and waits for the returnedPgxFuture
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 ofexecutePgqlAsync(String)
. CallsexecutePgqlAsync(String)
and waits for the returnedPgxFuture
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 ofcloneAndExecutePgqlAsync(String)
. CallscloneAndExecutePgqlAsync(String)
and waits for the returnedPgxFuture
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 ofcloneAndExecutePgqlAsync(String, String)
. CallscloneAndExecutePgqlAsync(String, String)
and waits for the returnedPgxFuture
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
-
preparePgql
public PgxPreparedStatement preparePgql(java.lang.String pgqlString)
Blocking version ofpreparePgql(String)
. CallspreparePgqlAsync(String)
and waits for the returnedPgxFuture
to complete.
-
explainPgql
public Operation explainPgql(java.lang.String pgqlString) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofexplainPgql(String)
. CallsexplainPgqlAsync(String)
and waits for the returnedPgxFuture
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.
-
getVertex
public <ID> PgxVertex<ID> getVertex(ID id)
Blocking version ofgetVertexAsync(Object)
. CallsgetVertexAsync(Object)
and waits for the returnedPgxFuture
to complete.
-
getEdge
public PgxEdge getEdge(long id)
Blocking version ofgetEdgeAsync(long)
CallsgetEdgeAsync(long)
and waits for the returnedPgxFuture
to complete.
-
getEdge
public PgxEdge getEdge(java.lang.String id)
Blocking version ofgetEdgeAsync(long)
CallsgetEdgeAsync(long)
and waits for the returnedPgxFuture
to complete.
-
hasVertex
public <ID> boolean hasVertex(ID id)
Blocking version ofhasVertexAsync(Object)
. CallshasVertexAsync(Object)
and waits for the returnedPgxFuture
to complete.
-
hasEdge
public boolean hasEdge(long id)
Blocking version ofhasEdgeAsync(long)
CallshasEdgeAsync(long)
and waits for the returnedPgxFuture
to complete.
-
hasEdge
public boolean hasEdge(java.lang.String id)
Blocking version ofhasEdgeAsync(long)
CallshasEdgeAsync(String)
and waits for the returnedPgxFuture
to complete.
-
combineVertexPropertiesIntoVectorProperty
public <ID,V> VertexProperty<ID,PgxVect<V>> combineVertexPropertiesIntoVectorProperty(java.util.List<VertexProperty<ID,V>> vertexPropertyList) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofcombineVertexPropertiesIntoVectorPropertyAsync(List)
CallscombineVertexPropertiesIntoVectorPropertyAsync(List)
and waits for the returnedPgxFuture
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.
-
combineVertexPropertiesIntoVectorProperty
public <ID,V> VertexProperty<ID,PgxVect<V>> combineVertexPropertiesIntoVectorProperty(java.util.List<VertexProperty<ID,V>> vertexPropertyList, java.lang.String name) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofcombineVertexPropertiesIntoVectorPropertyAsync(List, String)
CallscombineVertexPropertiesIntoVectorPropertyAsync(List, String)
and waits for the returnedPgxFuture
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.
-
combineEdgePropertiesIntoVectorProperty
public <E> EdgeProperty<PgxVect<E>> combineEdgePropertiesIntoVectorProperty(java.util.List<EdgeProperty<E>> edgePropertyList) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofcombineEdgePropertiesIntoVectorPropertyAsync(List)
CallscombineEdgePropertiesIntoVectorPropertyAsync(List)
and waits for the returnedPgxFuture
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.
-
combineEdgePropertiesIntoVectorProperty
public <E> EdgeProperty<PgxVect<E>> combineEdgePropertiesIntoVectorProperty(java.util.List<EdgeProperty<E>> edgePropertyList, java.lang.String name) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofcombineEdgePropertiesIntoVectorPropertyAsync(List, String)
CallscombineEdgePropertiesIntoVectorPropertyAsync(List, String)
and waits for the returnedPgxFuture
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.
-
getCollections
public java.util.Map<java.lang.String,PgxCollection<? extends PgxEntity<?>,?>> getCollections()
Blocking version ofgetCollectionsAsync()
. CallsgetCollectionsAsync()
and waits for returnedPgxFuture
to complete.
-
publish
public void publish(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps)
-
rename
public void rename(java.lang.String newGraphName)
Blocking version ofrenameAsync(String)
. CallsrenameAsync(String)
and waits for the returnedPgxFuture
to complete.
-
publish
public void publish()
Blocking version ofpublishAsync()
. CallspublishAsync()
and waits for returnedPgxFuture
to complete.
-
publishWithSnapshots
public void publishWithSnapshots()
Blocking version ofpublishWithSnapshotsAsync()
. CallspublishWithSnapshotsAsync()
and waits for returnedPgxFuture
to complete.
-
publishWithSnapshots
public void publishWithSnapshots(java.util.Collection<VertexProperty<?,?>> vertexProps, java.util.Collection<EdgeProperty<?>> edgeProps)
Blocking version ofpublishWithSnapshotsAsync(Collection, Collection)
. CallspublishWithSnapshotsAsync(Collection, Collection)
and waits for returnedPgxFuture
to complete.
-
isPublished
public boolean isPublished()
Blocking version ofisPublishedAsync()
. CallsisPublishedAsync()
and waits for returnedPgxFuture
to complete.
-
isPublishedWithSnapshots
public boolean isPublishedWithSnapshots()
Blocking version ofisPublishedWithSnapshotsAsync()
. CallsisPublishedWithSnapshotsAsync()
and waits for returnedPgxFuture
to complete.
-
destroy
public void destroy()
Blocking version ofdestroyAsync()
. CallsdestroyAsync()
and waits for the returnedPgxFuture
to complete.- Overrides:
destroy
in classDestroyable
- Since:
- 20.2.1
-
destroyVertexPropertyIfExists
public void destroyVertexPropertyIfExists(java.lang.String name)
Blocking version ofdestroyVertexPropertyIfExistsAsync(String)
. CallsdestroyVertexPropertyIfExistsAsync(String)
and waits for the returnedPgxFuture
to complete.- Since:
- 3.1.0
-
destroyEdgePropertyIfExists
public void destroyEdgePropertyIfExists(java.lang.String name)
Blocking version ofdestroyEdgePropertyIfExistsAsync(String)
. CallsdestroyEdgePropertyIfExistsAsync(String)
and waits for the returnedPgxFuture
to complete.- Since:
- 3.1.0
-
getPermission
public PgxResourcePermission getPermission()
Blocking version ofgetPermissionAsync()
. CallsgetPermissionAsync()
and waits for the returnedPgxFuture
to complete.- Since:
- 21.3.0
-
grantPermission
public void grantPermission(PgxUser user, PgxResourcePermission permission)
Blocking version ofgrantPermissionAsync(PgxUser, PgxResourcePermission)
. CallsgrantPermissionAsync(PgxUser, PgxResourcePermission)
and waits for the returnedPgxFuture
to complete.- Since:
- 20.1.0
-
grantPermission
public void grantPermission(PgxRole role, PgxResourcePermission permission)
Blocking version ofgrantPermissionAsync(PgxRole, PgxResourcePermission)
. CallsgrantPermissionAsync(PgxRole, PgxResourcePermission)
and waits for the returnedPgxFuture
to complete.- Since:
- 20.1.0
-
revokePermission
public void revokePermission(PgxUser user)
Blocking version ofrevokePermissionAsync(PgxUser)
. CallsrevokePermissionAsync(PgxUser)
and waits for the returnedPgxFuture
to complete.- Since:
- 20.1.0
-
revokePermission
public void revokePermission(PgxRole role)
Blocking version ofrevokePermissionAsync(PgxRole)
. CallsrevokePermissionAsync(PgxRole)
and waits for the returnedPgxFuture
to complete.- Since:
- 20.1.0
-
createSynchronizer
public <T extends Synchronizer> Synchronizer 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 Synchronizer> Synchronizer 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 Synchronizer> Synchronizer 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
-
pin
public void pin()
-
unpin
public void unpin()
-
isPinned
public boolean isPinned()
Blocking version ofisPinnedAsync()
. CallsisPinnedAsync()
and waits for returnedPgxFuture
to complete.
-
-