Class ConnectionPoolSettings
Holds settings for the Gremlin.Net.Driver.ConnectionPool.
Inheritance
Inherited Members
Namespace: Gremlin.Net.Driver
Assembly: cs.temp.dll.dll
Syntax
public class ConnectionPoolSettings
Properties
MaxInProcessPerConnection
Gets or sets the maximum number of in-flight requests that can occur on a connection.
Declaration
public int MaxInProcessPerConnection { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
The default value is 32. A
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | The specified number is less than or equal to zero. |
PoolSize
Gets or sets the size of the connection pool.
Declaration
public int PoolSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
The default value is 4.
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | The specified pool size is less than or equal to zero. |
ReconnectionAttempts
Gets or sets the number of attempts to get an open connection from the pool to submit a request.
Declaration
public int ReconnectionAttempts { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
The driver always tries to reconnect to a server in the background after it has noticed that a
connection is dead. This setting only specifies how often the driver will retry to get an open
connection from its pool when no open connection is available to submit a request.
These retries give the driver time to establish new connections to the server that might have been
unavailable temporarily or that might have closed the connections, e.g., because they were idle for some
time.
The default value is 4. A
Setting this to zero means that the exception is thrown immediately when no open connection is available to submit a request. The driver will however still try to reconnect to the server in the background for subsequent requests.
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | The number of attempts specified is less than zero. |
ReconnectionBaseDelay
Gets or sets the base delay used for the exponential backoff for the reconnection attempts.
Declaration
public TimeSpan ReconnectionBaseDelay { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
Remarks
The driver employs an exponential backoff strategy that uses this base delay for its reconnection attempts. With a base delay of 100 ms for example, retries happen after 100 ms, 200 ms, 400 ms, 800 ms, and so on, assuming that enough ReconnectionAttempts are configured.
The default value is 1 second.
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | The specified delay is negative or zero. |