Interface RuleDefinitionDropUpdater<T extends org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement,R extends RuleConfiguration>
- Type Parameters:
T- type of SQL statementR- type of rule configuration
- All Superinterfaces:
RuleDefinitionUpdater<T,,R> org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPI
public interface RuleDefinitionDropUpdater<T extends org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement,R extends RuleConfiguration>
extends RuleDefinitionUpdater<T,R>
Drop rule definition updater.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Collection<String>getIdenticalData(Collection<String> currentRules, Collection<String> toBeDroppedRules) Get identical data.default booleanhasAnyOneToBeDropped(T sqlStatement, R currentRuleConfig) Whether there is dropped data.default booleanisExistRuleConfig(R currentRuleConfig) Whether there is configuration.booleanupdateCurrentRuleConfiguration(T sqlStatement, R currentRuleConfig) Update current rule configuration.Methods inherited from interface org.apache.shardingsphere.distsql.handler.update.RuleDefinitionUpdater
checkSQLStatement, getRuleConfigurationClassMethods inherited from interface org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPI
getType, getTypeAliases, init, isDefault
-
Method Details
-
updateCurrentRuleConfiguration
Update current rule configuration.- Parameters:
sqlStatement- SQL statementcurrentRuleConfig- current rule configuration to be updated- Returns:
- current rule configuration is empty or not
-
isExistRuleConfig
Whether there is configuration.- Parameters:
currentRuleConfig- current rule configuration- Returns:
- configuration exists or does not exist
-
hasAnyOneToBeDropped
Whether there is dropped data.- Parameters:
sqlStatement- SQL statementcurrentRuleConfig- current rule configuration- Returns:
- dropped data exists or does not exist
-
getIdenticalData
default Collection<String> getIdenticalData(Collection<String> currentRules, Collection<String> toBeDroppedRules) Get identical data.- Parameters:
currentRules- collectiontoBeDroppedRules- collection- Returns:
- identical data
-