com.liferay.portal.kernel.util
Class CentralizedThreadLocal<T>

java.lang.Object
  extended by java.lang.ThreadLocal<T>
      extended by com.liferay.portal.kernel.util.CentralizedThreadLocal<T>
Direct Known Subclasses:
InitialThreadLocal

public class CentralizedThreadLocal<T>
extends java.lang.ThreadLocal<T>

Author:
Shuyang Zhou

Constructor Summary
CentralizedThreadLocal(boolean shortLived)
           
 
Method Summary
static void clearLongLivedThreadLocals()
           
static void clearShortLivedThreadLocals()
           
 T get()
           
static java.util.Map<CentralizedThreadLocal<?>,java.lang.Object> getLongLivedThreadLocals()
           
static java.util.Map<CentralizedThreadLocal<?>,java.lang.Object> getShortLivedThreadLocals()
           
 int hashCode()
           
 void remove()
           
 void set(T value)
           
static void setThreadLocals(java.util.Map<CentralizedThreadLocal<?>,java.lang.Object> longLivedThreadLocals, java.util.Map<CentralizedThreadLocal<?>,java.lang.Object> shortLivedThreadLocals)
           
 
Methods inherited from class java.lang.ThreadLocal
initialValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CentralizedThreadLocal

public CentralizedThreadLocal(boolean shortLived)
Method Detail

clearLongLivedThreadLocals

public static void clearLongLivedThreadLocals()

clearShortLivedThreadLocals

public static void clearShortLivedThreadLocals()

getLongLivedThreadLocals

public static java.util.Map<CentralizedThreadLocal<?>,java.lang.Object> getLongLivedThreadLocals()

getShortLivedThreadLocals

public static java.util.Map<CentralizedThreadLocal<?>,java.lang.Object> getShortLivedThreadLocals()

setThreadLocals

public static void setThreadLocals(java.util.Map<CentralizedThreadLocal<?>,java.lang.Object> longLivedThreadLocals,
                                   java.util.Map<CentralizedThreadLocal<?>,java.lang.Object> shortLivedThreadLocals)

get

public T get()
Overrides:
get in class java.lang.ThreadLocal<T>

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

remove

public void remove()
Overrides:
remove in class java.lang.ThreadLocal<T>

set

public void set(T value)
Overrides:
set in class java.lang.ThreadLocal<T>