Class AdminCacheFileStore
- java.lang.Object
-
- com.sun.enterprise.admin.util.cache.AdminCacheFileStore
-
- All Implemented Interfaces:
AdminCache
public class AdminCacheFileStore extends Object implements AdminCache
AdminCahcebased on file system.
Singleton- Author:
- mmares
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(String key)Checked if content is in the cache.<A> Aget(String key, Class<A> clazz)Retrieve data from cache.static AdminCacheFileStoregetInstance()DatelastUpdated(String key)Date when was cached data last updated.voidput(String key, Object data)Puts data to cache.
-
-
-
Method Detail
-
get
public <A> A get(String key, Class<A> clazz)
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
public void put(String key, Object data)
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
public boolean contains(String key)
Description copied from interface:AdminCacheChecked if content is in the cache.- Specified by:
containsin interfaceAdminCache- Parameters:
key- in the cache
-
lastUpdated
public Date lastUpdated(String key)
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
-
getInstance
public static AdminCacheFileStore getInstance()
-
-