public class AradinContextHolder extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
MODE_GLOBAL |
static String |
MODE_INHERITABLETHREADLOCAL |
static String |
MODE_THREADLOCAL |
static String |
SYSTEM_PROPERTY |
| 构造器和说明 |
|---|
AradinContextHolder() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
clearContext()
Explicitly clears the context value from the current thread.
|
static AradinContext |
createEmptyContext()
Delegates the creation of a new, empty context to the configured strategy.
|
static AradinContext |
getContext()
Obtain the current
AradinContext. |
static AradinContextHolderStrategy |
getContextHolderStrategy()
Allows retrieval of the context strategy.
|
static int |
getInitializeCount()
Primarily for troubleshooting purposes, this method shows how many times the class
has re-initialized its
AradinContextHolderStrategy. |
static void |
setContext(AradinContext context)
Associates a new
AradinContext with the current thread of execution. |
static void |
setStrategyName(String strategyName)
Changes the preferred strategy.
|
String |
toString() |
public static void clearContext()
public static AradinContext getContext()
AradinContext.null)public static int getInitializeCount()
AradinContextHolderStrategy.setStrategyName(String) to switch to an alternate strategy.public static void setContext(AradinContext context)
AradinContext with the current thread of execution.context - the new AradinContext (may not be null)public static void setStrategyName(String strategyName)
strategyName - the fully qualified class name of the strategy that should be
used.public static AradinContextHolderStrategy getContextHolderStrategy()
public static AradinContext createEmptyContext()
Copyright © 2022. All rights reserved.