Package com.tangosol.util
Class ConverterCollections.ConverterCacheEntry
- java.lang.Object
-
- com.tangosol.util.ConverterCollections.AbstractConverterEntry<FK,TK,FV,TV>
-
- com.tangosol.util.ConverterCollections.ConverterEntry
-
- com.tangosol.util.ConverterCollections.ConverterCacheEntry
-
- All Implemented Interfaces:
ConfigurableCacheMap.Entry
,Serializable
,Map.Entry
- Enclosing class:
- ConverterCollections
public static class ConverterCollections.ConverterCacheEntry extends ConverterCollections.ConverterEntry implements ConfigurableCacheMap.Entry
A ConfigurableCacheMap.Entry that lazily converts the key and value.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.tangosol.util.ConverterCollections.ConverterEntry
m_convKeyUp, m_convValDown, m_convValUp
-
Fields inherited from class com.tangosol.util.ConverterCollections.AbstractConverterEntry
m_entry, m_oKeyUp, m_oValueUp
-
-
Constructor Summary
Constructors Constructor Description ConverterCacheEntry(ConfigurableCacheMap.Entry entry, Converter conKeyUp, Converter conValUp, Converter conValDown)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigurableCacheMap.Entry
getEntry()
Return the underlying Map.Entry.long
getExpiryMillis()
Determine when the cache entry will expire, if ever.long
getLastTouchMillis()
Determine when the cache entry was last touched.int
getTouchCount()
Determine the number of times that the cache entry has been touched (since the touch count was last reset).int
getUnits()
Determine the number of cache units used by this Entry.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.void
touch()
Indicate to the entry that it has been touched, such as when it is accessed or modified.-
Methods inherited from class com.tangosol.util.ConverterCollections.ConverterEntry
getConverterKeyUp, getConverterValueDown, getConverterValueUp
-
Methods inherited from class com.tangosol.util.ConverterCollections.AbstractConverterEntry
equals, getKey, getValue, hashCode, setValue, toString
-
-
-
-
Constructor Detail
-
ConverterCacheEntry
public ConverterCacheEntry(ConfigurableCacheMap.Entry entry, Converter conKeyUp, Converter conValUp, Converter conValDown)
-
-
Method Detail
-
getEntry
public ConfigurableCacheMap.Entry getEntry()
Return the underlying Map.Entry.- Overrides:
getEntry
in classConverterCollections.AbstractConverterEntry
- Returns:
- the underlying Map.Entry
-
touch
public void touch()
Indicate to the entry that it has been touched, such as when it is accessed or modified.- Specified by:
touch
in interfaceConfigurableCacheMap.Entry
-
getTouchCount
public int getTouchCount()
Determine the number of times that the cache entry has been touched (since the touch count was last reset).- Specified by:
getTouchCount
in interfaceConfigurableCacheMap.Entry
- Returns:
- the number of times that the cache entry has been touched
-
getLastTouchMillis
public long getLastTouchMillis()
Determine when the cache entry was last touched.- Specified by:
getLastTouchMillis
in interfaceConfigurableCacheMap.Entry
- Returns:
- the date/time value, in millis, when the entry was most recently touched
-
getExpiryMillis
public long getExpiryMillis()
Determine when the cache entry will expire, if ever.- Specified by:
getExpiryMillis
in interfaceConfigurableCacheMap.Entry
- Returns:
- the date/time value, in millis, when the entry will (or did) expire; zero indicates no expiry
-
setExpiryMillis
public void setExpiryMillis(long lMillis)
Specify when the cache entry will expire, or disable expiry. Note that if the cache is configured for automatic expiry, each subsequent update to this cache entry will reschedule the expiry time.- Specified by:
setExpiryMillis
in interfaceConfigurableCacheMap.Entry
- Parameters:
lMillis
- pass the date/time value, in millis, for when the entry will expire, or pass zero to disable automatic expiry
-
getUnits
public int getUnits()
Determine the number of cache units used by this Entry.- Specified by:
getUnits
in interfaceConfigurableCacheMap.Entry
- Returns:
- an integer value 0 or greater, with a larger value signifying a higher cost; -1 implies that the Entry has been discarded
-
setUnits
public void setUnits(int cUnits)
Specify the number of cache units used by this Entry.- Specified by:
setUnits
in interfaceConfigurableCacheMap.Entry
- Parameters:
cUnits
- an integer value 0 or greater, with a larger value signifying a higher cost
-
-