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 void
clear()
Clear all entries in the ItemCache and free resources.Item
getItem(ItemState state)
Returns the cachedItem
that belongs to the givenItemState
ornull
if the cache does not contain thatItem
.void
itemCreated(Item item)
Called when anItem
instance has been created.void
itemDestroyed(Item item)
Called when anItemImpl
instance has been destroyed (i.e.void
itemUpdated(Item item, boolean modified)
Called when anItem
instance has been refreshed.String
toString()
Returns the the state of this instance in a human readable format.
-
-
-
Method Detail
-
getItem
public Item getItem(ItemState state)
Description copied from interface:ItemCache
Returns the cachedItem
that belongs to the givenItemState
ornull
if the cache does not contain thatItem
.- Specified by:
getItem
in interfaceItemCache
- Parameters:
state
- State of the item that should be retrieved.- Returns:
- The item reference stored in the corresponding cache entry
or
null
if there's no corresponding cache entry. - See Also:
ItemCache.getItem(ItemState)
-
clear
public void clear()
Description copied from interface:ItemCache
Clear all entries in the ItemCache and free resources.- Specified by:
clear
in interfaceItemCache
- See Also:
ItemCache.clear()
-
itemCreated
public void itemCreated(Item item)
Description copied from interface:ItemLifeCycleListener
Called when anItem
instance has been created.- Specified by:
itemCreated
in 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:ItemLifeCycleListener
Called when anItem
instance has been refreshed. Ifmodified
istrue
, the refresh included some modification.- Specified by:
itemUpdated
in interfaceItemLifeCycleListener
- Parameters:
item
- the instance which has been refreshed
-
itemDestroyed
public void itemDestroyed(Item item)
Description copied from interface:ItemLifeCycleListener
Called when anItemImpl
instance has been destroyed (i.e. it has been permanently rendered 'invalid').Note that most
,Item
andNode
methods will throw anProperty
InvalidItemStateException
when called on a 'destroyed' item.- Specified by:
itemDestroyed
in interfaceItemLifeCycleListener
- Parameters:
item
- the instance which has been destroyed- See Also:
ItemLifeCycleListener.itemDestroyed(Item)
-
-