Class BitmapShardDataSourceProvider
- java.lang.Object
-
- org.zalando.sprocwrapper.dsprovider.BitmapShardDataSourceProvider
-
- All Implemented Interfaces:
DataSourceProvider
public class BitmapShardDataSourceProvider extends Object implements DataSourceProvider
-
-
Constructor Summary
Constructors Constructor Description BitmapShardDataSourceProvider(Class<? extends DataSource> dataSourceClass, Map<String,String> commonDataSourceProperties, Map<String,String> connectionUrls)BitmapShardDataSourceProvider(Map<String,DataSource> connectionDataSources)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataSourcegetDataSource(int virtualShardId)intgetDataSourceId(int virtualShardId)List<Integer>getDistinctShardIds()
-
-
-
Constructor Detail
-
BitmapShardDataSourceProvider
public BitmapShardDataSourceProvider(Map<String,DataSource> connectionDataSources)
-
BitmapShardDataSourceProvider
public BitmapShardDataSourceProvider(Class<? extends DataSource> dataSourceClass, Map<String,String> commonDataSourceProperties, Map<String,String> connectionUrls) throws InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException
-
-
Method Detail
-
getDataSourceId
public int getDataSourceId(int virtualShardId)
- Specified by:
getDataSourceIdin interfaceDataSourceProvider
-
getDataSource
public DataSource getDataSource(int virtualShardId)
- Specified by:
getDataSourcein interfaceDataSourceProvider
-
getDistinctShardIds
public List<Integer> getDistinctShardIds()
- Specified by:
getDistinctShardIdsin interfaceDataSourceProvider
-
-