test_class.declarator: GSON = new Gson()
test_class.modifier: private static final
test_class.original_string: private static final Gson GSON = new Gson();
test_class.type: Gson
test_class.var_name: GSON
test_class.declarator: syncConfigurations
test_class.modifier: private
test_class.original_string: private List<SyncConfiguration> syncConfigurations;
test_class.type: List<SyncConfiguration>
test_class.var_name: syncConfigurations
test_class.file: shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/datasource/DataSourceManagerTest.java
test_class.identifier: DataSourceManagerTest
test_case.body: @Test
      public void assertGetDataSource() {
          DataSourceManager dataSourceManager = new DataSourceManager();
          DataSource actual = dataSourceManager.getDataSource(syncConfigurations.get(0).getDumperConfiguration().getDataSourceConfiguration());
          assertThat(actual, instanceOf(DataSourceWrapper.class));
      }
test_case.class_method_signature: DataSourceManagerTest.assertGetDataSource()
test_case.full_signature: @Test public void assertGetDataSource()
test_case.identifier: assertGetDataSource
test_case.invocations: getDataSource getDataSourceConfiguration getDumperConfiguration get assertThat instanceOf
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertGetDataSource()
focal_class.declarator: dataSourceFactory = new DataSourceFactory()
focal_class.modifier: private final
focal_class.original_string: private final DataSourceFactory dataSourceFactory = new DataSourceFactory();
focal_class.type: DataSourceFactory
focal_class.var_name: dataSourceFactory
focal_class.declarator: cachedDataSources = new ConcurrentHashMap<>()
focal_class.modifier: @Getter
      private final
focal_class.original_string: @Getter
      private final Map<ScalingDataSourceConfiguration, DataSourceWrapper> cachedDataSources = new ConcurrentHashMap<>();
focal_class.type: Map<ScalingDataSourceConfiguration, DataSourceWrapper>
focal_class.var_name: cachedDataSources
focal_class.declarator: sourceDataSources = new ConcurrentHashMap<>()
focal_class.modifier: @Getter
      private final
focal_class.original_string: @Getter
      private final Map<ScalingDataSourceConfiguration, DataSourceWrapper> sourceDataSources = new ConcurrentHashMap<>();
focal_class.type: Map<ScalingDataSourceConfiguration, DataSourceWrapper>
focal_class.var_name: sourceDataSources
focal_class.file: shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/datasource/DataSourceManager.java
focal_class.identifier: DataSourceManager
focal_class.interfaces: implements AutoCloseable
focal_class.class_method_signature: DataSourceManager.DataSourceManager(final List<SyncConfiguration> syncConfigs)
focal_class.full_signature: public  DataSourceManager(final List<SyncConfiguration> syncConfigs)
focal_class.identifier: DataSourceManager
focal_class.modifiers: public
focal_class.parameters: (final List<SyncConfiguration> syncConfigs)
focal_class.signature:  DataSourceManager(final List<SyncConfiguration> syncConfigs)
focal_class.class_method_signature: DataSourceManager.createDataSources(final List<SyncConfiguration> syncConfigs)
focal_class.full_signature: private void createDataSources(final List<SyncConfiguration> syncConfigs)
focal_class.identifier: createDataSources
focal_class.modifiers: private
focal_class.parameters: (final List<SyncConfiguration> syncConfigs)
focal_class.return: void
focal_class.signature: void createDataSources(final List<SyncConfiguration> syncConfigs)
focal_class.class_method_signature: DataSourceManager.createSourceDataSources(final List<SyncConfiguration> syncConfigs)
focal_class.full_signature: private void createSourceDataSources(final List<SyncConfiguration> syncConfigs)
focal_class.identifier: createSourceDataSources
focal_class.modifiers: private
focal_class.parameters: (final List<SyncConfiguration> syncConfigs)
focal_class.return: void
focal_class.signature: void createSourceDataSources(final List<SyncConfiguration> syncConfigs)
focal_class.class_method_signature: DataSourceManager.createTargetDataSources(final ScalingDataSourceConfiguration dataSourceConfig)
focal_class.full_signature: private void createTargetDataSources(final ScalingDataSourceConfiguration dataSourceConfig)
focal_class.identifier: createTargetDataSources
focal_class.modifiers: private
focal_class.parameters: (final ScalingDataSourceConfiguration dataSourceConfig)
focal_class.return: void
focal_class.signature: void createTargetDataSources(final ScalingDataSourceConfiguration dataSourceConfig)
focal_class.class_method_signature: DataSourceManager.getDataSource(final ScalingDataSourceConfiguration dataSourceConfig)
focal_class.full_signature: public DataSource getDataSource(final ScalingDataSourceConfiguration dataSourceConfig)
focal_class.identifier: getDataSource
focal_class.modifiers: public
focal_class.parameters: (final ScalingDataSourceConfiguration dataSourceConfig)
focal_class.return: DataSource
focal_class.signature: DataSource getDataSource(final ScalingDataSourceConfiguration dataSourceConfig)
focal_class.class_method_signature: DataSourceManager.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_method.body: public DataSource getDataSource(final ScalingDataSourceConfiguration dataSourceConfig) {
          if (cachedDataSources.containsKey(dataSourceConfig)) {
              return cachedDataSources.get(dataSourceConfig);
          }
          synchronized (cachedDataSources) {
              if (cachedDataSources.containsKey(dataSourceConfig)) {
                  return cachedDataSources.get(dataSourceConfig);
              }
              DataSourceWrapper result = dataSourceFactory.newInstance(dataSourceConfig);
              cachedDataSources.put(dataSourceConfig, result);
              return result;
          }
      }
focal_method.class_method_signature: DataSourceManager.getDataSource(final ScalingDataSourceConfiguration dataSourceConfig)
focal_method.full_signature: public DataSource getDataSource(final ScalingDataSourceConfiguration dataSourceConfig)
focal_method.identifier: getDataSource
focal_method.invocations: containsKey get containsKey get newInstance put
focal_method.modifiers: public
focal_method.parameters: (final ScalingDataSourceConfiguration dataSourceConfig)
focal_method.return: DataSource
focal_method.signature: DataSource getDataSource(final ScalingDataSourceConfiguration dataSourceConfig)