public class ItemCacheImpl extends Object implements ItemCache
ItemCacheImpl
...Modifier and Type | Method and Description |
---|---|
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. |
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.
|
public Item getItem(ItemState state)
ItemCache
Item
that belongs to the given
ItemState
or null
if the cache does not
contain that Item
.getItem
in interface ItemCache
state
- State of the item that should be retrieved.null
if there's no corresponding cache entry.ItemCache.getItem(ItemState)
public void clear()
ItemCache
clear
in interface ItemCache
ItemCache.clear()
public void itemCreated(Item item)
ItemLifeCycleListener
Item
instance has been created.itemCreated
in interface ItemLifeCycleListener
item
- the instance which has been createdItemLifeCycleListener.itemCreated(Item)
public void itemUpdated(Item item, boolean modified)
ItemLifeCycleListener
Item
instance has been refreshed. If
modified
is true
, the refresh included
some modification.itemUpdated
in interface ItemLifeCycleListener
item
- the instance which has been refreshedpublic void itemDestroyed(Item item)
ItemLifeCycleListener
ItemImpl
instance has been destroyed
(i.e. it has been permanently rendered 'invalid').
Note that most
,
Item
and Node
methods will throw an Property
InvalidItemStateException
when called
on a 'destroyed' item.
itemDestroyed
in interface ItemLifeCycleListener
item
- the instance which has been destroyedItemLifeCycleListener.itemDestroyed(Item)
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.