Class PurgatoryElement<K,V>
java.lang.Object
org.apache.commons.jcs3.engine.CacheElement<K,V>
org.apache.commons.jcs3.auxiliary.disk.PurgatoryElement<K,V>
- All Implemented Interfaces:
Serializable
,ICacheElement<K,
V>
Implementation of cache elements in purgatory.
Elements are stored in purgatory when they are spooled to the auxiliary cache, but have not yet
been written to disk.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPurgatoryElement
(ICacheElement<K, V> cacheElement) Constructor for the PurgatoryElement<K, V> object -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the wrapped cache element.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()
boolean
Gets the spoolable property.void
Sets the attributes attribute of the CacheElement objectvoid
setSpoolable
(boolean spoolable) Sets the spoolable property.toString()
For debugging only.
-
Constructor Details
-
PurgatoryElement
Constructor for the PurgatoryElement<K, V> object- Parameters:
cacheElement
- CacheElement
-
-
Method Details
-
isSpoolable
Gets the spoolable property.- Returns:
- The spoolable value
-
setSpoolable
Sets the spoolable property.- Parameters:
spoolable
- The new spoolable value
-
getCacheElement
Get the wrapped cache element.- Returns:
- ICacheElement
-
getCacheName
Description copied from class:CacheElement
Gets the cacheName attribute of the CacheElement object- Specified by:
getCacheName
in interfaceICacheElement<K,
V> - Overrides:
getCacheName
in classCacheElement<K,
V> - Returns:
- cacheElement.getCacheName();
- See Also:
-
getKey
Description copied from class:CacheElement
Gets the key attribute of the CacheElement object- Specified by:
getKey
in interfaceICacheElement<K,
V> - Overrides:
getKey
in classCacheElement<K,
V> - Returns:
- cacheElement.getKey();
- See Also:
-
getVal
Description copied from class:CacheElement
Gets the val attribute of the CacheElement object- Specified by:
getVal
in interfaceICacheElement<K,
V> - Overrides:
getVal
in classCacheElement<K,
V> - Returns:
- cacheElement.getVal();
- See Also:
-
getElementAttributes
Description copied from class:CacheElement
Gets the IElementAttributes attribute of the CacheElement object- Specified by:
getElementAttributes
in interfaceICacheElement<K,
V> - Overrides:
getElementAttributes
in classCacheElement<K,
V> - Returns:
- cacheElement.getElementAttributes();
- See Also:
-
setElementAttributes
Description copied from class:CacheElement
Sets the attributes attribute of the CacheElement object- Specified by:
setElementAttributes
in interfaceICacheElement<K,
V> - Overrides:
setElementAttributes
in classCacheElement<K,
V> - Parameters:
attr
-- See Also:
-
equals
- Overrides:
equals
in classCacheElement<K,
V> - Parameters:
obj
- other object- Returns:
- true if this object key equals the key of obj
-
hashCode
- Overrides:
hashCode
in classCacheElement<K,
V> - Returns:
- a hash of the key only
-
toString
Description copied from class:CacheElement
For debugging only.- Overrides:
toString
in classCacheElement<K,
V> - Returns:
- debug string
-