Record Class PoolSettings

java.lang.Object
java.lang.Record
org.neo4j.driver.internal.async.pool.PoolSettings

public record PoolSettings(int maxConnectionPoolSize, long connectionAcquisitionTimeout, long maxConnectionLifetime, long idleTimeBeforeConnectionTest) extends Record
  • Field Details

    • NOT_CONFIGURED

      public static final int NOT_CONFIGURED
      See Also:
    • DEFAULT_MAX_CONNECTION_POOL_SIZE

      public static final int DEFAULT_MAX_CONNECTION_POOL_SIZE
      See Also:
    • DEFAULT_IDLE_TIME_BEFORE_CONNECTION_TEST

      public static final long DEFAULT_IDLE_TIME_BEFORE_CONNECTION_TEST
      See Also:
    • DEFAULT_MAX_CONNECTION_LIFETIME

      public static final long DEFAULT_MAX_CONNECTION_LIFETIME
    • DEFAULT_CONNECTION_ACQUISITION_TIMEOUT

      public static final long DEFAULT_CONNECTION_ACQUISITION_TIMEOUT
  • Constructor Details

    • PoolSettings

      public PoolSettings(int maxConnectionPoolSize, long connectionAcquisitionTimeout, long maxConnectionLifetime, long idleTimeBeforeConnectionTest)
      Creates an instance of a PoolSettings record class.
      Parameters:
      maxConnectionPoolSize - the value for the maxConnectionPoolSize record component
      connectionAcquisitionTimeout - the value for the connectionAcquisitionTimeout record component
      maxConnectionLifetime - the value for the maxConnectionLifetime record component
      idleTimeBeforeConnectionTest - the value for the idleTimeBeforeConnectionTest record component
  • Method Details

    • idleTimeBeforeConnectionTestEnabled

      public boolean idleTimeBeforeConnectionTestEnabled()
    • maxConnectionLifetimeEnabled

      public boolean maxConnectionLifetimeEnabled()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • maxConnectionPoolSize

      public int maxConnectionPoolSize()
      Returns the value of the maxConnectionPoolSize record component.
      Returns:
      the value of the maxConnectionPoolSize record component
    • connectionAcquisitionTimeout

      public long connectionAcquisitionTimeout()
      Returns the value of the connectionAcquisitionTimeout record component.
      Returns:
      the value of the connectionAcquisitionTimeout record component
    • maxConnectionLifetime

      public long maxConnectionLifetime()
      Returns the value of the maxConnectionLifetime record component.
      Returns:
      the value of the maxConnectionLifetime record component
    • idleTimeBeforeConnectionTest

      public long idleTimeBeforeConnectionTest()
      Returns the value of the idleTimeBeforeConnectionTest record component.
      Returns:
      the value of the idleTimeBeforeConnectionTest record component