public final class JCSCacheManager extends Object
| Modifier and Type | Field and Description |
|---|---|
private static FileLock |
cacheDirLock |
private static org.apache.commons.jcs.engine.control.CompositeCacheManager |
cacheManager |
static IntegerProperty |
DEFAULT_MAX_OBJECTS_IN_MEMORY
default objects to be held in memory by JCS caches (per region)
|
private static org.apache.commons.jcs.auxiliary.AuxiliaryCacheFactory |
diskCacheFactory |
private static Logger |
LOG |
private static long |
maxObjectTTL |
private static String |
PREFERENCE_PREFIX |
| Modifier | Constructor and Description |
|---|---|
private |
JCSCacheManager() |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> org.apache.commons.jcs.access.CacheAccess<K,V> |
getCache(String cacheName)
Returns configured cache object for named cache region
|
static <K,V> org.apache.commons.jcs.access.CacheAccess<K,V> |
getCache(String cacheName,
int maxMemoryObjects,
int maxDiskObjects,
String cachePath)
Returns configured cache object with defined limits of memory cache and disk cache
|
private static org.apache.commons.jcs.engine.CompositeCacheAttributes |
getCacheAttributes(int maxMemoryElements) |
private static <K,V> org.apache.commons.jcs.access.CacheAccess<K,V> |
getCacheInner(String cacheName,
int maxMemoryObjects,
int maxDiskObjects,
String cachePath) |
private static org.apache.commons.jcs.auxiliary.disk.behavior.IDiskCacheAttributes |
getDiskCacheAttributes(int maxDiskObjects,
String cachePath) |
private static void |
initialize() |
static void |
shutdown()
Close all files to ensure, that all indexes and data are properly written
|
private static volatile org.apache.commons.jcs.engine.control.CompositeCacheManager cacheManager
private static long maxObjectTTL
private static final String PREFERENCE_PREFIX
private static final org.apache.commons.jcs.auxiliary.AuxiliaryCacheFactory diskCacheFactory
private static FileLock cacheDirLock
public static final IntegerProperty DEFAULT_MAX_OBJECTS_IN_MEMORY
private JCSCacheManager()
private static void initialize() throws IOException
IOExceptionpublic static <K,V> org.apache.commons.jcs.access.CacheAccess<K,V> getCache(String cacheName) throws IOException
K - key typeV - value typecacheName - region nameIOException - if directory is not foundpublic static <K,V> org.apache.commons.jcs.access.CacheAccess<K,V> getCache(String cacheName, int maxMemoryObjects, int maxDiskObjects, String cachePath) throws IOException
K - key typeV - value typecacheName - region namemaxMemoryObjects - number of objects to keep in memorymaxDiskObjects - maximum size of the objects stored on disk in kBcachePath - path to disk cache. if null, no disk cache will be createdIOException - if directory is not foundprivate static <K,V> org.apache.commons.jcs.access.CacheAccess<K,V> getCacheInner(String cacheName, int maxMemoryObjects, int maxDiskObjects, String cachePath)
public static void shutdown()
private static org.apache.commons.jcs.auxiliary.disk.behavior.IDiskCacheAttributes getDiskCacheAttributes(int maxDiskObjects, String cachePath)
private static org.apache.commons.jcs.engine.CompositeCacheAttributes getCacheAttributes(int maxMemoryElements)