@@ -96,7 +96,6 @@ public abstract class SessionBuilder<SelfT extends SessionBuilder, SessionT> {
96
96
protected DriverConfigLoader configLoader ;
97
97
protected Set <EndPoint > programmaticContactPoints = new HashSet <>();
98
98
protected CqlIdentifier keyspace ;
99
- protected Callable <InputStream > cloudConfigInputStream ;
100
99
protected Callable <InputStream > scyllaCloudConfigInputStream ;
101
100
102
101
protected ProgrammaticArguments .Builder programmaticArgumentsBuilder =
@@ -632,31 +631,6 @@ public SelfT withClassLoader(@Nullable ClassLoader classLoader) {
632
631
return self ;
633
632
}
634
633
635
- /**
636
- * Configures this SessionBuilder for Cloud deployments by retrieving connection information from
637
- * the provided {@link Path}.
638
- *
639
- * <p>To connect to a Cloud database, you must first download the secure database bundle from the
640
- * DataStax Astra console that contains the connection information, then instruct the driver to
641
- * read its contents using either this method or one if its variants.
642
- *
643
- * <p>For more information, please refer to the DataStax Astra documentation.
644
- *
645
- * @param cloudConfigPath Path to the secure connect bundle zip file.
646
- * @see #withCloudSecureConnectBundle(URL)
647
- * @see #withCloudSecureConnectBundle(InputStream)
648
- */
649
- @ NonNull
650
- public SelfT withCloudSecureConnectBundle (@ NonNull Path cloudConfigPath ) {
651
- try {
652
- URL cloudConfigUrl = cloudConfigPath .toAbsolutePath ().normalize ().toUri ().toURL ();
653
- this .cloudConfigInputStream = cloudConfigUrl ::openStream ;
654
- } catch (MalformedURLException e ) {
655
- throw new IllegalArgumentException ("Incorrect format of cloudConfigPath" , e );
656
- }
657
- return self ;
658
- }
659
-
660
634
@ NonNull
661
635
public SelfT withScyllaCloudSecureConnectBundle (@ NonNull Path cloudConfigPath ) {
662
636
try {
@@ -680,84 +654,18 @@ public SelfT withCodecRegistry(@Nullable MutableCodecRegistry codecRegistry) {
680
654
return self ;
681
655
}
682
656
683
- /**
684
- * Configures this SessionBuilder for Cloud deployments by retrieving connection information from
685
- * the provided {@link URL}.
686
- *
687
- * <p>To connect to a Cloud database, you must first download the secure database bundle from the
688
- * DataStax Astra console that contains the connection information, then instruct the driver to
689
- * read its contents using either this method or one if its variants.
690
- *
691
- * <p>For more information, please refer to the DataStax Astra documentation.
692
- *
693
- * @param cloudConfigUrl URL to the secure connect bundle zip file.
694
- * @see #withCloudSecureConnectBundle(Path)
695
- * @see #withCloudSecureConnectBundle(InputStream)
696
- */
697
- @ NonNull
698
- public SelfT withCloudSecureConnectBundle (@ NonNull URL cloudConfigUrl ) {
699
- this .cloudConfigInputStream = cloudConfigUrl ::openStream ;
700
- return self ;
701
- }
702
-
703
657
@ NonNull
704
658
public SelfT withScyllaCloudSecureConnectBundle (@ NonNull URL cloudConfigUrl ) {
705
659
this .scyllaCloudConfigInputStream = cloudConfigUrl ::openStream ;
706
660
return self ;
707
661
}
708
662
709
- /**
710
- * Configures this SessionBuilder for Cloud deployments by retrieving connection information from
711
- * the provided {@link InputStream}.
712
- *
713
- * <p>To connect to a Cloud database, you must first download the secure database bundle from the
714
- * DataStax Astra console that contains the connection information, then instruct the driver to
715
- * read its contents using either this method or one if its variants.
716
- *
717
- * <p>For more information, please refer to the DataStax Astra documentation.
718
- *
719
- * <p>Note that the provided stream will be consumed <em>and closed</em> when either {@link
720
- * #build()} or {@link #buildAsync()} are called; attempting to reuse it afterwards will result in
721
- * an error being thrown.
722
- *
723
- * @param cloudConfigInputStream A stream containing the secure connect bundle zip file.
724
- * @see #withCloudSecureConnectBundle(Path)
725
- * @see #withCloudSecureConnectBundle(URL)
726
- */
727
- @ NonNull
728
- public SelfT withCloudSecureConnectBundle (@ NonNull InputStream cloudConfigInputStream ) {
729
- this .cloudConfigInputStream = () -> cloudConfigInputStream ;
730
- return self ;
731
- }
732
-
733
663
@ NonNull
734
664
public SelfT withScyllaCloudSecureConnectBundle (@ NonNull InputStream cloudConfigInputStream ) {
735
665
this .scyllaCloudConfigInputStream = () -> cloudConfigInputStream ;
736
666
return self ;
737
667
}
738
668
739
- /**
740
- * Configures this SessionBuilder to use the provided Cloud proxy endpoint.
741
- *
742
- * <p>Normally, this method should not be called directly; the normal and easiest way to configure
743
- * the driver for Cloud deployments is through a {@linkplain #withCloudSecureConnectBundle(URL)
744
- * secure connect bundle}.
745
- *
746
- * <p>Setting this option to any non-null address will make the driver use a special topology
747
- * monitor tailored for Cloud deployments. This topology monitor assumes that the target cluster
748
- * should be contacted through the proxy specified here, using SNI routing.
749
- *
750
- * <p>For more information, please refer to the DataStax Astra documentation.
751
- *
752
- * @param cloudProxyAddress The address of the Cloud proxy to use.
753
- * @see <a href="https://en.wikipedia.org/wiki/Server_Name_Indication">Server Name Indication</a>
754
- */
755
- @ NonNull
756
- public SelfT withCloudProxyAddress (@ Nullable InetSocketAddress cloudProxyAddress ) {
757
- this .programmaticArgumentsBuilder .withCloudProxyAddress (cloudProxyAddress );
758
- return self ;
759
- }
760
-
761
669
@ NonNull
762
670
public SelfT withScyllaCloudProxyAddress (
763
671
@ Nullable InetSocketAddress cloudProxyAddress , String nodeDomain ) {
0 commit comments