Search Results for

    Show / Hide Table of Contents

    Class ConnectionPoolSettings

    Holds settings for the ConnectionPool.

    Inheritance
    object
    ConnectionPoolSettings
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Gremlin.Net.Driver
    Assembly: Gremlin.Net.dll
    Syntax
    public class ConnectionPoolSettings

    Properties

    EnableUserAgentOnConnect

    Gets or sets whether a connection pool will send a user agent during web socket handshakes

    Declaration
    public bool EnableUserAgentOnConnect { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    The default value is true. When enabled, user agents will only be sent during the web socket handshake. User agent follows the form: [Application Name] [GLV Name].[Version] [Language Runtime Version] [OS].[Version] [CPU Architecture]

    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
    int
    Remarks

    The default value is 16. A ConnectionPoolBusyException is thrown if this limit is reached on all connections when a new request comes in.

    Exceptions
    Type Condition
    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
    int
    Remarks

    The default value is 8.

    Exceptions
    Type Condition
    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
    int
    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 ServerUnavailableException is thrown if the server can still not be reached after this many retry attempts.

    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
    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
    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
    ArgumentOutOfRangeException

    The specified delay is negative or zero.

    In this article
    Back to top Copyright © 2018 The Apache Software Foundation