Class ThreadCache.ObjectCacheElement

  • Enclosing class:
    ThreadCache

    public static final class ThreadCache.ObjectCacheElement
    extends Object
    • Constructor Detail

      • ObjectCacheElement

        public ObjectCacheElement​(int size)
    • Method Detail

      • put

        public boolean put​(Object o)
      • get

        public Object get()
        Get (peek) the object from cache. Unlike take() the object will not be removed from cache.
        Returns:
        object from cache.
      • take

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