org.apache.jackrabbit.jcr2spi
Class ItemCacheImpl

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

public class ItemCacheImpl
extends Object
implements ItemCache, Dumpable

ItemCacheImpl...


Method Summary
 void clear()
          Clear all entries in the ItemCache and free resources.
 void dump(PrintStream ps)
          Dumps the state of this instance in a human readable format for diagnostic purposes.
 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 itemInvalidated(Item item)
          Called when an Item instance has been invalidated (i.e. it has been temporarily rendered 'invalid').
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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)

itemInvalidated

public void itemInvalidated(Item item)
Description copied from interface: ItemLifeCycleListener
Called when an Item instance has been invalidated (i.e. it has been temporarily rendered 'invalid').

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

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

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)

dump

public void dump(PrintStream ps)
Description copied from interface: Dumpable
Dumps the state of this instance in a human readable format for diagnostic purposes.

Specified by:
dump in interface Dumpable
Parameters:
ps - stream to dump state to
See Also:
Dumpable.dump(PrintStream)


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