com.sun.appserv.util.cache
Class BaseCache.CacheItem

java.lang.Object
  extended by com.sun.appserv.util.cache.BaseCache.CacheItem
Direct Known Subclasses:
LruCache.LruCacheItem
Enclosing class:
BaseCache

protected static class BaseCache.CacheItem
extends java.lang.Object

default CacheItem class implementation


Constructor Summary
protected BaseCache.CacheItem(int hashCode, java.lang.Object key, java.lang.Object value, int size)
           
 
Method Summary
protected  int getHashCode()
          get the item's hashCode
protected  java.lang.Object getKey()
          get the item's key
protected  int getSize()
           
protected  java.lang.Object getValue()
          get the item's value
protected  java.lang.Object refreshValue(java.lang.Object value, int newSize)
          refresh the item's value
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseCache.CacheItem

protected BaseCache.CacheItem(int hashCode,
                              java.lang.Object key,
                              java.lang.Object value,
                              int size)
Method Detail

getHashCode

protected int getHashCode()
get the item's hashCode


getKey

protected java.lang.Object getKey()
get the item's key


getValue

protected java.lang.Object getValue()
get the item's value


getSize

protected int getSize()
Returns:
size of the entry in bytes a value of -1 indicates unknown size

refreshValue

protected java.lang.Object refreshValue(java.lang.Object value,
                                        int newSize)
refresh the item's value

Parameters:
value - value to be updated
newSize - of the field

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2012 GlassFish Community. All Rights Reserved.