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

Merged
Merged
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 @@ -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
Loading