public final class ThreadCache extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ThreadCache.CachedTypeIndex<E> |
static class |
ThreadCache.ObjectCache |
static class |
ThreadCache.ObjectCacheElement |
| Constructor and Description |
|---|
ThreadCache() |
| Modifier and Type | Method and Description |
|---|---|
static <E> E |
getFromCache(ThreadCache.CachedTypeIndex<E> index)
Get the cached object with the given type index from cache.
|
static <E> E |
getFromCache(Thread currentThread,
ThreadCache.CachedTypeIndex<E> index)
Get the cached object with the given type index from cache.
|
static <E> ThreadCache.CachedTypeIndex<E> |
obtainIndex(Class<E> clazz,
int size) |
static <E> ThreadCache.CachedTypeIndex<E> |
obtainIndex(String name,
Class<E> clazz,
int size) |
static <E> boolean |
putToCache(ThreadCache.CachedTypeIndex<E> index,
E o) |
static <E> boolean |
putToCache(Thread currentThread,
ThreadCache.CachedTypeIndex<E> index,
E o) |
static <E> E |
takeFromCache(ThreadCache.CachedTypeIndex<E> index)
Take the cached object with the given type index from cache.
|
static <E> E |
takeFromCache(Thread currentThread,
ThreadCache.CachedTypeIndex<E> index)
Take the cached object with the given type index from cache.
|
public static <E> ThreadCache.CachedTypeIndex<E> obtainIndex(Class<E> clazz, int size)
public static <E> ThreadCache.CachedTypeIndex<E> obtainIndex(String name, Class<E> clazz, int size)
public static <E> boolean putToCache(ThreadCache.CachedTypeIndex<E> index, E o)
public static <E> boolean putToCache(Thread currentThread, ThreadCache.CachedTypeIndex<E> index, E o)
public static <E> E getFromCache(ThreadCache.CachedTypeIndex<E> index)
takeFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex), the
object won't be removed from cache.E - index - the cached object type index.public static <E> E getFromCache(Thread currentThread, ThreadCache.CachedTypeIndex<E> index)
takeFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex), the
object won't be removed from cache.E - currentThread - current Threadindex - the cached object type index.public static <E> E takeFromCache(ThreadCache.CachedTypeIndex<E> index)
getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex), the
object will be removed from cache.E - index - the cached object type indexpublic static <E> E takeFromCache(Thread currentThread, ThreadCache.CachedTypeIndex<E> index)
getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex), the
object will be removed from cache.E - currentThread - current Threadindex - the cached object type indexCopyright © 2017–2019 Oracle Corporation. All rights reserved.