|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CacheReloader
Reloader for cached objects. A CacheReloader can be associated with an object in the cache using either ReloadableCache.put() or ReloadableCache.setReloader().
Normal cache operation is to check for entry expiration when get() is called. If the entry has no CacheReloader, get will remove expired entries and return null. This is usually taken as a signal for the calling program to build the item. But if the entry has a CacheReloader, the Cache.get() method will use it to rebuild expired items rather than returning null.
ReloadableCache
Method Summary | |
---|---|
Object |
reload(String cacheName, Object key, Object oldValue) This is the method used to rebuild objects for the cache. |
Method Detail |
---|
Object reload(String cacheName, Object key, Object oldValue)
The method arguments are probably not necessary in most cases, but are here to allow you to implement a single CacheReloader that can be reused for multiple cached objects.
cacheName
- the name of the cache that is requesting the reloadkey
- the name of the key that is to be reloadedoldValue
- the current (expired) value in the cache
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.