|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jcs.access.CacheAccess<K,V>
org.apache.jcs.access.GroupCacheAccess<K,V>
org.apache.jcs.JCS<K,V>
public class JCS<K extends Serializable,V extends Serializable>
Simple class for using JCS. To use JCS in your application, you can use the static methods of this class to get access objects (instances of this class) for your cache regions. Ideally this class should be all you need to import to use JCS. One JCS should be created for each region you want to access. If you have several regions, then get instances for each. For best performance the getInstance call should be made in an initialization method.
| Field Summary |
|---|
| Fields inherited from class org.apache.jcs.access.CacheAccess |
|---|
cacheControl |
| Constructor Summary | |
|---|---|
protected |
JCS(CompositeCache<K,V> cacheControl)
Protected constructor for use by the static factory methods. |
| Method Summary | ||
|---|---|---|
protected static CompositeCacheManager |
getCacheManager()
Gets an instance of CompositeCacheManager and stores it in the cacheMgr class field, if it is not already set. |
|
static
|
getInstance(String region)
Get a JCS which accesses the provided region. |
|
static
|
getInstance(String region,
ICompositeCacheAttributes icca)
Get a JCS which accesses the provided region. |
|
static void |
setConfigFilename(String configFilename)
Set the filename that the cache manager will be initialized with. |
|
static void |
setConfigProperties(Properties configProps)
Set the properties that the cache manager will be initialized with. |
|
| Methods inherited from class org.apache.jcs.access.GroupCacheAccess |
|---|
getFromGroup, getGroupAccess, getGroupAccess, getGroupKeys, getGroupNames, invalidateGroup, putInGroup, putInGroup, remove |
| Methods inherited from class org.apache.jcs.access.CacheAccess |
|---|
clear, defineRegion, defineRegion, defineRegion, destroy, destroy, dispose, freeMemoryElements, get, getAccess, getAccess, getCacheAttributes, getCacheElement, getCacheElements, getDefaultElementAttributes, getElementAttributes, getElementAttributes, getMatching, getMatchingCacheElements, getStatistics, getStats, put, put, putSafe, remove, remove, resetElementAttributes, resetElementAttributes, setCacheAttributes, setDefaultElementAttributes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected JCS(CompositeCache<K,V> cacheControl)
cacheControl - Cache which the instance will provide access to| Method Detail |
|---|
public static <K extends Serializable,V extends Serializable> JCS<K,V> getInstance(String region)
throws CacheException
region - Region that return JCS will provide access to
CacheException
public static <K extends Serializable,V extends Serializable> JCS<K,V> getInstance(String region,
ICompositeCacheAttributes icca)
throws CacheException
region - Region that return JCS will provide access toicca - CacheAttributes for region
CacheException
protected static CompositeCacheManager getCacheManager()
throws CacheException
CacheException - if the configuration cannot be loadedpublic static void setConfigFilename(String configFilename)
configFilename - public static void setConfigProperties(Properties configProps)
configProps -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||