Record Class IdDatabaseConfiguration
java.lang.Object
java.lang.Record
com.io7m.idstore.database.api.IdDatabaseConfiguration
- Record Components:
ownerRoleName- The name of the role that owns the database; used for database setup and migrationsownerRolePassword- The password of the role that owns the databaseworkerRolePassword- The password of the worker role used for normal database operationreaderRolePassword- The password of the role used for read-only database accessaddress- The database addressport- The database TCP/IP portdatabaseName- The database namecreate- The creation specificationupgrade- The upgrade specificationstrings- The string resourcesclock- A clock for time retrievalsminimumConnections- The minimum number of database connections in the poolmaximumConnections- The maximum number of database connections in the pool
public record IdDatabaseConfiguration(String ownerRoleName, String ownerRolePassword, String workerRolePassword, Optional<String> readerRolePassword, String address, int port, String databaseName, IdDatabaseCreate create, IdDatabaseUpgrade upgrade, IdStrings strings, Clock clock, int minimumConnections, int maximumConnections)
extends Record
The server database configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionIdDatabaseConfiguration(String ownerRoleName, String ownerRolePassword, String workerRolePassword, Optional<String> readerRolePassword, String address, int port, String databaseName, IdDatabaseCreate create, IdDatabaseUpgrade upgrade, IdStrings strings, Clock clock, int minimumConnections, int maximumConnections) The server database configuration. -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.clock()Returns the value of theclockrecord component.create()Returns the value of thecreaterecord component.Returns the value of thedatabaseNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaximumConnectionsrecord component.intReturns the value of theminimumConnectionsrecord component.Returns the value of theownerRoleNamerecord component.Returns the value of theownerRolePasswordrecord component.intport()Returns the value of theportrecord component.Returns the value of thereaderRolePasswordrecord component.strings()Returns the value of thestringsrecord component.final StringtoString()Returns a string representation of this record class.upgrade()Returns the value of theupgraderecord component.Returns the value of theworkerRolePasswordrecord component.
-
Constructor Details
-
IdDatabaseConfiguration
public IdDatabaseConfiguration(String ownerRoleName, String ownerRolePassword, String workerRolePassword, Optional<String> readerRolePassword, String address, int port, String databaseName, IdDatabaseCreate create, IdDatabaseUpgrade upgrade, IdStrings strings, Clock clock, int minimumConnections, int maximumConnections) The server database configuration.- Parameters:
ownerRoleName- The name of the role that owns the database; used for database setup and migrationsownerRolePassword- The password of the role that owns the databaseworkerRolePassword- The password of the worker role used for normal database operationreaderRolePassword- The password of the role used for read-only database accessaddress- The database addressport- The database TCP/IP portdatabaseName- The database namecreate- The creation specificationupgrade- The upgrade specificationstrings- The string resourcesclock- A clock for time retrievalsminimumConnections- The minimum number of database connections in the poolmaximumConnections- The maximum number of database connections in the pool
-
-
Method Details
-
withoutUpgradeOrCreate
- Returns:
- this, but with DO_NOT_CREATE_DATABASE and DO_NOT_UPGRADE_DATABASE.
-
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. -
ownerRoleName
Returns the value of theownerRoleNamerecord component.- Returns:
- the value of the
ownerRoleNamerecord component
-
ownerRolePassword
Returns the value of theownerRolePasswordrecord component.- Returns:
- the value of the
ownerRolePasswordrecord component
-
workerRolePassword
Returns the value of theworkerRolePasswordrecord component.- Returns:
- the value of the
workerRolePasswordrecord component
-
readerRolePassword
Returns the value of thereaderRolePasswordrecord component.- Returns:
- the value of the
readerRolePasswordrecord component
-
address
-
port
-
databaseName
Returns the value of thedatabaseNamerecord component.- Returns:
- the value of the
databaseNamerecord component
-
create
-
upgrade
-
strings
-
clock
-
minimumConnections
public int minimumConnections()Returns the value of theminimumConnectionsrecord component.- Returns:
- the value of the
minimumConnectionsrecord component
-
maximumConnections
public int maximumConnections()Returns the value of themaximumConnectionsrecord component.- Returns:
- the value of the
maximumConnectionsrecord component
-