Record Class MongoConfiguration
java.lang.Object
java.lang.Record
dev.getelements.elements.sdk.mongo.MongoConfiguration
- Record Components:
connectionString- the database connection stringsslConfiguration- the SSL configuration, may be null if SSL is not used
public record MongoConfiguration(String connectionString, MongoSslConfiguration sslConfiguration)
extends Record
The MongoDB configuration record. This contains all necessary information to access the MongoDB instance configured
for Namazu Elements
-
Constructor Summary
ConstructorsConstructorDescriptionMongoConfiguration(String connectionString, MongoSslConfiguration sslConfiguration) Creates an instance of aMongoConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconnectionStringrecord component.final booleanIndicates whether some other object is "equal to" this one.Finds the SSL configuration for the MongoDB connection, if any.final inthashCode()Returns a hash code value for this object.Returns the value of thesslConfigurationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MongoConfiguration
Creates an instance of aMongoConfigurationrecord class.- Parameters:
connectionString- the value for theconnectionStringrecord componentsslConfiguration- the value for thesslConfigurationrecord component
-
-
Method Details
-
findSslConfiguration
Finds the SSL configuration for the MongoDB connection, if any. May be empty if SSL is not configured and the connection is not using SSL.- Returns:
- the
MongoSslConfigurationif SSL is configured, empty otherwise
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
connectionString
Returns the value of theconnectionStringrecord component.- Returns:
- the value of the
connectionStringrecord component
-
sslConfiguration
Returns the value of thesslConfigurationrecord component.- Returns:
- the value of the
sslConfigurationrecord component
-