public class EHCache extends EHCacheSupport
Constructor and Description |
---|
EHCache() |
Modifier and Type | Method and Description |
---|---|
int |
clear()
remove all entries
|
static void |
flushAllCaches() |
CacheEntry |
getCacheEntry(String key)
return cache entry that match the key, throws a CacheException when entry does not exist or is stale
|
CacheEntry |
getCacheEntry(String key,
CacheEntry defaultValue)
return cache entry that match the key or the defaultValue when entry does not exist
|
Object |
getValue(String key)
return value that match the key, throws a CacheException when entry does not exist or is stale
|
Object |
getValue(String key,
Object defaultValue)
return value that match the key or the defaultValue when entry does not exist
|
long |
hitCount()
how many time was the cache accessed?
this information is optional and depends on the implementation,
when information is not available -1 is returned
|
static void |
init(Config config,
String[] cacheNames,
Struct[] arguments) |
void |
init(Config config,
String cacheName,
Struct arguments)
initialize the cache
|
void |
init(String cacheName,
Struct arguments) |
long |
missCount()
how many time was the cache accessed for a record that does not exist?
this information is optional and depends on the implementation,
when information is not available -1 is returned
|
void |
remove() |
boolean |
remove(String key)
remove entry that match this key
|
contains, getCustomInfo, getQuiet, getQuiet, keys, put, register
entries, entries, entries, keys, keys, remove, remove, values, values, values
public EHCache()
public static void init(Config config, String[] cacheNames, Struct[] arguments) throws IOException
IOException
public static void flushAllCaches()
public void init(Config config, String cacheName, Struct arguments)
Cache
arguments
- configuration argumentspublic boolean remove(String key)
Cache
public CacheEntry getCacheEntry(String key) throws CacheException
Cache
getCacheEntry
in interface Cache
getCacheEntry
in class CacheSupport
key
- key of the cache entry to getCacheException
public CacheEntry getCacheEntry(String key, CacheEntry defaultValue)
Cache
key
- key of the cache entry to getpublic Object getValue(String key) throws CacheException
Cache
getValue
in interface Cache
getValue
in class CacheSupport
key
- key of the value to getCacheException
public Object getValue(String key, Object defaultValue)
Cache
getValue
in interface Cache
getValue
in class CacheSupport
key
- key of the value to getpublic long hitCount()
Cache
public long missCount()
Cache
public void remove()
public int clear() throws IOException
CacheSupport
clear
in class CacheSupport
IOException
Copyright © 2015 Lucee