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 assertClose() throws NoSuchFieldException, IllegalAccessException {
          DataSourceManager dataSourceManager = new DataSourceManager(syncConfigurations);
          dataSourceManager.close();
          Map<?, ?> cachedDataSources = ReflectionUtil.getFieldValueFromClass(dataSourceManager, "cachedDataSources", Map.class);
          assertNotNull(cachedDataSources);
          assertThat(cachedDataSources.size(), is(0));
      }
test_case.class_method_signature: DataSourceManagerTest.assertClose()
test_case.full_signature: @Test public void assertClose()
test_case.identifier: assertClose
test_case.invocations: close getFieldValueFromClass assertNotNull assertThat size is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertClose()
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: @Override
      public void close() {
          for (DataSourceWrapper each : cachedDataSources.values()) {
              try {
                  each.close();
              } catch (final IOException ex) {
                  log.error("An exception occurred while closing the data source", ex);
              }
          }
          cachedDataSources.clear();
          sourceDataSources.clear();
      }
focal_method.class_method_signature: DataSourceManager.close()
focal_method.full_signature: @Override public void close()
focal_method.identifier: close
focal_method.invocations: values close error clear clear
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void close()