Record Class PostgresSettings
java.lang.Object
java.lang.Record
com.iantapply.orchestra.adapter.postgres.PostgresSettings
- Record Components:
jdbcUrl- PostgreSQL JDBC URLusername- database usernamepassword- database passwordmaximumPoolSize- maximum number of pooled connections
-
Constructor Summary
ConstructorsConstructorDescriptionPostgresSettings(String jdbcUrl, String username, String password, int maximumPoolSize) Validates the JDBC URL and normalizes the pool size. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.jdbcUrl()Returns the value of thejdbcUrlrecord component.intReturns the value of themaximumPoolSizerecord component.com.zaxxer.hikari.HikariDataSourceOpens a configured connection pool.password()Returns the value of thepasswordrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
PostgresSettings
-
-
Method Details
-
openDataSource
public com.zaxxer.hikari.HikariDataSource openDataSource()Opens a configured connection pool.- Returns:
- newly opened HikariCP data source owned by the caller
-
toString
-
hashCode
-
equals
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
jdbcUrl
-
username
-
password
-
maximumPoolSize
public int maximumPoolSize()Returns the value of themaximumPoolSizerecord component.- Returns:
- the value of the
maximumPoolSizerecord component
-