Record Class PooledConnectionConfiguration

java.lang.Object
java.lang.Record
overit.geocall.sql.PooledConnectionConfiguration
Record Components:
name - the pool's name

public record PooledConnectionConfiguration(String name) extends Record
Represents the configuration for a pooled connection.
  • Constructor Details

    • PooledConnectionConfiguration

      public PooledConnectionConfiguration(String name)
      Creates an instance of a PooledConnectionConfiguration record class.
      Parameters:
      name - the value for the name record component
  • Method Details

    • url

      public String url()
      Returns:
      the DB's connection string
    • driver

      public String driver()
      Returns:
      the JDBC's driver reference
    • user

      public String user()
      Returns:
      The username for the database access
    • password

      public String password()
      Returns:
      The password for the database access
    • testStatement

      public String testStatement()
      Returns:
      an optional test command for the database access
    • scripts

      public String scripts()
      Returns:
      an optional script that will be executed in the connection phase
    • parameters

      public StringGetter parameters()
      Returns:
      the StringGetter that contains the database parameters
    • number

      public int number(int def)
      Parameters:
      def - default connection number
      Returns:
      the maximum pool's connections. Default value if there's nothing configured
    • max

      public int max()
      Returns:
      the maximum pool's connections. -1 if there's no limit
    • min

      public int min()
      Returns:
      the minimum pool's connections. 0 if there's no connection to keep alive
    • cross

      public String cross()
      Returns:
      the name that allows pools, belonging to the same cross, to reuse the connection.
    • waits

      public Integer waits()
      Returns:
      number of seconds that must pass before repeating the reachability test for the database
    • owner

      public String owner()
      Returns:
      change the owner user used to invoke the SQL functions. If not indicated, the owner used will be inherited from the default macro settings. This configuration is only effective for sql server DBs.
    • encryptionKey

      public String encryptionKey()
      Returns:
      key used to encrypt and decrypt values from the database
    • type

      public String type()
      Returns:
      the connection modality used when communicating with the database.
    • 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 Objects::equals(Object,Object).
      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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component