Package com.sun.appserv.util.cache
Class BaseCache.CacheItem
- java.lang.Object
-
- com.sun.appserv.util.cache.BaseCache.CacheItem
-
- Direct Known Subclasses:
LruCache.LruCacheItem
- Enclosing class:
- BaseCache
public static class BaseCache.CacheItem extends Object
default CacheItem class implementation
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getHashCode()
get the item's hashCodeObject
getKey()
get the item's keyBaseCache.CacheItem
getNext()
get the item's next referenceint
getSize()
Object
getValue()
get the item's valueprotected Object
refreshValue(Object value, int newSize)
refresh the item's valuevoid
setNext(BaseCache.CacheItem next)
set the item's next referenceString
toString()
-
-
-
Method Detail
-
getHashCode
public int getHashCode()
get the item's hashCode
-
getKey
public Object getKey()
get the item's key
-
getNext
public BaseCache.CacheItem getNext()
get the item's next reference
-
setNext
public void setNext(BaseCache.CacheItem next)
set the item's next reference
-
getValue
public Object getValue()
get the item's value
-
getSize
public int getSize()
- Returns:
- size of the entry in bytes a value of -1 indicates unknown size
-
refreshValue
protected Object refreshValue(Object value, int newSize)
refresh the item's value- Parameters:
value
- value to be updatednewSize
- of the field
-
-