Module org.neo4j.bolt.connection
Package org.neo4j.bolt.connection
Interface BoltConnectionSource<T extends BoltConnectionParameters>
- Type Parameters:
T- the type of parameters supported
public interface BoltConnectionSource<T extends BoltConnectionParameters>
A source of Neo4j Bolt Protocol connections, typically to a
specific Neo4j DBMS or Neo4j server.
There are two main types of implementations at the moment:
- Pooling implementation - supplies
BoltConnectioninstance that is pooled automatically. - Routing implementation - supplies
BoltConnectioninstance that connects to a Neo4j DBMS cluster member that is selected based on automatically managed routing table information and theRoutedBoltConnectionParametersprovided by the user.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionclose()Closes theBoltConnectionSourceinstance.GetsBoltConnectionfrom the source.getConnection(T parameters) GetsBoltConnectionfrom the source using the providedBoltConnectionParameters.Checks if there is aBoltConnectionthat supports multi database feature.Checks if there is aBoltConnectionthat supports re-auth feature.Verifies connectivity.
-
Method Details
-
getConnection
CompletionStage<BoltConnection> getConnection()GetsBoltConnectionfrom the source.- Returns:
- the
BoltConnection
-
getConnection
GetsBoltConnectionfrom the source using the providedBoltConnectionParameters.- Parameters:
parameters- theBoltConnectionParameters- Returns:
- the
BoltConnection
-
verifyConnectivity
CompletionStage<Void> verifyConnectivity()Verifies connectivity.- Returns:
- the
CompletionStagethat fails of there is an issue
-
supportsMultiDb
CompletionStage<Boolean> supportsMultiDb()Checks if there is aBoltConnectionthat supports multi database feature.- Returns:
- the
CompletionStage
-
supportsSessionAuth
CompletionStage<Boolean> supportsSessionAuth()Checks if there is aBoltConnectionthat supports re-auth feature.- Returns:
- the
CompletionStage
-
close
CompletionStage<Void> close()Closes theBoltConnectionSourceinstance.- Returns:
- the close
CompletionStage
-