Skip to content

Commit ad030ed

Browse files
author
Zhen Li
committed
Renamed bolt+routing scheme to neo4j
1 parent 0e116b2 commit ad030ed

File tree

16 files changed

+90
-90
lines changed

16 files changed

+90
-90
lines changed

driver/src/main/java/org/neo4j/driver/Config.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ public ConfigBuilder withMaxConnectionLifetime( long value, TimeUnit unit )
498498
* Configure maximum amount of connections in the connection pool towards a single database. This setting
499499
* limits total amount of connections in the pool when used in direct driver, created for URI with 'bolt'
500500
* scheme. It will limit amount of connections per cluster member when used with routing driver, created for
501-
* URI with 'bolt+routing' scheme.
501+
* URI with 'neo4j' scheme.
502502
* <p>
503503
* Acquisition will be attempted for at most configured timeout
504504
* {@link #withConnectionAcquisitionTimeout(long, TimeUnit)} when limit is reached.

driver/src/main/java/org/neo4j/driver/Driver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@
5252
* <td>Direct driver: connects directly to the host and port specified in the URI.</td>
5353
* </tr>
5454
* <tr>
55-
* <td><code>bolt+routing</code></td>
55+
* <td><code>neo4j</code></td>
5656
* <td>Routing driver: can automatically discover members of a Causal Cluster and route {@link Session sessions} based on {@link AccessMode}.</td>
5757
* </tr>
5858
* </tbody>
5959
* </table>
6060
*
61-
* @since 1.0 (<em>bolt+routing</em> URIs since 1.1)
61+
* @since 1.0 (<em>neo4j</em> URIs since 1.1)
6262
*/
6363
public interface Driver extends AutoCloseable
6464
{

driver/src/main/java/org/neo4j/driver/GraphDatabase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ public static Driver driver( URI uri, AuthToken authToken, Config config )
137137
}
138138

139139
/**
140-
* Try to create a bolt+routing driver from the <b>first</b> available address.
140+
* Try to create a neo4j driver from the <b>first</b> available address.
141141
* This is wrapper for the {@link #driver} method that finds the <b>first</b>
142142
* server to respond positively.
143143
*
144144
* @param routingUris an {@link Iterable} of server {@link URI}s for Neo4j instances. All given URIs should
145-
* have 'bolt+routing' scheme.
145+
* have 'neo4j' scheme.
146146
* @param authToken authentication to use, see {@link AuthTokens}
147147
* @param config user defined configuration
148148
* @return a new driver instance

driver/src/main/java/org/neo4j/driver/internal/DriverFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
public class DriverFactory
6767
{
6868
public static final String BOLT_URI_SCHEME = "bolt";
69-
public static final String BOLT_ROUTING_URI_SCHEME = "bolt+routing";
69+
public static final String BOLT_ROUTING_URI_SCHEME = "neo4j";
7070

7171
public final Driver newInstance( URI uri, AuthToken authToken, RoutingSettings routingSettings,
7272
RetrySettings retrySettings, Config config )
@@ -165,7 +165,7 @@ protected InternalDriver createDirectDriver( SecurityPlan securityPlan, BoltServ
165165
}
166166

167167
/**
168-
* Creates new a new driver for "bolt+routing" scheme.
168+
* Creates new a new driver for "neo4j" scheme.
169169
* <p>
170170
* <b>This method is protected only for testing</b>
171171
*/

driver/src/test/java/org/neo4j/driver/GraphDatabaseTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void boltPlusDiscoverySchemeShouldInstantiateClusterDriver() throws Exception
8080
{
8181
// Given
8282
StubServer server = StubServer.start( "discover_servers.script", 9001 );
83-
URI uri = URI.create( "bolt+routing://127.0.0.1:9001" );
83+
URI uri = URI.create( "neo4j://127.0.0.1:9001" );
8484

8585
// When
8686
Driver driver = GraphDatabase.driver( uri, INSECURE_CONFIG );
@@ -97,7 +97,7 @@ void boltPlusDiscoverySchemeShouldInstantiateClusterDriver() throws Exception
9797
@SuppressWarnings( "deprecation" )
9898
void boltPlusDiscoverySchemeShouldNotSupportTrustOnFirstUse()
9999
{
100-
URI uri = URI.create( "bolt+routing://127.0.0.1:9001" );
100+
URI uri = URI.create( "neo4j://127.0.0.1:9001" );
101101

102102
Config config = Config.builder()
103103
.withEncryption()
@@ -129,15 +129,15 @@ void shouldLogWhenUnableToCreateRoutingDriver() throws Exception
129129
.build();
130130

131131
List<URI> routingUris = asList(
132-
URI.create( "bolt+routing://localhost:9001" ),
133-
URI.create( "bolt+routing://localhost:9002" ) );
132+
URI.create( "neo4j://localhost:9001" ),
133+
URI.create( "neo4j://localhost:9002" ) );
134134

135135
assertThrows( ServiceUnavailableException.class, () -> GraphDatabase.routingDriver( routingUris, AuthTokens.none(), config ) );
136136

137-
verify( logger ).warn( eq( "Unable to create routing driver for URI: bolt+routing://localhost:9001" ),
137+
verify( logger ).warn( eq( "Unable to create routing driver for URI: neo4j://localhost:9001" ),
138138
any( Throwable.class ) );
139139

140-
verify( logger ).warn( eq( "Unable to create routing driver for URI: bolt+routing://localhost:9002" ),
140+
verify( logger ).warn( eq( "Unable to create routing driver for URI: neo4j://localhost:9002" ),
141141
any( Throwable.class ) );
142142

143143
assertEquals( 0, server1.exitStatus() );

driver/src/test/java/org/neo4j/driver/integration/CredentialsIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ void directDriverShouldFailEarlyOnWrongCredentials()
169169
@Test
170170
void routingDriverShouldFailEarlyOnWrongCredentials()
171171
{
172-
testDriverFailureOnWrongCredentials( "bolt+routing://localhost:" + neo4j.boltPort() );
172+
testDriverFailureOnWrongCredentials( "neo4j://localhost:" + neo4j.boltPort() );
173173
}
174174

175175
private void testDriverFailureOnWrongCredentials( String uri )

driver/src/test/java/org/neo4j/driver/internal/DriverFactoryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class DriverFactoryTest
6767
{
6868
private static Stream<String> testUris()
6969
{
70-
return Stream.of( "bolt://localhost:7687", "bolt+routing://localhost:7687" );
70+
return Stream.of( "bolt://localhost:7687", "neo4j://localhost:7687" );
7171
}
7272

7373
@ParameterizedTest

0 commit comments

Comments
 (0)