public final class HintManagerHolder extends Object
Use thread-local to manage hint.
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DB_COLUMN_NAME |
static String |
DB_TABLE_NAME |
| 构造器和说明 |
|---|
HintManagerHolder() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
clear()
Clear hint manager for current thread-local.
|
static HintManager |
get()
Get hint manager in current thread.
|
static com.google.common.base.Optional<ShardingValue> |
getDatabaseShardingValue(String logicTable)
Get database sharding value.
|
static com.google.common.base.Optional<ShardingValue> |
getTableShardingValue(String logicTable)
Get table sharding value.
|
static boolean |
isDatabaseShardingOnly()
Judge whether only database is sharding.
|
static boolean |
isMasterRouteOnly()
Judge whether it is routed to master database or not.
|
static void |
setHintManager(HintManager hintManager)
Set hint manager.
|
public static void setHintManager(HintManager hintManager)
hintManager - hint manager instancepublic static boolean isDatabaseShardingOnly()
public static boolean isMasterRouteOnly()
public static com.google.common.base.Optional<ShardingValue> getDatabaseShardingValue(String logicTable)
logicTable - logic tablepublic static com.google.common.base.Optional<ShardingValue> getTableShardingValue(String logicTable)
logicTable - logic table namepublic static HintManager get()
public static void clear()
Copyright © 2019. All rights reserved.