Class CompositeDataSourcePoolMetadataProvider
java.lang.Object
org.springframework.boot.jdbc.metadata.CompositeDataSourcePoolMetadataProvider
- All Implemented Interfaces:
DataSourcePoolMetadataProvider
public class CompositeDataSourcePoolMetadataProvider
extends Object
implements DataSourcePoolMetadataProvider
A
DataSourcePoolMetadataProvider
implementation that returns the first
DataSourcePoolMetadata
that is found by one of its delegate.- Since:
- 2.0.0
- Author:
- Stephane Nicoll
-
Constructor Summary
ConstructorDescriptionCompositeDataSourcePoolMetadataProvider
(Collection<? extends DataSourcePoolMetadataProvider> providers) Create aCompositeDataSourcePoolMetadataProvider
instance with an initial collection of delegates to use. -
Method Summary
Modifier and TypeMethodDescriptiongetDataSourcePoolMetadata
(DataSource dataSource) Return theDataSourcePoolMetadata
instance able to manage the specifiedDataSource
ornull
if the given data source could not be handled.
-
Constructor Details
-
CompositeDataSourcePoolMetadataProvider
public CompositeDataSourcePoolMetadataProvider(Collection<? extends DataSourcePoolMetadataProvider> providers) Create aCompositeDataSourcePoolMetadataProvider
instance with an initial collection of delegates to use.- Parameters:
providers
- the data source pool metadata providers
-
-
Method Details
-
getDataSourcePoolMetadata
Description copied from interface:DataSourcePoolMetadataProvider
Return theDataSourcePoolMetadata
instance able to manage the specifiedDataSource
ornull
if the given data source could not be handled.- Specified by:
getDataSourcePoolMetadata
in interfaceDataSourcePoolMetadataProvider
- Parameters:
dataSource
- the data source- Returns:
- the data source pool metadata
-