|
SunONE Application Server v8.0 PE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.appserv.web.cache.CacheManager
Field Summary | |
static java.lang.String |
CACHE_MANAGER_ATTR_NAME
|
static java.lang.String |
DEFAULT_CACHE_CLASSNAME
|
static int |
DEFAULT_CACHE_MAX_ENTRIES
|
static int |
DEFAULT_CACHE_TIMEOUT
|
Constructor Summary | |
CacheManager()
default constructor |
Method Summary | |
void |
addCacheHelperDef(java.lang.String name,
java.util.HashMap helperDef)
add a CacheHelper definition |
void |
addCacheManagerListener(CacheManagerListener listener)
add CacheManagerListener object |
void |
addCacheMapping(java.lang.String name,
CacheMapping mapping)
add cache mapping |
void |
addProperty(java.lang.String name,
java.lang.String value)
add generic property |
com.sun.appserv.util.cache.Cache |
createCache()
create the designated cache object |
com.sun.appserv.util.cache.Cache |
createCache(int cacacity,
java.lang.String className)
create the designated cache object |
void |
disable()
enable the cache manager (and all the listeners) |
void |
enable()
enable the cache manager (and all the listeners) |
java.lang.String |
getCacheClassName()
get the underlying cache name |
CacheHelper |
getCacheHelper(java.lang.String name)
get the helper by name |
CacheHelper |
getCacheHelperByFilterName(java.lang.String filterName)
get the helper by name |
CacheMapping |
getCacheMapping(java.lang.String name)
get cacheMapping given its name |
com.sun.appserv.util.cache.Cache |
getDefaultCache()
get the default application-wide cache |
int |
getDefaultTimeout()
get the application wide default cache expiry timeout |
boolean |
isEnabled()
|
void |
removeCacheManagerListener(CacheManagerListener listener)
remove CacheManagerListener object |
void |
setDefaultHelperProps(java.util.Map map)
set the default-helper's properties |
void |
setDefaultTimeout(int defaultTimeout)
set the defaultTimeout of this cache |
void |
setEnabled(boolean enabled)
set the whether this is enabled |
void |
setMaxEntries(int maxEntries)
set the maximum number of entries of this cache |
void |
setServletContext(ServletContext context)
set the ServletContext of this application |
void |
start()
Start this Context component. |
void |
stop()
Stop this Context component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CACHE_MANAGER_ATTR_NAME
public static final int DEFAULT_CACHE_MAX_ENTRIES
public static final int DEFAULT_CACHE_TIMEOUT
public static final java.lang.String DEFAULT_CACHE_CLASSNAME
Constructor Detail |
public CacheManager()
Method Detail |
public void setMaxEntries(int maxEntries)
maxEntries
- number of entries the cache should carrypublic void setDefaultTimeout(int defaultTimeout)
defaultTimeout
- in secondspublic void setEnabled(boolean enabled)
enabled
- is this enabled?public boolean isEnabled()
public void addProperty(java.lang.String name, java.lang.String value)
name
- named propertyvalue
- valuepublic void addCacheHelperDef(java.lang.String name, java.util.HashMap helperDef)
public void setDefaultHelperProps(java.util.Map map)
map
- a HashMap of propertiespublic void setServletContext(ServletContext context)
context
- ServletContextpublic void start() throws LifecycleException
LifecycleException
- if a startup error occurspublic java.lang.String getCacheClassName()
public com.sun.appserv.util.cache.Cache createCache() throws java.lang.Exception
java.lang.Exception
public com.sun.appserv.util.cache.Cache createCache(int cacacity, java.lang.String className) throws java.lang.Exception
java.lang.Exception
public int getDefaultTimeout()
public com.sun.appserv.util.cache.Cache getDefaultCache()
public void addCacheMapping(java.lang.String name, CacheMapping mapping)
name
- unique name of the mappingmapping
- CacheMappingpublic CacheMapping getCacheMapping(java.lang.String name)
name
- name identifying the mappingpublic CacheHelper getCacheHelper(java.lang.String name)
name
- name of the cache-helperpublic CacheHelper getCacheHelperByFilterName(java.lang.String filterName)
public void addCacheManagerListener(CacheManagerListener listener)
listener
- CacheManagerListener objectpublic void removeCacheManagerListener(CacheManagerListener listener)
listener
- CacheManagerListener objectpublic void enable()
public void disable()
public void stop() throws LifecycleException
LifecycleException
- if a shutdown error occurs
|
SunONE Application Server v8.0 PE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2003 Sun Microsystems, Inc. All rights reserved.