| 软件包 | 描述 |
|---|---|
| org.tinygroup.dbrouter | |
| org.tinygroup.dbrouter.config | |
| org.tinygroup.dbrouter.context | |
| org.tinygroup.dbrouter.impl | |
| org.tinygroup.dbrouter.impl.keygenerator |
| Modifier and Type | Method and 描述 |
|---|---|
Router |
RouterManager.getRouter(String routerId)
获取集群
|
| Modifier and Type | Method and 描述 |
|---|---|
Map<String,Router> |
RouterManager.getRouterMap()
获取集群配置Map
|
| Modifier and Type | Method and 描述 |
|---|---|
void |
RouterManager.addRouter(Router router)
添加集群
|
Partition |
RouterManager.getPartition(Router router,
String sql)
获取匹配的首个分区
|
List<Partition> |
RouterManager.getPartitions(Router router,
String sql)
获取匹配的分区
|
<T> T |
RouterManager.getPrimaryKey(Router router,
String tableName)
给某个集群的数据表产生主键
|
void |
RouterKeyGenerator.setRouter(Router router)
注入Router对象给主键获取器
有的时候,主键发生器需要获取集群相关的信息
|
| Modifier and Type | Method and 描述 |
|---|---|
Router |
Partition.getRouter() |
| Modifier and Type | Method and 描述 |
|---|---|
List<Router> |
Routers.getRouterList() |
| Modifier and Type | Method and 描述 |
|---|---|
void |
Partition.setRouter(Router router) |
| Modifier and Type | Method and 描述 |
|---|---|
void |
Routers.setRouterList(List<Router> routerList) |
| Modifier and Type | Method and 描述 |
|---|---|
Router |
ResultSetExecutor.getRouter() |
Router |
RealStatementExecutor.getRouter() |
Router |
StatementExecuteContext.getRouter() |
| Modifier and Type | Method and 描述 |
|---|---|
void |
StatementExecuteContext.setRouter(Router router) |
| Constructor and 描述 |
|---|
RealStatementExecutor(Statement realStatement,
String executeSql,
String originalSql,
Shard shard,
Partition partition,
Router router,
Object[] values) |
ResultSetExecutor(ResultSet resultSet,
String executeSql,
String originalSql,
Shard shard,
Partition partition,
Router router) |
| Modifier and Type | Method and 描述 |
|---|---|
Router |
RouterManagerImpl.getRouter(String routerId) |
| Modifier and Type | Method and 描述 |
|---|---|
Map<String,Router> |
RouterManagerImpl.getRouterMap() |
| Modifier and Type | Method and 描述 |
|---|---|
void |
RouterManagerImpl.addRouter(Router router) |
Partition |
RouterManagerImpl.getPartition(Router router,
String sql) |
List<Partition> |
RouterManagerImpl.getPartitions(Router router,
String sql) |
<T> T |
RouterManagerImpl.getPrimaryKey(Router router,
String tableName) |
| Modifier and Type | Field and 描述 |
|---|---|
protected Router |
AbstractRouterKeyGenerator.router |
| Modifier and Type | Method and 描述 |
|---|---|
void |
RouterKeyGeneratorUUID.setRouter(Router router) |
void |
AbstractRouterKeyGenerator.setRouter(Router router) |
Copyright © 2006–2015 TinyGroup. All rights reserved.