Class Config
Use this class to configure the IDriver.
public class Config
- Inheritance
-
Config
- Inherited Members
- Extension Methods
Remarks
The defaults for fields in this class are
- EncryptionLevel :
EncryptionLevel Encrypted
- TrustManager :
TrustManagerCreateChainTrust()
- ConnectionTimeout:
30s
- SocketKeepAlive:
true
- Ipv6Enabled:
true
- MaxConnectionPoolSize :
100
- ConnectionAcquisitionTimeout :
1mins
- ConnectionIdleTimeout: InfiniteInterval
- MaxConnectionLifetime:
1h
- Logger :
logs nothing.
- MaxTransactionRetryTime:
30s
- DefaultReadBufferSize :
32K
- MaxReadBufferSize :
128K
- DefaultWriteBufferSize :
16K
- MaxWriteBufferSize :
64K
Fields
- Infinite
This const defines the value of infinite in terms of configuration properties.
- InfiniteInterval
This const defines the value of infinite interval in terms of configuration properties.
Properties
- ClientCertificateProvider
A certificate provider that will be used to provide the client certificate when a new connection is established.
- ConnectionAcquisitionTimeout
The maximum waiting time to either acquire an idle connection from the pool when connection pool is full or create a new connection when pool is not full.
Note that if there is a client certificate provider set, the time taken to fetch the certificate will be included in the connection acquisition timeout, so if fetching the certificate is particularly slow, it might be necessary to increase the timeout.
- ConnectionIdleTimeout
The idle timeout on pooled connections. A connection that has been idled in connection pool for longer than the given timeout is stale and will be closed once it is seen. Use InfiniteInterval to disable idle time checking.
- ConnectionLivenessThreshold
Pooled connections that have been idle in the pool for longer than this timeout will be tested before they are used again, to ensure they are still live. If this option is set too low, an additional network call will be incurred when acquiring a connection, which causes a performance hit.
If this is set high, you may receive sessions that are backed by no longer live connections, which will lead to exceptions in your application. Assuming the database is running, these exceptions will go away if you retry acquiring sessions. Hence, this parameter tunes a balance between the likelihood of your application seeing connection problems, and performance. You normally should not need to tune this parameter. No connection liveness check is done by default. Value 0 means connections will always be tested for validity. Values less than 0 are not allowed.
- ConnectionTimeout
The connection timeout when establishing a connection with a server.
- DefaultReadBufferSize
The default read buffer size which the driver allocates for its internal buffers.
- DefaultWriteBufferSize
The default write buffer size which the driver allocates for its internal buffers.
- EncryptionLevel
The use of encryption for all the connections created by the IDriver.
- FetchSize
The default fetch size. Since Bolt v4 (Neo4j 4.0+), the query running result (records) are pulled from server in batches. This fetch size defines how many records to pull in each batch. Use Infinite to disable batching and always pull all records in one batch instead.
- Ipv6Enabled
The connections to support ipv6 addresses.
- MaxConnectionLifetime
The maximum connection lifetime on pooled connections. A connection that has been created for longer than the given time will be closed once it is seen. Use InfiniteInterval to disable connection lifetime checking.
- MaxConnectionPoolSize
The max connection pool size.
- MaxIdleConnectionPoolSize
The max idle connection pool size. If the value of this is not internal set, then it will default to be the same as MaxConnectionPoolSize
- MaxReadBufferSize
The size when internal read buffers reach, will be released for garbage collection. If reading large records (nodes, relationships or paths) and experiencing too much garbage collection consider increasing this size to a reasonable amount depending on your data.
- MaxTransactionRetryTime
The maximum transaction retry timeout.
- MaxWriteBufferSize
The size when internal write buffers reach, will be released for garbage collection. If writing large values and experiencing too much garbage collection consider increasing this size to a reasonable amount depending on your data.
- MessageReaderConfig
The configuration for the driver's underlying message reading from the network.
- NotificationsConfig
The configuration for setting which notifications the server should send to the client.
This configuration is used for all queries executed by the driver unless otherwise overriden by SessionConfigBuilder for the scope of a single session.
- Resolver
Gets or internal sets a custom server address resolver used by the routing driver to resolve the initial address used to create the driver. Such resolution happens: 1) during the very first rediscovery when driver is created. 2) when all the known routers from the current routing table have failed and driver needs to fallback to the initial address.
- SocketKeepAlive
The socket keep alive option.
- TelemetryDisabled
The configuration for whether the driver attempts to send telemetry data.
The telemetry collected covers high level usage of the driver and does not include any queries or parameters.
Current collected metrics:- Which method was used to start a transaction.
Users can configure Neo4j server's collection collection behavior of client drivers telemetry data and log the telemetry data for diagnostics purposes.
By default the driver allows the collection of this telemetry.
- TlsNegotiator
The negotiator to use when establishing a TLS connection. If this is null, the driver will use the default negotiator.|
- TlsVersion
The TLS version to use when establishing a connection.
- TrustManager
Specifies which TrustManager implementation should be used while establishing trust via TLS.
- UserAgent
Used to get and set the User Agent string. If not used the default will be "neo4j-dotnet/x.y" where x is the major version and y is the minor version.