test_class.file: shardingsphere-features/shardingsphere-primary-replica-replication/shardingsphere-primary-replica-replication-common/src/test/java/org/apache/shardingsphere/replication/primaryreplica/rule/PrimaryReplicaReplicationRuleTest.java
test_class.identifier: PrimaryReplicaReplicationRuleTest
test_case.body: @Test
      public void assertFindDataSourceRule() {
          Optional<PrimaryReplicaReplicationDataSourceRule> actual = createPrimaryReplicaReplicationRule().findDataSourceRule("test_pr");
          assertTrue(actual.isPresent());
          assertDataSourceRule(actual.get());
      }
test_case.class_method_signature: PrimaryReplicaReplicationRuleTest.assertFindDataSourceRule()
test_case.full_signature: @Test public void assertFindDataSourceRule()
test_case.identifier: assertFindDataSourceRule
test_case.invocations: findDataSourceRule createPrimaryReplicaReplicationRule assertTrue isPresent assertDataSourceRule get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertFindDataSourceRule()
focal_class.declarator: loadBalancers = new LinkedHashMap<>()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, ReplicaLoadBalanceAlgorithm> loadBalancers = new LinkedHashMap<>();
focal_class.type: Map<String, ReplicaLoadBalanceAlgorithm>
focal_class.var_name: loadBalancers
focal_class.declarator: dataSourceRules
focal_class.modifier: private final
focal_class.original_string: private final Map<String, PrimaryReplicaReplicationDataSourceRule> dataSourceRules;
focal_class.type: Map<String, PrimaryReplicaReplicationDataSourceRule>
focal_class.var_name: dataSourceRules
focal_class.file: shardingsphere-features/shardingsphere-primary-replica-replication/shardingsphere-primary-replica-replication-common/src/main/java/org/apache/shardingsphere/replication/primaryreplica/rule/PrimaryReplicaReplicationRule.java
focal_class.identifier: PrimaryReplicaReplicationRule
focal_class.interfaces: implements DataSourceRoutedRule, StatusContainedRule
focal_class.class_method_signature: PrimaryReplicaReplicationRule.PrimaryReplicaReplicationRule(final PrimaryReplicaReplicationRuleConfiguration config)
focal_class.full_signature: public  PrimaryReplicaReplicationRule(final PrimaryReplicaReplicationRuleConfiguration config)
focal_class.identifier: PrimaryReplicaReplicationRule
focal_class.modifiers: public
focal_class.parameters: (final PrimaryReplicaReplicationRuleConfiguration config)
focal_class.signature:  PrimaryReplicaReplicationRule(final PrimaryReplicaReplicationRuleConfiguration config)
focal_class.class_method_signature: PrimaryReplicaReplicationRule.PrimaryReplicaReplicationRule(final AlgorithmProvidedPrimaryReplicaReplicationRuleConfiguration config)
focal_class.full_signature: public  PrimaryReplicaReplicationRule(final AlgorithmProvidedPrimaryReplicaReplicationRuleConfiguration config)
focal_class.identifier: PrimaryReplicaReplicationRule
focal_class.modifiers: public
focal_class.parameters: (final AlgorithmProvidedPrimaryReplicaReplicationRuleConfiguration config)
focal_class.signature:  PrimaryReplicaReplicationRule(final AlgorithmProvidedPrimaryReplicaReplicationRuleConfiguration config)
focal_class.class_method_signature: PrimaryReplicaReplicationRule.getSingleDataSourceRule()
focal_class.full_signature: public PrimaryReplicaReplicationDataSourceRule getSingleDataSourceRule()
focal_class.identifier: getSingleDataSourceRule
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: PrimaryReplicaReplicationDataSourceRule
focal_class.signature: PrimaryReplicaReplicationDataSourceRule getSingleDataSourceRule()
focal_class.class_method_signature: PrimaryReplicaReplicationRule.findDataSourceRule(final String dataSourceName)
focal_class.full_signature: public Optional<PrimaryReplicaReplicationDataSourceRule> findDataSourceRule(final String dataSourceName)
focal_class.identifier: findDataSourceRule
focal_class.modifiers: public
focal_class.parameters: (final String dataSourceName)
focal_class.return: Optional<PrimaryReplicaReplicationDataSourceRule>
focal_class.signature: Optional<PrimaryReplicaReplicationDataSourceRule> findDataSourceRule(final String dataSourceName)
focal_class.class_method_signature: PrimaryReplicaReplicationRule.getDataSourceMapper()
focal_class.full_signature: @Override public Map<String, Collection<String>> getDataSourceMapper()
focal_class.identifier: getDataSourceMapper
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map<String, Collection<String>>
focal_class.signature: Map<String, Collection<String>> getDataSourceMapper()
focal_class.class_method_signature: PrimaryReplicaReplicationRule.updateRuleStatus(final RuleChangedEvent event)
focal_class.full_signature: @Override public void updateRuleStatus(final RuleChangedEvent event)
focal_class.identifier: updateRuleStatus
focal_class.modifiers: @Override public
focal_class.parameters: (final RuleChangedEvent event)
focal_class.return: void
focal_class.signature: void updateRuleStatus(final RuleChangedEvent event)
focal_method.body: public Optional<PrimaryReplicaReplicationDataSourceRule> findDataSourceRule(final String dataSourceName) {
          return Optional.ofNullable(dataSourceRules.get(dataSourceName));
      }
focal_method.class_method_signature: PrimaryReplicaReplicationRule.findDataSourceRule(final String dataSourceName)
focal_method.full_signature: public Optional<PrimaryReplicaReplicationDataSourceRule> findDataSourceRule(final String dataSourceName)
focal_method.identifier: findDataSourceRule
focal_method.invocations: ofNullable get
focal_method.modifiers: public
focal_method.parameters: (final String dataSourceName)
focal_method.return: Optional<PrimaryReplicaReplicationDataSourceRule>
focal_method.signature: Optional<PrimaryReplicaReplicationDataSourceRule> findDataSourceRule(final String dataSourceName)