Package com.cloudforge.core.interfaces
Record Class DatabaseSpec.DatabaseConnection
java.lang.Object
java.lang.Record
com.cloudforge.core.interfaces.DatabaseSpec.DatabaseConnection
- Record Components:
endpoint- the database endpoint hostnameport- the database port numberdatabaseName- the name of the databaseusername- the database usernamepasswordSecretArn- the ARN of the secret containing the database passwordengine- the database engine typeversion- the database engine versionreadReplicaEndpoints- list of read replica endpoints (if any)
- Enclosing interface:
DatabaseSpec
public static record DatabaseSpec.DatabaseConnection(String endpoint, int port, String databaseName, String username, String passwordSecretArn, String engine, String version, List<String> readReplicaEndpoints)
extends Record
Database connection information provided to applications.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedatabaseNamerecord component.endpoint()Returns the value of theendpointrecord component.engine()Returns the value of theenginerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thepasswordSecretArnrecord component.intport()Returns the value of theportrecord component.Returns the value of thereadReplicaEndpointsrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.version()Returns the value of theversionrecord component.
-
Constructor Details
-
DatabaseConnection
public DatabaseConnection(String endpoint, int port, String databaseName, String username, String passwordSecretArn, String engine, String version, List<String> readReplicaEndpoints) Creates an instance of aDatabaseConnectionrecord class.- Parameters:
endpoint- the value for theendpointrecord componentport- the value for theportrecord componentdatabaseName- the value for thedatabaseNamerecord componentusername- the value for theusernamerecord componentpasswordSecretArn- the value for thepasswordSecretArnrecord componentengine- the value for theenginerecord componentversion- the value for theversionrecord componentreadReplicaEndpoints- the value for thereadReplicaEndpointsrecord component
-
-
Method Details
-
hasReadReplicas
public boolean hasReadReplicas() -
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. -
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. -
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 '=='. -
endpoint
Returns the value of theendpointrecord component.- Returns:
- the value of the
endpointrecord component
-
port
public int port()Returns the value of theportrecord component.- Returns:
- the value of the
portrecord component
-
databaseName
Returns the value of thedatabaseNamerecord component.- Returns:
- the value of the
databaseNamerecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
passwordSecretArn
Returns the value of thepasswordSecretArnrecord component.- Returns:
- the value of the
passwordSecretArnrecord component
-
engine
Returns the value of theenginerecord component.- Returns:
- the value of the
enginerecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
readReplicaEndpoints
Returns the value of thereadReplicaEndpointsrecord component.- Returns:
- the value of the
readReplicaEndpointsrecord component
-