Class CqlSessionWrapper

  • All Implemented Interfaces:
    com.datastax.dse.driver.api.core.cql.continuous.ContinuousSession, com.datastax.dse.driver.api.core.cql.continuous.reactive.ContinuousReactiveSession, com.datastax.dse.driver.api.core.cql.reactive.ReactiveSession, com.datastax.dse.driver.api.core.graph.GraphSession, com.datastax.dse.driver.api.core.graph.reactive.ReactiveGraphSession, com.datastax.oss.driver.api.core.AsyncAutoCloseable, com.datastax.oss.driver.api.core.cql.AsyncCqlSession, com.datastax.oss.driver.api.core.cql.SyncCqlSession, com.datastax.oss.driver.api.core.CqlSession, com.datastax.oss.driver.api.core.session.Session, java.lang.AutoCloseable

    public class CqlSessionWrapper
    extends java.lang.Object
    implements com.datastax.oss.driver.api.core.CqlSession
    A wrapper so that we can intercept close() calls
    • Field Summary

      • Fields inherited from interface com.datastax.oss.driver.api.core.session.Session

        OSS_DRIVER_COORDINATES
    • Constructor Summary

      Constructors 
      Constructor Description
      CqlSessionWrapper​(com.datastax.oss.driver.api.core.CqlSession delegate)
      Public constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletionStage<java.lang.Boolean> checkSchemaAgreementAsync()  
      void close()  
      java.util.concurrent.CompletionStage<java.lang.Void> closeAsync()  
      java.util.concurrent.CompletionStage<java.lang.Void> closeFuture()  
      <RequestT extends com.datastax.oss.driver.api.core.session.Request,​ResultT>
      ResultT
      execute​(RequestT request, com.datastax.oss.driver.api.core.type.reflect.GenericType<ResultT> resultType)  
      java.util.concurrent.CompletionStage<java.lang.Void> forceCloseAsync()  
      com.datastax.oss.driver.api.core.context.DriverContext getContext()  
      java.util.Optional<com.datastax.oss.driver.api.core.CqlIdentifier> getKeyspace()  
      com.datastax.oss.driver.api.core.metadata.Metadata getMetadata()  
      java.util.Optional<com.datastax.oss.driver.api.core.metrics.Metrics> getMetrics()  
      java.lang.String getName()  
      boolean isSchemaMetadataEnabled()  
      java.util.concurrent.CompletionStage<com.datastax.oss.driver.api.core.metadata.Metadata> refreshSchemaAsync()  
      java.util.concurrent.CompletionStage<com.datastax.oss.driver.api.core.metadata.Metadata> setSchemaMetadataEnabled​(java.lang.Boolean newValue)  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.datastax.oss.driver.api.core.AsyncAutoCloseable

        isClosed
      • Methods inherited from interface com.datastax.oss.driver.api.core.cql.AsyncCqlSession

        executeAsync, executeAsync, executeAsync, executeAsync, prepareAsync, prepareAsync, prepareAsync
      • Methods inherited from interface com.datastax.dse.driver.api.core.cql.continuous.reactive.ContinuousReactiveSession

        executeContinuouslyReactive, executeContinuouslyReactive
      • Methods inherited from interface com.datastax.dse.driver.api.core.cql.continuous.ContinuousSession

        executeContinuously, executeContinuouslyAsync
      • Methods inherited from interface com.datastax.dse.driver.api.core.graph.GraphSession

        execute, executeAsync
      • Methods inherited from interface com.datastax.dse.driver.api.core.graph.reactive.ReactiveGraphSession

        executeReactive
      • Methods inherited from interface com.datastax.dse.driver.api.core.cql.reactive.ReactiveSession

        executeReactive, executeReactive, executeReactive, executeReactive
      • Methods inherited from interface com.datastax.oss.driver.api.core.session.Session

        checkSchemaAgreement, refreshSchema
      • Methods inherited from interface com.datastax.oss.driver.api.core.cql.SyncCqlSession

        execute, execute, execute, execute, prepare, prepare, prepare
    • Constructor Detail

      • CqlSessionWrapper

        public CqlSessionWrapper​(com.datastax.oss.driver.api.core.CqlSession delegate)
        Public constructor
        Parameters:
        delegate -
    • Method Detail

      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface com.datastax.oss.driver.api.core.session.Session
      • getMetadata

        public com.datastax.oss.driver.api.core.metadata.Metadata getMetadata()
        Specified by:
        getMetadata in interface com.datastax.oss.driver.api.core.session.Session
      • isSchemaMetadataEnabled

        public boolean isSchemaMetadataEnabled()
        Specified by:
        isSchemaMetadataEnabled in interface com.datastax.oss.driver.api.core.session.Session
      • setSchemaMetadataEnabled

        public java.util.concurrent.CompletionStage<com.datastax.oss.driver.api.core.metadata.Metadata> setSchemaMetadataEnabled​(java.lang.Boolean newValue)
        Specified by:
        setSchemaMetadataEnabled in interface com.datastax.oss.driver.api.core.session.Session
      • refreshSchemaAsync

        public java.util.concurrent.CompletionStage<com.datastax.oss.driver.api.core.metadata.Metadata> refreshSchemaAsync()
        Specified by:
        refreshSchemaAsync in interface com.datastax.oss.driver.api.core.session.Session
      • checkSchemaAgreementAsync

        public java.util.concurrent.CompletionStage<java.lang.Boolean> checkSchemaAgreementAsync()
        Specified by:
        checkSchemaAgreementAsync in interface com.datastax.oss.driver.api.core.session.Session
      • getContext

        public com.datastax.oss.driver.api.core.context.DriverContext getContext()
        Specified by:
        getContext in interface com.datastax.oss.driver.api.core.session.Session
      • getKeyspace

        public java.util.Optional<com.datastax.oss.driver.api.core.CqlIdentifier> getKeyspace()
        Specified by:
        getKeyspace in interface com.datastax.oss.driver.api.core.session.Session
      • getMetrics

        public java.util.Optional<com.datastax.oss.driver.api.core.metrics.Metrics> getMetrics()
        Specified by:
        getMetrics in interface com.datastax.oss.driver.api.core.session.Session
      • execute

        public <RequestT extends com.datastax.oss.driver.api.core.session.Request,​ResultT> ResultT execute​(RequestT request,
                                                                                                                 com.datastax.oss.driver.api.core.type.reflect.GenericType<ResultT> resultType)
        Specified by:
        execute in interface com.datastax.oss.driver.api.core.session.Session
      • closeFuture

        public java.util.concurrent.CompletionStage<java.lang.Void> closeFuture()
        Specified by:
        closeFuture in interface com.datastax.oss.driver.api.core.AsyncAutoCloseable
      • closeAsync

        public java.util.concurrent.CompletionStage<java.lang.Void> closeAsync()
        Specified by:
        closeAsync in interface com.datastax.oss.driver.api.core.AsyncAutoCloseable
      • forceCloseAsync

        public java.util.concurrent.CompletionStage<java.lang.Void> forceCloseAsync()
        Specified by:
        forceCloseAsync in interface com.datastax.oss.driver.api.core.AsyncAutoCloseable
      • close

        public void close()
        Specified by:
        close in interface com.datastax.oss.driver.api.core.AsyncAutoCloseable
        Specified by:
        close in interface java.lang.AutoCloseable