Package org.neo4j.bolt.connection.netty
Class NettyBoltConnectionProviderFactory
java.lang.Object
org.neo4j.bolt.connection.netty.NettyBoltConnectionProviderFactory
- All Implemented Interfaces:
BoltConnectionProviderFactory
public final class NettyBoltConnectionProviderFactory
extends Object
implements BoltConnectionProviderFactory
A factory for creating instances of
BoltConnectionProvider.
The created instances support the following URI schemes:
- bolt, bolt+s, bolt+ssc - establishes a
BoltConnectionto a given address without routing context. In a clustered Neo4j DBMS the absense of routing context instructs the server to NOT carry out server-side routing even if it might be needed. TheURI.getQuery()part is prohibited as routing context is not supported. - neo4j, neo4j+s, neo4j+ssc - establishes a
BoltConnectionto a given address with routing context, which is automatically parsed from the connectionURI. In a clustered Neo4j DBMS the presence of routing context enables the server to perform server-side routing within the cluster if necessary. Effectively, using these schemes is sufficient for establishing a connection to a clustered Neo4j DBMS that has server-side routing enabled. However, it should NOT be confused with client-side routing that requires more contextual awareness and fitsBoltConnectionSourcewithRoutedBoltConnectionParameterssupport better. - bolt+unix - establishes a
BoltConnectionto a given Unix Domain Socket without routing context. TheURI.getPath()MUST be a valid path to a file (for example: bolt+unix:///var/run/neo4j.sock).
- eventLoopGroup - Sets
EventLoopGroupto be used instead of creating a new one. Defaults to null. - eventLoopThreads - Sets the number of Event Loop threads. Defaults to null. This option is used only when eventLoopGroup is null.
- localAddress - Sets
LocalAddressto be used instead ofURI. Defaults to null. - clock - Sets the
Clockto be used. Defaults toClock.systemUTC(). - domainNameResolver - Sets the
DomainNameResolverto be used. Defaults toDefaultDomainNameResolver.getInstance(). - maxVersion - Sets the meximum
BoltProtocolVersionthat will be negotiated. Defaults to null. - nettyTransport - Defines Netty transport to be used. Supported values: auto (default), nio, io_uring (requires adding io_uring dependency explicitly, Netty 4.2+ only), epoll (requires adding epoll dependency explicitly), kqueue (requires adding kqueue dependency explicitly), local. The default auto mode selects local when localAddress is provided, otherwise it attempts to detect if native transport is available in runtime (the dependency needs to be added explicitly) and falls back to nio otherwise. When eventLoopGroup is not null, this option defaults to nio.
- enableFastOpen - Enables client-side TCP Fast Open if it is available. Supported values: true and false (default). Note that only Netty native transports support this and extra system configuration may be needed. When either native transport or TCP Fast Open is unavaible, this option is ignored and is effectively false.
- preferredCapabilities - A
Setof preferredBoltCapabilitythat should be selected when server offers support for them during Bolt handshake. This set or individual entries in the set are ignored when no support is available or handshake does not support this feature at all.
- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of this factory. -
Method Summary
Modifier and TypeMethodDescriptioncreate(LoggingProvider loggingProvider, ValueFactory valueFactory, ObservationProvider observationProvider, Map<String, ?> additionalConfig) booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.neo4j.bolt.connection.BoltConnectionProviderFactory
getOrder
-
Constructor Details
-
NettyBoltConnectionProviderFactory
public NettyBoltConnectionProviderFactory()Creates a new instance of this factory.It is used by
ServiceLoader.
-
-
Method Details
-
supports
- Specified by:
supportsin interfaceBoltConnectionProviderFactory
-
create
public BoltConnectionProvider create(LoggingProvider loggingProvider, ValueFactory valueFactory, ObservationProvider observationProvider, Map<String, ?> additionalConfig) - Specified by:
createin interfaceBoltConnectionProviderFactory
-