Class ObservableReactiveSessionFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<ReactiveSession>
org.springframework.data.cassandra.observability.ObservableReactiveSessionFactoryBean
- 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<ReactiveSession>
,org.springframework.beans.factory.InitializingBean
public class ObservableReactiveSessionFactoryBean
extends org.springframework.beans.factory.config.AbstractFactoryBean<ReactiveSession>
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 classorg.springframework.beans.factory.config.AbstractFactoryBean<ReactiveSession>
-
getObjectType
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<ReactiveSession>
- Specified by:
getObjectType
in classorg.springframework.beans.factory.config.AbstractFactoryBean<ReactiveSession>
-
getRemoteServiceName
-
destroy
public void destroy()- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Overrides:
destroy
in classorg.springframework.beans.factory.config.AbstractFactoryBean<ReactiveSession>
-
setRemoteServiceName
Set the remote service name.- Parameters:
remoteServiceName
-
-