@Bean
Cluster cluster() {
cluster = Cluster.build().port(arcadedbServerPort).addContactPoint(arcadedbServerHost)
.credentials(arcadedbServerUserName, arcadedbServerPassword).create();
return cluster;
}
@Bean
GraphTraversalSource g(Cluster cluster) {
GraphTraversalSource g = traversal().withRemote(DriverRemoteConnection.using(cluster));
logger.debug("Graph Features=>: {}", g.getGraph());
// Using this line to create the conenction pool during server start up and to avoid creation during the first actual request.
logger.debug("Graph Total Vertex=>: {}", g.V().count().toList());
return g;
}
@PreDestroy
public void cleanArcadedbGraphCluster() {
if (cluster != null) {
cluster.close();
}
@Bean
Cluster cluster() {
cluster = Cluster.build().port(arcadedbServerPort).addContactPoint(arcadedbServerHost)
.credentials(arcadedbServerUserName, arcadedbServerPassword).create();
return cluster;
}
@Bean
GraphTraversalSource g(Cluster cluster) {
GraphTraversalSource g = traversal().withRemote(DriverRemoteConnection.using(cluster));
logger.debug("Graph Features=>: {}", g.getGraph());
// Using this line to create the conenction pool during server start up and to avoid creation during the first actual request.
logger.debug("Graph Total Vertex=>: {}", g.V().count().toList());
return g;
}
@PreDestroy
public void cleanArcadedbGraphCluster() {
if (cluster != null) {
cluster.close();
}