org.glassfish.grizzly
Class ThreadCache.ObjectCacheElement

java.lang.Object
  extended by org.glassfish.grizzly.ThreadCache.ObjectCacheElement
Enclosing class:
ThreadCache

public static final class ThreadCache.ObjectCacheElement
extends java.lang.Object


Constructor Summary
ThreadCache.ObjectCacheElement(int size)
           
 
Method Summary
 java.lang.Object get()
          Get (peek) the object from cache.
 boolean put(java.lang.Object o)
           
 java.lang.Object take()
          Take (poll) the object from cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadCache.ObjectCacheElement

public ThreadCache.ObjectCacheElement(int size)
Method Detail

put

public boolean put(java.lang.Object o)

get

public java.lang.Object get()
Get (peek) the object from cache. Unlike take() the object will not be removed from cache.

Returns:
object from cache.

take

public java.lang.Object take()
Take (poll) the object from cache. Unlike get() the object will be removed from cache.

Returns:
object from cache.


Copyright © 2011 Oracle Corpration. All Rights Reserved.