Package org.apache.jackrabbit.jcr2spi
Class ItemCacheImpl
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.ItemCacheImpl
-
- All Implemented Interfaces:
ItemCache,ItemLifeCycleListener
public class ItemCacheImpl extends Object implements ItemCache
ItemCacheImpl...
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear all entries in the ItemCache and free resources.ItemgetItem(ItemState state)Returns the cachedItemthat belongs to the givenItemStateornullif the cache does not contain thatItem.voiditemCreated(Item item)Called when anIteminstance has been created.voiditemDestroyed(Item item)Called when anItemImplinstance has been destroyed (i.e.voiditemUpdated(Item item, boolean modified)Called when anIteminstance has been refreshed.StringtoString()Returns the the state of this instance in a human readable format.
-
-
-
Method Detail
-
getItem
public Item getItem(ItemState state)
Description copied from interface:ItemCacheReturns the cachedItemthat belongs to the givenItemStateornullif the cache does not contain thatItem.- Specified by:
getItemin interfaceItemCache- Parameters:
state- State of the item that should be retrieved.- Returns:
- The item reference stored in the corresponding cache entry
or
nullif there's no corresponding cache entry. - See Also:
ItemCache.getItem(ItemState)
-
clear
public void clear()
Description copied from interface:ItemCacheClear all entries in the ItemCache and free resources.- Specified by:
clearin interfaceItemCache- See Also:
ItemCache.clear()
-
itemCreated
public void itemCreated(Item item)
Description copied from interface:ItemLifeCycleListenerCalled when anIteminstance has been created.- Specified by:
itemCreatedin interfaceItemLifeCycleListener- Parameters:
item- the instance which has been created- See Also:
ItemLifeCycleListener.itemCreated(Item)
-
itemUpdated
public void itemUpdated(Item item, boolean modified)
Description copied from interface:ItemLifeCycleListenerCalled when anIteminstance has been refreshed. Ifmodifiedistrue, the refresh included some modification.- Specified by:
itemUpdatedin interfaceItemLifeCycleListener- Parameters:
item- the instance which has been refreshed
-
itemDestroyed
public void itemDestroyed(Item item)
Description copied from interface:ItemLifeCycleListenerCalled when anItemImplinstance has been destroyed (i.e. it has been permanently rendered 'invalid').Note that most
,ItemandNodemethods will throw anPropertyInvalidItemStateExceptionwhen called on a 'destroyed' item.- Specified by:
itemDestroyedin interfaceItemLifeCycleListener- Parameters:
item- the instance which has been destroyed- See Also:
ItemLifeCycleListener.itemDestroyed(Item)
-
-