|
Java EE 5 SDK | ||||||||
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
public class CacheManager
Field Summary | |
---|---|
static String |
CACHE_MANAGER_ATTR_NAME
|
static String |
DEFAULT_CACHE_CLASSNAME
|
static int |
DEFAULT_CACHE_MAX_ENTRIES
|
static int |
DEFAULT_CACHE_TIMEOUT
|
Constructor Summary | |
---|---|
CacheManager()
default constructor |
Method Summary | |
---|---|
void |
addCacheHelperDef(String name,
HashMap helperDef)
add a CacheHelper definition |
void |
addCacheManagerListener(CacheManagerListener listener)
add CacheManagerListener object |
void |
addCacheMapping(String name,
CacheMapping mapping)
add cache mapping |
void |
addProperty(String name,
String value)
add generic property |
Cache |
createCache()
create the designated cache object |
Cache |
createCache(int cacacity,
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) |
String |
getCacheClassName()
get the underlying cache name |
CacheHelper |
getCacheHelper(String name)
get the helper by name |
CacheHelper |
getCacheHelperByFilterName(String filterName)
get the helper by filter name |
CacheMapping |
getCacheMapping(String name)
get cacheMapping given its name |
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(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 String CACHE_MANAGER_ATTR_NAME
public static final int DEFAULT_CACHE_MAX_ENTRIES
public static final int DEFAULT_CACHE_TIMEOUT
public static final 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(String name, String value)
name
- named propertyvalue
- valuepublic void addCacheHelperDef(String name, HashMap helperDef)
name
- CacheHelper namehelperDef
- CacheHelper definitionpublic void setDefaultHelperProps(Map map)
map
- a HashMap of propertiespublic void setServletContext(ServletContext context)
context
- ServletContextpublic void start() throws org.apache.catalina.LifecycleException
org.apache.catalina.LifecycleException
- if a startup error occurspublic String getCacheClassName()
public Cache createCache() throws Exception
Exception
public Cache createCache(int cacacity, String className) throws Exception
Exception
public int getDefaultTimeout()
public Cache getDefaultCache()
public void addCacheMapping(String name, CacheMapping mapping)
name
- unique name of the mappingmapping
- CacheMappingpublic CacheMapping getCacheMapping(String name)
name
- name identifying the mapping
public CacheHelper getCacheHelper(String name)
name
- name of the cache-helper
public CacheHelper getCacheHelperByFilterName(String filterName)
filterName
- filter name
public void addCacheManagerListener(CacheManagerListener listener)
listener
- CacheManagerListener objectpublic void removeCacheManagerListener(CacheManagerListener listener)
listener
- CacheManagerListener objectpublic void enable()
public void disable()
public void stop() throws org.apache.catalina.LifecycleException
org.apache.catalina.LifecycleException
- if a shutdown error occurs
|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2006 Sun Microsystems, Inc. All rights reserved.