Package org.neo4j.gds.core.loading
Class GraphStoreCatalogService
- java.lang.Object
-
- org.neo4j.gds.core.loading.GraphStoreCatalogService
-
public class GraphStoreCatalogService extends java.lang.Object
One day the graph catalog won't be a static thing, it'll instead be a dependency you inject here. One day.For now this service helps us engineer some other things. Calls are mostly 1-1, but we can do some handy and _simple_ adapting, to make calling code easier to test, without having to write separate tests for this class.
-
-
Constructor Summary
Constructors Constructor Description GraphStoreCatalogService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
ensureGraphDoesNotExist(User user, DatabaseId databaseId, GraphName graphName)
Predicate around @graphExistsvoid
ensureGraphExists(User user, DatabaseId databaseId, GraphName graphName)
Predicate around @graphExistsGraphStoreWithConfig
get(CatalogRequest catalogRequest, GraphName graphName)
java.util.stream.Stream<GraphStoreCatalog.GraphStoreWithUserNameAndConfig>
getAllGraphStores()
java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>
getDegreeDistribution(User user, DatabaseId databaseId, GraphName graphName)
java.util.Map<GraphProjectConfig,GraphStore>
getGraphStores(User user)
org.apache.commons.lang3.tuple.Pair<Graph,GraphStore>
getGraphWithGraphStore(GraphName graphName, AlgoBaseConfig config, java.util.Optional<java.lang.String> relationshipProperty, User user, DatabaseId databaseId)
boolean
graphExists(User user, DatabaseId databaseId, GraphName graphName)
long
graphStoreCount()
GraphStoreWithConfig
removeGraph(CatalogRequest request, GraphName graphName, boolean shouldFailIfMissing)
void
set(GraphProjectConfig configuration, GraphStore graphStore)
void
setDegreeDistribution(User user, DatabaseId databaseId, GraphName graphName, java.util.Map<java.lang.String,java.lang.Object> degreeDistribution)
-
-
-
Method Detail
-
graphExists
public boolean graphExists(User user, DatabaseId databaseId, GraphName graphName)
-
removeGraph
public GraphStoreWithConfig removeGraph(CatalogRequest request, GraphName graphName, boolean shouldFailIfMissing)
-
get
public GraphStoreWithConfig get(CatalogRequest catalogRequest, GraphName graphName)
-
getGraphWithGraphStore
public org.apache.commons.lang3.tuple.Pair<Graph,GraphStore> getGraphWithGraphStore(GraphName graphName, AlgoBaseConfig config, java.util.Optional<java.lang.String> relationshipProperty, User user, DatabaseId databaseId)
-
ensureGraphDoesNotExist
public void ensureGraphDoesNotExist(User user, DatabaseId databaseId, GraphName graphName)
Predicate around @graphExists- Throws:
java.lang.IllegalArgumentException
- if graph already exists in graph catalog
-
ensureGraphExists
public void ensureGraphExists(User user, DatabaseId databaseId, GraphName graphName)
Predicate around @graphExists- Throws:
java.lang.IllegalArgumentException
- if graph does not exist in graph catalog
-
getDegreeDistribution
public java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> getDegreeDistribution(User user, DatabaseId databaseId, GraphName graphName)
-
setDegreeDistribution
public void setDegreeDistribution(User user, DatabaseId databaseId, GraphName graphName, java.util.Map<java.lang.String,java.lang.Object> degreeDistribution)
-
getAllGraphStores
public java.util.stream.Stream<GraphStoreCatalog.GraphStoreWithUserNameAndConfig> getAllGraphStores()
-
graphStoreCount
public long graphStoreCount()
-
getGraphStores
public java.util.Map<GraphProjectConfig,GraphStore> getGraphStores(User user)
-
set
public void set(GraphProjectConfig configuration, GraphStore graphStore)
-
-