public class ShadowRuleStatementChecker extends Object
| 构造器和说明 |
|---|
ShadowRuleStatementChecker() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
checkAlgorithmCompleteness(Collection<ShadowAlgorithmSegment> algorithmSegments)
Check the completeness of the algorithm.
|
static void |
checkAlgorithmExist(Collection<String> requireAlgorithms,
Collection<String> currentAlgorithms,
Function<Set<String>,org.apache.shardingsphere.infra.distsql.exception.DistSQLException> thrower)
Check if the algorithms exist.
|
static void |
checkAnyDifferent(Collection<String> requireRules,
Collection<String> currentRules,
Function<Set<String>,org.apache.shardingsphere.infra.distsql.exception.DistSQLException> thrower)
Check for any different data in the rules, and throw the specified exception.
|
static void |
checkAnyDuplicate(Collection<String> requireRules,
Collection<String> currentRules,
Function<Set<String>,org.apache.shardingsphere.infra.distsql.exception.DistSQLException> thrower)
Check if there are duplicates in the rules, and throw the specified exception.
|
static void |
checkAnyDuplicate(Collection<String> rules,
Function<Set<String>,org.apache.shardingsphere.infra.distsql.exception.DistSQLException> thrower)
Check for any duplicate data in the rules, and throw the specified exception.
|
static void |
checkConfigurationExist(String schemaName,
org.apache.shardingsphere.infra.config.scope.SchemaRuleConfiguration configuration)
Check if the configuration exists.
|
static void |
checkResourceExist(Collection<String> resources,
org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData metaData,
String schemaName)
Check if resources exist in meta data.
|
static void |
checkRulesExist(Collection<String> requireRules,
Collection<String> currentRules,
Function<Set<String>,org.apache.shardingsphere.infra.distsql.exception.DistSQLException> thrower)
Check if the rules exist.
|
public static void checkConfigurationExist(String schemaName, org.apache.shardingsphere.infra.config.scope.SchemaRuleConfiguration configuration) throws org.apache.shardingsphere.infra.distsql.exception.DistSQLException
schemaName - schema nameconfiguration - configurationorg.apache.shardingsphere.infra.distsql.exception.DistSQLException - DistSQL exceptionpublic static void checkResourceExist(Collection<String> resources, org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData metaData, String schemaName) throws org.apache.shardingsphere.infra.distsql.exception.DistSQLException
resources - resource being checkedmetaData - meta rulesschemaName - schema nameorg.apache.shardingsphere.infra.distsql.exception.DistSQLException - DistSQL exceptionpublic static void checkAlgorithmCompleteness(Collection<ShadowAlgorithmSegment> algorithmSegments) throws org.apache.shardingsphere.infra.distsql.exception.DistSQLException
algorithmSegments - algorithmSegments to be checkedorg.apache.shardingsphere.infra.distsql.exception.DistSQLException - DistSQL exceptionpublic static void checkRulesExist(Collection<String> requireRules, Collection<String> currentRules, Function<Set<String>,org.apache.shardingsphere.infra.distsql.exception.DistSQLException> thrower) throws org.apache.shardingsphere.infra.distsql.exception.DistSQLException
requireRules - require rulescurrentRules - current rulesthrower - throwerorg.apache.shardingsphere.infra.distsql.exception.DistSQLException - DistSQL exceptionpublic static void checkAlgorithmExist(Collection<String> requireAlgorithms, Collection<String> currentAlgorithms, Function<Set<String>,org.apache.shardingsphere.infra.distsql.exception.DistSQLException> thrower) throws org.apache.shardingsphere.infra.distsql.exception.DistSQLException
requireAlgorithms - require algorithmscurrentAlgorithms - current algorithmsthrower - throwerorg.apache.shardingsphere.infra.distsql.exception.DistSQLException - DistSQL exceptionpublic static void checkAnyDuplicate(Collection<String> rules, Function<Set<String>,org.apache.shardingsphere.infra.distsql.exception.DistSQLException> thrower) throws org.apache.shardingsphere.infra.distsql.exception.DistSQLException
rules - rules to be checkedthrower - exception throwerorg.apache.shardingsphere.infra.distsql.exception.DistSQLException - DistSQL exceptionpublic static void checkAnyDuplicate(Collection<String> requireRules, Collection<String> currentRules, Function<Set<String>,org.apache.shardingsphere.infra.distsql.exception.DistSQLException> thrower) throws org.apache.shardingsphere.infra.distsql.exception.DistSQLException
requireRules - rules to be checkedcurrentRules - rules to be checkedthrower - exception throwerorg.apache.shardingsphere.infra.distsql.exception.DistSQLException - DistSQL exceptionpublic static void checkAnyDifferent(Collection<String> requireRules, Collection<String> currentRules, Function<Set<String>,org.apache.shardingsphere.infra.distsql.exception.DistSQLException> thrower) throws org.apache.shardingsphere.infra.distsql.exception.DistSQLException
requireRules - rules to be checkedcurrentRules - rules to be checkedthrower - exception throwerorg.apache.shardingsphere.infra.distsql.exception.DistSQLException - DistSQL exceptionCopyright © 2021 The Apache Software Foundation. All rights reserved.