public class EHCacheRemote extends CacheSupport
Constructor and Description |
---|
EHCacheRemote() |
Modifier and Type | Method and Description |
---|---|
int |
clear()
remove all entries
|
boolean |
contains(String key)
check if there is a entry inside the cache that match the given key
|
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
|
Struct |
getCustomInfo()
get all information data available for this cache
|
CacheEntry |
getQuiet(String key) |
CacheEntry |
getQuiet(String key,
CacheEntry defaultValue) |
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
|
void |
init(Config config,
String name,
Struct arguments)
initialize the cache
|
static void |
init(ConfigWeb config,
String[] cacheNames,
Struct[] arguments) |
List |
keys()
Returns a List of the keys contained in this cache.
|
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 |
put(String key,
Object value,
Long idleTime,
Long liveTime)
puts a cache entry to the cache, overwrite existing entries that already exists inside the cache with the same key
|
boolean |
remove(String key)
remove entry that match this key
|
public EHCacheRemote()
public void init(Config config, String name, Struct arguments) throws IOException
Cache
arguments
- configuration argumentsCacheException
IOException
public boolean contains(String key)
Cache
public List keys()
Cache
public CacheEntry getQuiet(String key) throws IOException
getQuiet
in class CacheSupport
IOException
public CacheEntry getQuiet(String key, CacheEntry defaultValue)
getQuiet
in class CacheSupport
public CacheEntry getCacheEntry(String key) throws IOException
Cache
getCacheEntry
in interface Cache
getCacheEntry
in class CacheSupport
key
- key of the cache entry to getCacheException
IOException
public CacheEntry getCacheEntry(String key, CacheEntry defaultValue)
Cache
key
- key of the cache entry to getpublic Struct getCustomInfo()
Cache
getCustomInfo
in interface Cache
getCustomInfo
in class CacheSupport
public long hitCount()
Cache
public long missCount()
Cache
public void put(String key, Object value, Long idleTime, Long liveTime)
Cache
public boolean remove(String key)
Cache
public int clear() throws IOException
CacheSupport
clear
in class CacheSupport
IOException
Copyright © 2015 Lucee