Class CachedShardingSQLRouter
java.lang.Object
org.apache.shardingsphere.sharding.cache.route.CachedShardingSQLRouter
- All Implemented Interfaces:
org.apache.shardingsphere.infra.route.SQLRouter<ShardingCacheRule>,org.apache.shardingsphere.infra.util.spi.type.ordered.OrderedSPI<ShardingCacheRule>
public final class CachedShardingSQLRouter
extends Object
implements org.apache.shardingsphere.infra.route.SQLRouter<ShardingCacheRule>
TODO Design a cache layer interface in kernel.
Cached sharding SQL router.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.shardingsphere.infra.route.context.RouteContextcreateRouteContext(org.apache.shardingsphere.infra.binder.QueryContext queryContext, org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData globalRuleMetaData, org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase database, ShardingCacheRule rule, org.apache.shardingsphere.infra.config.props.ConfigurationProperties props, org.apache.shardingsphere.infra.context.ConnectionContext connectionContext) voiddecorateRouteContext(org.apache.shardingsphere.infra.route.context.RouteContext routeContext, org.apache.shardingsphere.infra.binder.QueryContext queryContext, org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase database, ShardingCacheRule rule, org.apache.shardingsphere.infra.config.props.ConfigurationProperties props, org.apache.shardingsphere.infra.context.ConnectionContext connectionContext) intgetOrder()
-
Constructor Details
-
CachedShardingSQLRouter
public CachedShardingSQLRouter()
-
-
Method Details
-
createRouteContext
public org.apache.shardingsphere.infra.route.context.RouteContext createRouteContext(org.apache.shardingsphere.infra.binder.QueryContext queryContext, org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData globalRuleMetaData, org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase database, ShardingCacheRule rule, org.apache.shardingsphere.infra.config.props.ConfigurationProperties props, org.apache.shardingsphere.infra.context.ConnectionContext connectionContext) - Specified by:
createRouteContextin interfaceorg.apache.shardingsphere.infra.route.SQLRouter<ShardingCacheRule>
-
decorateRouteContext
public void decorateRouteContext(org.apache.shardingsphere.infra.route.context.RouteContext routeContext, org.apache.shardingsphere.infra.binder.QueryContext queryContext, org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase database, ShardingCacheRule rule, org.apache.shardingsphere.infra.config.props.ConfigurationProperties props, org.apache.shardingsphere.infra.context.ConnectionContext connectionContext) - Specified by:
decorateRouteContextin interfaceorg.apache.shardingsphere.infra.route.SQLRouter<ShardingCacheRule>
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.apache.shardingsphere.infra.util.spi.type.ordered.OrderedSPI<ShardingCacheRule>
-
getTypeClass
- Specified by:
getTypeClassin interfaceorg.apache.shardingsphere.infra.util.spi.type.ordered.OrderedSPI<ShardingCacheRule>
-