Class AdminCacheWeakReference
java.lang.Object
com.sun.enterprise.admin.util.cache.AdminCacheWeakReference
- All Implemented Interfaces:
AdminCache
AdminCache based on week references and backgrounded by AdminCacheFileStore layer. Max one object representation of cached data are stored by this implementation. If different type is requested, it will be reloaded from file store using
AdminCacheFileStore.- Author:
- mmares
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecked if content is in the cache.<A> ARetrieve data from cache.static AdminCacheWeakReferencelastUpdated(String key) Date when was cached data last updated.voidPuts data to cache.
-
Method Details
-
getInstance
-
get
Description copied from interface:AdminCacheRetrieve data from cache.- Specified by:
getin interfaceAdminCache- Parameters:
key- in the cacheclazz- Cache data will be converted to requested type using appropriateAdminCacheObjectProvider- Returns:
- Cached data converted to requested type or
nullif not cached
-
put
Description copied from interface:AdminCachePuts data to cache.- Specified by:
putin interfaceAdminCache- Parameters:
key- in the cachedata- Cached data will be converted to raw bytes using appropriateAdminCacheObjectProvider
-
contains
Description copied from interface:AdminCacheChecked if content is in the cache.- Specified by:
containsin interfaceAdminCache- Parameters:
key- in the cache
-
lastUpdated
Description copied from interface:AdminCacheDate when was cached data last updated.- Specified by:
lastUpdatedin interfaceAdminCache- Parameters:
key- in the cache- Returns:
Dateof last update or null if does not exist in cache
-