|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.util.SafeHashMap.Entry
com.tangosol.net.cache.OldCache.Entry
public class OldCache.Entry
A holder for a cached value.
Field Summary |
---|
Fields inherited from class com.tangosol.util.SafeHashMap.Entry |
---|
m_eNext, m_nHash, m_oKey, m_oValue |
Constructor Summary | |
---|---|
OldCache.Entry()
Construct the cacheable entry that holds the cached value. |
Method Summary | |
---|---|
protected int |
calculateUnits(Object oValue)
Calculate a cache cost for the specified object. |
protected void |
copyFrom(SafeHashMap.Entry entry)
Copy this Entry's information from another Entry. |
protected void |
discard()
Called to inform the Entry that it is no longer used. |
long |
getCreatedMillis()
Determine when the cache entry was created. |
long |
getExpiryMillis()
Determine when the cache entry will expire, if ever. |
long |
getLastTouchMillis()
Determine when the cache entry was last touched. |
int |
getPriority()
Calculate a cache priority. |
int |
getTouchCount()
Determine the number of times that the cache entry has been touched. |
int |
getUnits()
Determine the number of cache units used by this Entry. |
protected boolean |
isDiscarded()
Determine if this entry has already been discarded from the cache. |
boolean |
isExpired()
Determine if the cache entry has expired. |
protected void |
onAdd()
This method is invoked when the containing Map has actually added this Entry to itself. |
protected void |
scheduleExpiry()
Reschedule the cache entry expiration. |
void |
setExpiryMillis(long lMillis)
Specify when the cache entry will expire, or disable expiry. |
void |
setUnits(int cUnits)
Specify the number of cache units used by this Entry. |
Object |
setValue(Object oValue)
Update the cached value. |
String |
toString()
Render the cache entry as a String. |
void |
touch()
Called each time the entry is accessed or modified. |
Methods inherited from class com.tangosol.util.SafeHashMap.Entry |
---|
clone, equals, getKey, getValue, hashCode |
Constructor Detail |
---|
public OldCache.Entry()
Method Detail |
---|
protected void onAdd()
onAdd
in class SafeHashMap.Entry
public Object setValue(Object oValue)
setValue
in interface Map.Entry
setValue
in class SafeHashMap.Entry
oValue
- the new value to cache
protected void copyFrom(SafeHashMap.Entry entry)
copyFrom
in class SafeHashMap.Entry
entry
- the entry to copy frompublic int getPriority()
public long getCreatedMillis()
public void touch()
public long getLastTouchMillis()
public int getTouchCount()
public long getExpiryMillis()
public void setExpiryMillis(long lMillis)
lMillis
- pass the date/time value, in millis, for when the
entry will expire, or pass zero to disable automatic expirypublic boolean isExpired()
protected void scheduleExpiry()
protected void discard()
protected boolean isDiscarded()
protected int calculateUnits(Object oValue)
oValue
- the cache value to evaluate for unit cost
public int getUnits()
public void setUnits(int cUnits)
cUnits
- an integer value 0 or greater, with a larger value
signifying a higher costpublic String toString()
toString
in class SafeHashMap.Entry
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |