org.glassfish.grizzly
Class ThreadCache.ObjectCache
java.lang.Object
org.glassfish.grizzly.ThreadCache.ObjectCache
- Enclosing class:
- ThreadCache
public static final class ThreadCache.ObjectCache
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadCache.ObjectCache
public ThreadCache.ObjectCache()
put
public boolean put(ThreadCache.CachedTypeIndex index,
Object o)
get
public <E> E get(ThreadCache.CachedTypeIndex<E> index)
- Get the cached object with the given type index from cache.
Unlike
take(org.glassfish.grizzly.ThreadCache.CachedTypeIndex)
, the
object won't be removed from cache.
- Type Parameters:
E
- - Parameters:
index
- the cached object type index.
- Returns:
- cached object.
take
public <E> E take(ThreadCache.CachedTypeIndex<E> index)
- Take the cached object with the given type index from cache.
Unlike
get(org.glassfish.grizzly.ThreadCache.CachedTypeIndex)
, the
object will be removed from cache.
- Type Parameters:
E
- - Parameters:
index
- the cached object type index.
- Returns:
- cached object.
Copyright © 2012 Oracle Corporation. All Rights Reserved.