public interface IStrategy
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
STRATEGY_R |
static int |
STRATEGY_W |
| 限定符和类型 | 方法和说明 |
|---|---|
List<String> |
getOneDSFromEachGroupOfObject(Class clazz,
int rw)
按照对象的策略里面的配置的数据库集群:
根据读写策略来获取没给集群里面的一个数据库
|
boolean |
isReadWrite(Class clazz,
Object account) |
Object |
ListShardingStrategy(String listName,
Object account,
int rw) |
Object |
MapShardingStrategy(String listName,
Object account,
int rw) |
Object |
NextListShardingStrategy(String listName,
int rw) |
Object |
ObjectShardingStrategy(Class clazz,
Object account,
int rw) |
static final int STRATEGY_R
static final int STRATEGY_W
Object ObjectShardingStrategy(Class clazz, Object account, int rw) throws StrategyException
Object ListShardingStrategy(String listName, Object account, int rw) throws StrategyException
Object MapShardingStrategy(String listName, Object account, int rw) throws StrategyException
boolean isReadWrite(Class clazz, Object account) throws StrategyException
Object NextListShardingStrategy(String listName, int rw) throws StrategyException
List<String> getOneDSFromEachGroupOfObject(Class clazz, int rw) throws StrategyException
clazz - 对象的类名称rw - 读库还是写库StrategyExceptionCopyright © 2021. All rights reserved.