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
logger
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
ConstructorDescriptionObservableReactiveSessionFactoryBean
(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 ReactiveSession
void
destroy()
Class<?>
void
setRemoteServiceName
(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:
createInstance
in classAbstractFactoryBean<ReactiveSession>
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<ReactiveSession>
- Specified by:
getObjectType
in classAbstractFactoryBean<ReactiveSession>
-
getRemoteServiceName
-
destroy
public void destroy()- Specified by:
destroy
in interfaceDisposableBean
- Overrides:
destroy
in classAbstractFactoryBean<ReactiveSession>
-
setRemoteServiceName
Set the remote service name.- Parameters:
remoteServiceName
-
-