File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
driver-core/src/main/com/mongodb/connection Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -123,8 +123,17 @@ public Builder applySettings(final ClusterSettings clusterSettings) {
123
123
/**
124
124
* Sets the host name to use in order to look up an SRV DNS record to find the MongoDB hosts.
125
125
*
126
+ * <p>
127
+ * Note that when setting srvHost via {@code ClusterSettings.Builder}, the driver will NOT process any associated TXT records
128
+ * associated with the host. In order to enable the processing of TXT records while still using {@code MongoClientSettings},
129
+ * specify the SRV host via connection string and apply the connection string to the settings, e.g.
130
+ * {@code MongoClientSettings.builder().applyConnectionString(new ConnectionString("mongodb+srv://host1.acme.com")) }.
131
+ * </p>
132
+ *
126
133
* @param srvHost the SRV host name
127
134
* @return this
135
+ * @see com.mongodb.MongoClientSettings.Builder#applyConnectionString(ConnectionString)
136
+ * @see ClusterSettings.Builder#applyConnectionString(ConnectionString)
128
137
*/
129
138
public Builder srvHost (final String srvHost ) {
130
139
if (this .hosts != DEFAULT_HOSTS ) {
You can’t perform that action at this time.
0 commit comments