Package org.glassfish.grizzly
Class ThreadCache.ObjectCacheElement
- java.lang.Object
-
- org.glassfish.grizzly.ThreadCache.ObjectCacheElement
-
- Enclosing class:
- ThreadCache
public static final class ThreadCache.ObjectCacheElement extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ObjectCacheElement(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectget()Get (peek) the object from cache.booleanput(java.lang.Object o)java.lang.Objecttake()Take (poll) the object from cache.
-
-
-
Method Detail
-
put
public boolean put(java.lang.Object o)
-
get
public java.lang.Object get()
Get (peek) the object from cache. Unliketake()the object will not be removed from cache.- Returns:
- object from cache.
-
take
public java.lang.Object take()
Take (poll) the object from cache. Unlikeget()the object will be removed from cache.- Returns:
- object from cache.
-
-