Package org.apache.commons.jcs3.engine
Class CacheElement<K,V>
java.lang.Object
org.apache.commons.jcs3.engine.CacheElement<K,V>
- All Implemented Interfaces:
Serializable
,ICacheElement<K,
V>
- Direct Known Subclasses:
CacheElementSerialized
,PurgatoryElement
Generic element wrapper. Often stuffed inside another.
- See Also:
-
Constructor Summary
ConstructorDescriptionCacheElement
(String cacheName, K key, V val) Constructor for the CacheElement objectCacheElement
(String cacheName, K key, V val, IElementAttributes attrArg) Constructor for the CacheElement object -
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the cacheName attribute of the CacheElement objectGets the IElementAttributes attribute of the CacheElement objectgetKey()
Gets the key attribute of the CacheElement objectgetVal()
Gets the val attribute of the CacheElement objectint
hashCode()
void
Sets the attributes attribute of the CacheElement objecttoString()
For debugging only.
-
Constructor Details
-
CacheElement
Constructor for the CacheElement object- Parameters:
cacheName
-key
-val
-
-
CacheElement
Constructor for the CacheElement object- Parameters:
cacheName
-key
-val
-attrArg
-
-
-
Method Details
-
getCacheName
Gets the cacheName attribute of the CacheElement object- Specified by:
getCacheName
in interfaceICacheElement<K,
V> - Returns:
- The cacheName value
-
getKey
Gets the key attribute of the CacheElement object- Specified by:
getKey
in interfaceICacheElement<K,
V> - Returns:
- The key value
-
getVal
Gets the val attribute of the CacheElement object- Specified by:
getVal
in interfaceICacheElement<K,
V> - Returns:
- The val value
-
setElementAttributes
Sets the attributes attribute of the CacheElement object- Specified by:
setElementAttributes
in interfaceICacheElement<K,
V> - Parameters:
attr
- The new IElementAttributes value
-
getElementAttributes
Gets the IElementAttributes attribute of the CacheElement object- Specified by:
getElementAttributes
in interfaceICacheElement<K,
V> - Returns:
- The IElementAttributes value, never null
-
equals
-
hashCode
-
toString
For debugging only.
-