Package com.io7m.idstore.database.api
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 retrievals
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)
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) 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.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) 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 retrievals
-
-
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 '=='. -
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
-