|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.ashkay.CacheEntry
net.sf.ashkay.strategies.SoftReferenceCacheEntry
SoftReferenceCacheEntry represents a cache entry that is wrapped in which
the entry object is wrapped in a SoftReference in order to allow the
garbage collector to still collect the object if all other hard references
are destroyed.
Often, this strategy will be used in memory sensative caches.
SoftReference| Constructor Summary | |
SoftReferenceCacheEntry(CacheEntry originalEntry,
java.lang.ref.ReferenceQueue queue)
|
|
| Method Summary | |
void |
addProperties(java.util.Map propertiesToAdd)
Adds a group of properties to this entry, en masse |
void |
addProperty(java.lang.Object key,
java.lang.Object value)
Adds a property to this entry. |
ObjectCache |
getCache()
|
java.lang.Object |
getEntryKey()
|
java.lang.Object |
getEntryObject()
Returns the object this entry represents. |
(package private) java.lang.ref.SoftReference |
getEntryReference()
|
java.util.Map |
getProperties()
Returns the entire Map of this entry's properties |
java.lang.Object |
getProperty(java.lang.Object key)
Looks up a property of this entry |
void |
setCache(ObjectCache myCache)
|
void |
setEntryKey(java.lang.Object key)
|
void |
setEntryObject(java.lang.Object entryObject)
Sets the object this entry represents |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SoftReferenceCacheEntry(CacheEntry originalEntry,
java.lang.ref.ReferenceQueue queue)
| Method Detail |
java.lang.ref.SoftReference getEntryReference()
public java.lang.Object getEntryObject()
CacheEntry
getEntryObject in class CacheEntrypublic void addProperties(java.util.Map propertiesToAdd)
CacheEntry
addProperties in class CacheEntrypropertiesToAdd - - map of properties to add
public void addProperty(java.lang.Object key,
java.lang.Object value)
CacheEntry
addProperty in class CacheEntrykey - - the key to this propertyvalue - - the value to hold in the propertypublic java.lang.Object getProperty(java.lang.Object key)
CacheEntry
getProperty in class CacheEntrykey - - the key of the property to lookup
public void setEntryObject(java.lang.Object entryObject)
CacheEntry
setEntryObject in class CacheEntryentryObject - - the new object to representpublic java.lang.Object getEntryKey()
getEntryKey in class CacheEntrypublic void setEntryKey(java.lang.Object key)
setEntryKey in class CacheEntrypublic java.util.Map getProperties()
CacheEntry
getProperties in class CacheEntrypublic ObjectCache getCache()
getCache in class CacheEntrypublic void setCache(ObjectCache myCache)
setCache in class CacheEntry
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||