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:
-
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
ConstructorDescriptionObservableCqlSessionFactoryBean
(com.datastax.oss.driver.api.core.CqlSessionBuilder cqlSessionBuilder, io.micrometer.observation.ObservationRegistry observationRegistry) Construct a newObservableCqlSessionFactoryBean
. -
Method Summary
Modifier and TypeMethodDescriptionprotected com.datastax.oss.driver.api.core.CqlSession
protected void
destroyInstance
(com.datastax.oss.driver.api.core.CqlSession instance) Class<?>
void
setConvention
(CassandraObservationConvention convention) Set the observation convention.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
-
Constructor Details
-
ObservableCqlSessionFactoryBean
public ObservableCqlSessionFactoryBean(com.datastax.oss.driver.api.core.CqlSessionBuilder cqlSessionBuilder, io.micrometer.observation.ObservationRegistry observationRegistry) Construct a newObservableCqlSessionFactoryBean
.- Parameters:
cqlSessionBuilder
- must not be null.observationRegistry
- must not be null.
-
-
Method Details
-
getRemoteServiceName
-
setRemoteServiceName
Set the remote service name.- Parameters:
remoteServiceName
-
-
setConvention
Set the observation convention.- Parameters:
convention
-- Since:
- 4.3.4
-
createInstance
protected com.datastax.oss.driver.api.core.CqlSession createInstance()- Specified by:
createInstance
in classAbstractFactoryBean<com.datastax.oss.driver.api.core.CqlSession>
-
destroyInstance
- Overrides:
destroyInstance
in classAbstractFactoryBean<com.datastax.oss.driver.api.core.CqlSession>
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<com.datastax.oss.driver.api.core.CqlSession>
- Specified by:
getObjectType
in classAbstractFactoryBean<com.datastax.oss.driver.api.core.CqlSession>
-