Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing javadoc for withScyllaCloudConnectionConfig #204

Open
wants to merge 1 commit into
base: scylla-3.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -1385,19 +1385,57 @@ public Builder withNoCompact() {
return this;
}

/**
* Configure for Scylla Cloud Serverless cluster using configuration bundle.
*
* @param configurationFile
* @return
* @throws IOException
Comment on lines +1391 to +1393

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add more detailed descriptions here and in places below.

For example:

* @param  url  an absolute URL giving the base location of the image
* @param  name the location of the image, relative to the url argument
* @return      the image at the specified URL

* @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
* @return
* @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
* @return
* @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
* @return
*/
protected Builder withScyllaCloudConnectionConfig(ScyllaCloudConnectionConfig config) {
try {
ScyllaCloudDatacenter currentDatacenter = config.getCurrentDatacenter();
Expand Down