Interface SQLRouter<T extends org.apache.shardingsphere.infra.rule.ShardingSphereRule>
- Type Parameters:
T- type of rule
- All Superinterfaces:
org.apache.shardingsphere.infra.util.spi.type.ordered.OrderedSPI<T>
public interface SQLRouter<T extends org.apache.shardingsphere.infra.rule.ShardingSphereRule>
extends org.apache.shardingsphere.infra.util.spi.type.ordered.OrderedSPI<T>
SQL Router.
-
Method Summary
Modifier and TypeMethodDescriptioncreateRouteContext(QueryContext queryContext, org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData globalRuleMetaData, org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase database, T rule, org.apache.shardingsphere.infra.config.props.ConfigurationProperties props, org.apache.shardingsphere.infra.context.ConnectionContext connectionContext) Create route context.voiddecorateRouteContext(RouteContext routeContext, QueryContext queryContext, org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase database, T rule, org.apache.shardingsphere.infra.config.props.ConfigurationProperties props, org.apache.shardingsphere.infra.context.ConnectionContext connectionContext) Decorate route context.Methods inherited from interface org.apache.shardingsphere.infra.util.spi.type.ordered.OrderedSPI
getOrder, getTypeClass
-
Method Details
-
createRouteContext
RouteContext createRouteContext(QueryContext queryContext, org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData globalRuleMetaData, org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase database, T rule, org.apache.shardingsphere.infra.config.props.ConfigurationProperties props, org.apache.shardingsphere.infra.context.ConnectionContext connectionContext) Create route context.- Parameters:
queryContext- query contextglobalRuleMetaData- global rule meta datadatabase- databaserule- ruleprops- configuration propertiesconnectionContext- connection context- Returns:
- route context
-
decorateRouteContext
void decorateRouteContext(RouteContext routeContext, QueryContext queryContext, org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase database, T rule, org.apache.shardingsphere.infra.config.props.ConfigurationProperties props, org.apache.shardingsphere.infra.context.ConnectionContext connectionContext) Decorate route context.- Parameters:
routeContext- route contextqueryContext- query contextdatabase- databaserule- ruleprops- configuration propertiesconnectionContext- connection context
-