Class DataSourceWrapper
java.lang.Object
org.springframework.jdbc.datasource.DelegatingDataSource
org.springframework.cloud.sleuth.instrument.jdbc.DataSourceWrapper
- All Implemented Interfaces:
Wrapper,CommonDataSource,DataSource,org.springframework.beans.factory.InitializingBean
public class DataSourceWrapper
extends org.springframework.jdbc.datasource.DelegatingDataSource
Returns link of both real
DataSource, decorated DataSource.- Since:
- 3.1.0
- Author:
- Arthur Gavlyukovskiy
-
Constructor Summary
ConstructorsConstructorDescriptionDataSourceWrapper(DataSource originalDataSource, DataSource decoratedDataSource) -
Method Summary
Modifier and TypeMethodDescriptionReturns wrapped data source with the decorator applied.Returns original data source, before applying any decorator.Methods inherited from class org.springframework.jdbc.datasource.DelegatingDataSource
afterPropertiesSet, getConnection, getConnection, getLoginTimeout, getLogWriter, getParentLogger, getTargetDataSource, isWrapperFor, obtainTargetDataSource, setLoginTimeout, setLogWriter, setTargetDataSource, unwrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilderMethods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
Constructor Details
-
DataSourceWrapper
-
-
Method Details
-
getOriginalDataSource
Returns original data source, before applying any decorator.- Returns:
- original data source
-
getDecoratedDataSource
Returns wrapped data source with the decorator applied.- Returns:
- decorated data source
-