Class ObservableCqlSessionFactoryBean

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<com.datastax.oss.driver.api.core.CqlSession>
org.springframework.data.cassandra.observability.ObservableCqlSessionFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<com.datastax.oss.driver.api.core.CqlSession>, org.springframework.beans.factory.InitializingBean

public class ObservableCqlSessionFactoryBean extends org.springframework.beans.factory.config.AbstractFactoryBean<com.datastax.oss.driver.api.core.CqlSession>
Factory bean to construct a CqlSession integrated with given ObservationRegistry. This factory bean registers also ObservationRequestTracker.INSTANCE with the builder to ensure full integration with the required infrastructure.
Since:
4.0
Author:
Mark Paluch
See Also:
  • Field Summary

    Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    logger

    Fields inherited from interface org.springframework.beans.factory.FactoryBean

    OBJECT_TYPE_ATTRIBUTE
  • Constructor Summary

    Constructors
    Constructor
    Description
    ObservableCqlSessionFactoryBean(com.datastax.oss.driver.api.core.CqlSessionBuilder cqlSessionBuilder, io.micrometer.observation.ObservationRegistry observationRegistry)
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.datastax.oss.driver.api.core.CqlSession
     
    protected void
    destroyInstance(com.datastax.oss.driver.api.core.CqlSession instance)
     
     
     
    void
    setRemoteServiceName(String remoteServiceName)
    Set the remote service name.

    Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton

    Methods inherited from class java.lang.Object

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

    • ObservableCqlSessionFactoryBean

      public ObservableCqlSessionFactoryBean(com.datastax.oss.driver.api.core.CqlSessionBuilder cqlSessionBuilder, io.micrometer.observation.ObservationRegistry observationRegistry)
      Parameters:
      cqlSessionBuilder - must not be null.
      observationRegistry - must not be null.
  • Method Details

    • createInstance

      protected com.datastax.oss.driver.api.core.CqlSession createInstance()
      Specified by:
      createInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<com.datastax.oss.driver.api.core.CqlSession>
    • destroyInstance

      protected void destroyInstance(@Nullable com.datastax.oss.driver.api.core.CqlSession instance)
      Overrides:
      destroyInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<com.datastax.oss.driver.api.core.CqlSession>
    • getObjectType

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<com.datastax.oss.driver.api.core.CqlSession>
      Specified by:
      getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean<com.datastax.oss.driver.api.core.CqlSession>
    • getRemoteServiceName

      @Nullable public String getRemoteServiceName()
    • setRemoteServiceName

      public void setRemoteServiceName(@Nullable String remoteServiceName)
      Set the remote service name.
      Parameters:
      remoteServiceName -