Java EE 5 SDK

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 Object

default CacheItem class implementation


Constructor Summary
protected BaseCache.CacheItem(int hashCode, Object key, Object value, int size)
           
 
Method Summary
protected  int getHashCode()
          get the item's hashCode
protected  Object getKey()
          get the item's key
protected  int getSize()
           
protected  Object getValue()
          get the item's value
protected  Object refreshValue(Object value, int newSize)
          refresh the item's value
 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,
                              Object key,
                              Object value,
                              int size)
Method Detail

getHashCode

protected int getHashCode()
get the item's hashCode


getKey

protected Object getKey()
get the item's key


getValue

protected 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 Object refreshValue(Object value,
                              int newSize)
refresh the item's value

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

toString

public String toString()
Overrides:
toString in class Object

Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.