org.tinygroup.dbrouter.impl.shardrule
类 ShardRuleByIdAbstract
java.lang.Object
org.tinygroup.dbrouter.impl.shardrule.ShardRuleByIdAbstract
- 所有已实现的接口:
- ShardRule
- 直接已知子类:
- ShardRuleByIdDifferentSchema, ShardRuleByIdSameSchema
public abstract class ShardRuleByIdAbstract
- extends Object
- implements ShardRule
Created by luoguo on 13-12-17.
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShardRuleByIdAbstract
public ShardRuleByIdAbstract()
ShardRuleByIdAbstract
public ShardRuleByIdAbstract(String tableName,
String primaryKeyFieldName,
int remainder)
getTableName
public String getTableName()
setTableName
public void setTableName(String tableName)
getPrimaryKeyFieldName
public String getPrimaryKeyFieldName()
setPrimaryKeyFieldName
public void setPrimaryKeyFieldName(String primaryKeyFieldName)
getRemainder
public long getRemainder()
setRemainder
public void setRemainder(int remainder)
isMatch
public boolean isMatch(Partition partition,
Shard shard,
String sql,
Object... preparedParams)
- 从接口
ShardRule 复制的描述
- 返回是否属于当前分片处理
- 指定者:
- 接口
ShardRule 中的 isMatch
- 参数:
partition - 所属的分区shard - TODOsql - 要判断的SQLpreparedParams - Prepared Statement的参数
- 返回:
Copyright © 2006–2015 TinyGroup. All rights reserved.