public class ShardingKey<T> extends Object implements IShardingKey<T>
| Modifier and Type | Field and Description |
|---|---|
private String |
clusterName
集群数据库名称.
|
private T |
value
分库分表因子.
|
| Constructor and Description |
|---|
ShardingKey(String clusterName,
T value)
构造方法.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getClusterName()
获取集群名称.
|
T |
getValue()
获取分库分表因子.
|
void |
setValue(T value)
设置分库分表因子.
|
String |
toString() |
static ShardingKey |
valueOf(String clusterName,
Object value)
构造方法
|
public static final ShardingKey valueOf(String clusterName, Object value)
public String getClusterName()
IShardingKeygetClusterName in interface IShardingKey<T>public T getValue()
IShardingKeygetValue in interface IShardingKey<T>public void setValue(T value)
IShardingKeysetValue in interface IShardingKey<T>Copyright © 2015. All rights reserved.