public class ThreadLocalCache extends Object
Don't use the ThreadLocalCache directly: use the ThreadLocalCacheAccessor to give you a typesafe container around the cache.
ThreadLocalCacheAccessor
Constructor and Description |
---|
ThreadLocalCache() |
Modifier and Type | Method and Description |
---|---|
static void |
dispose()
Clean up the cache for the current thread.
|
static void |
flush()
Flush the contents of the cache, but do not clean up the cache itself.
|
static Object |
get(Object key)
Retrieve an object from the cache
|
static void |
init()
Initialise the cache for the current thread
|
static void |
put(Object key,
Object value)
Put an object in the cache
|
public static void put(Object key, Object value)
key
- the cache keyvalue
- the value to cachepublic static Object get(Object key)
key
- the cache keypublic static void init()
public static void dispose()
public static void flush()
Copyright © 2003–2021 Atlassian. All rights reserved.