public class CentralizedThreadLocal<T> extends ThreadLocal<T>
| Constructor and Description |
|---|
CentralizedThreadLocal(boolean shortLived) |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearLongLivedThreadLocals() |
static void |
clearShortLivedThreadLocals() |
protected T |
copy(T value) |
boolean |
equals(Object obj) |
T |
get() |
static Map<CentralizedThreadLocal<?>,Object> |
getLongLivedThreadLocals() |
static Map<CentralizedThreadLocal<?>,Object> |
getShortLivedThreadLocals() |
int |
hashCode() |
void |
remove() |
void |
set(T value) |
static void |
setThreadLocals(Map<CentralizedThreadLocal<?>,Object> longLivedThreadLocals,
Map<CentralizedThreadLocal<?>,Object> shortLivedThreadLocals) |
initialValuepublic static void clearLongLivedThreadLocals()
public static void clearShortLivedThreadLocals()
public static Map<CentralizedThreadLocal<?>,Object> getLongLivedThreadLocals()
public static Map<CentralizedThreadLocal<?>,Object> getShortLivedThreadLocals()
public static void setThreadLocals(Map<CentralizedThreadLocal<?>,Object> longLivedThreadLocals, Map<CentralizedThreadLocal<?>,Object> shortLivedThreadLocals)
public T get()
get in class ThreadLocal<T>public void remove()
remove in class ThreadLocal<T>public void set(T value)
set in class ThreadLocal<T>