Package de.hybris.platform.persistence
Class ItemCacheKey
- java.lang.Object
-
- de.hybris.platform.persistence.ItemCacheKey
-
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
ItemACLCacheKey
,ItemPropertyCacheKey
public abstract class ItemCacheKey extends java.lang.Object implements java.lang.Cloneable
using this key object, transient caches can be stored for an Item using its methodsItemEJB.getCachedValueForModification(de.hybris.platform.persistence.ItemCacheKey)
andItemEJB.getCachedValueForReading(de.hybris.platform.persistence.ItemCacheKey)
-
-
Constructor Summary
Constructors Modifier Constructor Description ItemCacheKey()
protected
ItemCacheKey(java.lang.Object value)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.Object
cloneValue(java.lang.Object value)
this method should clone a cached value object.protected abstract java.lang.Object
computeValue(ItemEJB item)
initially creates the cached data object for a specified item.protected abstract java.lang.Object
createUnmodifiableViewOfValue(java.lang.Object value)
it's ok to return the result ofgetValue
in this method; otherwise, the returned object has to reflect subsequent changes of the object returned by getValueprotected void
dispose(boolean inRemove)
called when this cache key object is remove from cache.ItemCacheKey
getCopy()
create a copy of this ItemCacheKey; must be public for hjmpprotected abstract java.lang.Object
getQualifier()
protected java.lang.Object
getValueForModification(ItemEJB item)
protected java.lang.Object
getValueForReading(ItemEJB item)
protected java.lang.Object
getValueForReadingIfAvailable(ItemEJB item)
protected java.lang.Object
getValueInternal()
protected abstract boolean
isValid(ItemEJB item)
-
-
-
Method Detail
-
getCopy
public final ItemCacheKey getCopy()
create a copy of this ItemCacheKey; must be public for hjmp
-
getValueInternal
protected final java.lang.Object getValueInternal()
-
getQualifier
protected abstract java.lang.Object getQualifier()
- Returns:
- an key for the CachedValue that is unique within the Item instance
-
isValid
protected abstract boolean isValid(ItemEJB item)
- Returns:
- true if the cache key object is still valid for the given item. this is called each time when the cache key is retrieved.
-
dispose
protected void dispose(boolean inRemove)
called when this cache key object is remove from cache.
-
computeValue
protected abstract java.lang.Object computeValue(ItemEJB item)
initially creates the cached data object for a specified item. this method is only called once for one ItemCacheKey instance.
-
getValueForReading
protected final java.lang.Object getValueForReading(ItemEJB item)
-
getValueForReadingIfAvailable
protected final java.lang.Object getValueForReadingIfAvailable(ItemEJB item)
-
getValueForModification
protected final java.lang.Object getValueForModification(ItemEJB item)
-
cloneValue
protected abstract java.lang.Object cloneValue(java.lang.Object value)
this method should clone a cached value object. it will be called duringgetCopy()
only if this ItemCacheKey object already holds a cached value object.
-
createUnmodifiableViewOfValue
protected abstract java.lang.Object createUnmodifiableViewOfValue(java.lang.Object value)
it's ok to return the result ofgetValue
in this method; otherwise, the returned object has to reflect subsequent changes of the object returned by getValue
-
-