org.apache.ojb.broker.cache
Interface ObjectCacheTwoLevelImpl.CopyStrategy
- All Known Implementing Classes:
- ObjectCacheTwoLevelImpl.CopyStrategyImpl
- Enclosing class:
- ObjectCacheTwoLevelImpl
public static interface ObjectCacheTwoLevelImpl.CopyStrategy
read
Object read(PersistenceBroker broker,
Object obj)
- Called when an object is read from the application cache (second level cache)
before the object is full materialized, see
ObjectCacheTwoLevelImpl.materializeFullObject(Object)
.
- Parameters:
broker
- The current used PersistenceBroker
instance.obj
- The object read from the application cache.
- Returns:
- A copy of the object.
write
Object write(PersistenceBroker broker,
Object obj,
Object oldObject)
- Called before an object is written to the application cache (second level cache).
- Parameters:
broker
- The current used PersistenceBroker
instance.obj
- The object to cache in application cache.oldObject
- The old cache object or null
- Returns:
- A copy of the object to write to application cache.
Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.