From 708615b3b03b21242b489f6e5fcfa5dbb59150da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20B=C4=85czkowski?= Date: Mon, 6 Mar 2023 12:29:48 +0100 Subject: [PATCH] Add missing javadoc for withScyllaCloudConnectionConfig Adds javadoc comments for each variation of `withScyllaCloudConnectionConfig` in `Cluster.Builder` --- .../com/datastax/driver/core/Cluster.java | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java index bc930f69310..3363b9b88fc 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java @@ -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. + * + *

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. + * + *

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();