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:
Aware, BeanClassLoaderAware, BeanFactoryAware, DisposableBean, FactoryBean<com.datastax.oss.driver.api.core.CqlSession>, InitializingBean

public class ObservableCqlSessionFactoryBean extends 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:
  • 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 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 AbstractFactoryBean<com.datastax.oss.driver.api.core.CqlSession>
    • getObjectType

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface FactoryBean<com.datastax.oss.driver.api.core.CqlSession>
      Specified by:
      getObjectType in class 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 -