Skip to content

Commit

Permalink
Add missing javadoc for withScyllaCloudConnectionConfig
Browse files Browse the repository at this point in the history
Adds javadoc comments for each variation of `withScyllaCloudConnectionConfig`
in `Cluster.Builder`
  • Loading branch information
Bouncheck committed Nov 20, 2024
1 parent 07d0f66 commit 708615b
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions driver-core/src/main/java/com/datastax/driver/core/Cluster.java
Original file line number Diff line number Diff line change
Expand Up @@ -1384,19 +1384,57 @@ public Builder withNoCompact() {
return this;
}

/**
* Configure for Scylla Cloud Serverless cluster using configuration bundle.
*
* @param configurationFile configuration bundle file.
* @return this builder.
* @throws IOException
* @see Builder#withScyllaCloudConnectionConfig(ScyllaCloudConnectionConfig)
*/
public Builder withScyllaCloudConnectionConfig(File configurationFile) throws IOException {
return withScyllaCloudConnectionConfig(configurationFile.toURI().toURL());
}

/**
* Configure for Scylla Cloud Serverless cluster using URL to configuration bundle.
*
* @param configurationUrl URL from which configuration bundle can be read.
* @return this builder.
* @throws IOException
* @see Builder#withScyllaCloudConnectionConfig(ScyllaCloudConnectionConfig)
*/
public Builder withScyllaCloudConnectionConfig(URL configurationUrl) throws IOException {
return withScyllaCloudConnectionConfig(configurationUrl.openStream());
}

/**
* Configure for Scylla Cloud Serverless cluster using InputStream of configuration bundle.
*
* @param inputStream input stream containing configuration bundle format data.
* @return this builder.
* @throws IOException
* @see Builder#withScyllaCloudConnectionConfig(ScyllaCloudConnectionConfig)
*/
public Builder withScyllaCloudConnectionConfig(InputStream inputStream) throws IOException {
return withScyllaCloudConnectionConfig(
ScyllaCloudConnectionConfig.fromInputStream(inputStream));
}

/**
* Sets a collection of options for connecting to Scylla Cloud Serverless cluster.
*
* <p>Sets several options according to provided {@link ScyllaCloudConnectionConfig}. This
* includes calling {@link Builder#withEndPointFactory(EndPointFactory)}, {@link
* Builder#withSSL(SSLOptions)}, {@link Builder#withAuthProvider(AuthProvider)}, {@link
* Builder#withoutAdvancedShardAwareness()} with parameters derived from the config.
*
* <p>Cannot be combined with {@link Builder#addContactPoint}. All contact points should already
* be provided in {@link ScyllaCloudConnectionConfig}.
*
* @param config instantiated ScyllaCloudConnectionConfig.
* @return this builder.
*/
protected Builder withScyllaCloudConnectionConfig(ScyllaCloudConnectionConfig config) {
try {
ScyllaCloudDatacenter currentDatacenter = config.getCurrentDatacenter();
Expand Down

0 comments on commit 708615b

Please sign in to comment.