Class ObservableReactiveSessionFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<ReactiveSession>
org.springframework.data.cassandra.observability.ObservableReactiveSessionFactoryBean
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,FactoryBean<ReactiveSession>,InitializingBean
Factory bean to construct a
ReactiveSession integrated with given ObservationRegistry. The required
CqlSession must be associated with ObservationRequestTracker.INSTANCE to ensure proper integration with all observability components. You can use
ObservableCqlSessionFactoryBean to obtain a properly configured CqlSession.- Since:
- 4.0
- Author:
- Mark Paluch
- See Also:
-
Field Summary
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
ConstructorsConstructorDescriptionObservableReactiveSessionFactoryBean(com.datastax.oss.driver.api.core.CqlSessionBuilder cqlSessionBuilder, io.micrometer.observation.ObservationRegistry observationRegistry) Construct a newObservableReactiveSessionFactoryBean.ObservableReactiveSessionFactoryBean(com.datastax.oss.driver.api.core.CqlSession cqlSession, io.micrometer.observation.ObservationRegistry observationRegistry) Construct a newObservableReactiveSessionFactoryBean. -
Method Summary
Modifier and TypeMethodDescriptionprotected ReactiveSessionvoiddestroy()Class<?>voidsetRemoteServiceName(String remoteServiceName) Set the remote service name.Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
ObservableReactiveSessionFactoryBean
public ObservableReactiveSessionFactoryBean(com.datastax.oss.driver.api.core.CqlSessionBuilder cqlSessionBuilder, io.micrometer.observation.ObservationRegistry observationRegistry) Construct a newObservableReactiveSessionFactoryBean.- Parameters:
cqlSessionBuilder- must not be null.observationRegistry- must not be null.- Since:
- 4.0.5
-
ObservableReactiveSessionFactoryBean
public ObservableReactiveSessionFactoryBean(com.datastax.oss.driver.api.core.CqlSession cqlSession, io.micrometer.observation.ObservationRegistry observationRegistry) Construct a newObservableReactiveSessionFactoryBean.- Parameters:
cqlSession- must not be null.observationRegistry- must not be null.
-
-
Method Details
-
createInstance
- Specified by:
createInstancein classAbstractFactoryBean<ReactiveSession>
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<ReactiveSession>- Specified by:
getObjectTypein classAbstractFactoryBean<ReactiveSession>
-
getRemoteServiceName
-
destroy
public void destroy()- Specified by:
destroyin interfaceDisposableBean- Overrides:
destroyin classAbstractFactoryBean<ReactiveSession>
-
setRemoteServiceName
Set the remote service name.- Parameters:
remoteServiceName-
-