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 @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)
boolean
graphExists(User user, DatabaseId databaseId, GraphName graphName)
GraphStoreWithConfig
removeGraph(CatalogRequest request, GraphName graphName, boolean shouldFailIfMissing)
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)
-
ensureGraphDoesNotExist
public void ensureGraphDoesNotExist(User user, DatabaseId databaseId, GraphName graphName)
Predicate around @graphExists- Throws:
java.lang.IllegalArgumentException
- if graph already exists 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()
-
getGraphStores
public java.util.Map<GraphProjectConfig,GraphStore> getGraphStores(User user)
-
-