Class TemporaryCqlSessionProvider

  • All Implemented Interfaces:
    org.apache.cassandra.sidecar.common.server.CQLSessionProvider

    public class TemporaryCqlSessionProvider
    extends java.lang.Object
    implements org.apache.cassandra.sidecar.common.server.CQLSessionProvider
    A CQL Session provider that always connects to and queries all hosts provided to it. Useful for integration testing, but will eventually be removed once issues with the Sidecar's CQLSessionProviderImpl are resolved.
    • Constructor Summary

      Constructors 
      Constructor Description
      TemporaryCqlSessionProvider​(java.util.List<java.net.InetSocketAddress> contactPoints, com.datastax.driver.core.NettyOptions options)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      com.datastax.driver.core.Session get()  
      com.datastax.driver.core.Session getIfConnected()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TemporaryCqlSessionProvider

        public TemporaryCqlSessionProvider​(java.util.List<java.net.InetSocketAddress> contactPoints,
                                           com.datastax.driver.core.NettyOptions options)
    • Method Detail

      • get

        @Nullable
        public com.datastax.driver.core.Session get()
        Specified by:
        get in interface org.apache.cassandra.sidecar.common.server.CQLSessionProvider
      • getIfConnected

        public com.datastax.driver.core.Session getIfConnected()
        Specified by:
        getIfConnected in interface org.apache.cassandra.sidecar.common.server.CQLSessionProvider
      • close

        public void close()
        Specified by:
        close in interface org.apache.cassandra.sidecar.common.server.CQLSessionProvider