org.apache.jackrabbit.jcr2spi
Class ItemCacheImpl

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.ItemCacheImpl
All Implemented Interfaces:
ItemCache, ItemLifeCycleListener

public class ItemCacheImpl
extends Object
implements ItemCache

ItemCacheImpl...


Method Summary
 void clear()
          Clear all entries in the ItemCache and free resources.
 Item getItem(ItemState state)
          Returns the cached Item that belongs to the given ItemState or null if the cache does not contain that Item.
 void itemCreated(Item item)
          Called when an Item instance has been created.
 void itemDestroyed(Item item)
          Called when an ItemImpl instance has been destroyed (i.e. it has been permanently rendered 'invalid').
 void itemUpdated(Item item, boolean modified)
          Called when an Item instance has been refreshed.
 String toString()
          Returns the the state of this instance in a human readable format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getItem

public Item getItem(ItemState state)
Description copied from interface: ItemCache
Returns the cached Item that belongs to the given ItemState or null if the cache does not contain that Item.

Specified by:
getItem in interface ItemCache
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 interface ItemCache
See Also:
ItemCache.clear()

itemCreated

public void itemCreated(Item item)
Description copied from interface: ItemLifeCycleListener
Called when an Item instance has been created.

Specified by:
itemCreated in interface ItemLifeCycleListener
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 an Item instance has been refreshed. If modified is true, the refresh included some modification.

Specified by:
itemUpdated in interface ItemLifeCycleListener
Parameters:
item - the instance which has been refreshed

itemDestroyed

public void itemDestroyed(Item item)
Description copied from interface: ItemLifeCycleListener
Called when an ItemImpl instance has been destroyed (i.e. it has been permanently rendered 'invalid').

Note that most Item, Node and Property methods will throw an InvalidItemStateException when called on a 'destroyed' item.

Specified by:
itemDestroyed in interface ItemLifeCycleListener
Parameters:
item - the instance which has been destroyed
See Also:
ItemLifeCycleListener.itemDestroyed(Item)

toString

public String toString()
Returns the the state of this instance in a human readable format.

Overrides:
toString in class Object


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.