public class DataSourceKey extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
private static ThreadLocal<Deque<String>> |
lookup |
| 限定符 | 构造器和说明 |
|---|---|
private |
DataSourceKey() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
clear() |
static void |
forceClear() |
static String |
get() |
static String |
getByAnnotation()
已过时。
|
static String |
getByManual()
已过时。
|
static String |
getShardingDsKey(String dataSource,
Object mapper,
Method method,
Object[] args) |
static String |
processDataSourceKey(String dataSourceKey,
Object targetOrProxy,
Method method,
Object[] arguments) |
static void |
setAnnotationKeyThreadLocal(ThreadLocal<String> annotationKeyThreadLocal)
已过时。
|
static void |
setManualKeyThreadLocal(ThreadLocal<String> manualKeyThreadLocal)
已过时。
|
static void |
setThreadLocal(ThreadLocal<Deque<String>> threadLocal) |
static void |
use(String dataSourceKey) |
static void |
use(String dataSourceKey,
Runnable runnable) |
static <T> T |
use(String dataSourceKey,
Supplier<T> supplier) |
static void |
useWithAnnotation(String dataSourceKey)
已过时。
|
private static ThreadLocal<Deque<String>> lookup
private DataSourceKey()
public static void clear()
public static void forceClear()
public static void setThreadLocal(ThreadLocal<Deque<String>> threadLocal)
public static String processDataSourceKey(String dataSourceKey, Object targetOrProxy, Method method, Object[] arguments)
public static String getShardingDsKey(String dataSource, Object mapper, Method method, Object[] args)
@Deprecated public static String getByManual()
@Deprecated public static String getByAnnotation()
@Deprecated public static void useWithAnnotation(String dataSourceKey)
@Deprecated public static void setAnnotationKeyThreadLocal(ThreadLocal<String> annotationKeyThreadLocal)
@Deprecated public static void setManualKeyThreadLocal(ThreadLocal<String> manualKeyThreadLocal)
Copyright © 2025. All rights reserved.