public interface ICacheService<K,V>
Note: server which implements this interface provides a local cache service, whereas server which implements IRmiCacheService provides a remote cache service.
| Modifier and Type | Method and Description |
|---|---|
void |
dispose(String cacheName)
Frees the specified cache.
|
ICacheElement<K,V> |
get(String cacheName,
K key)
Returns a cache bean from the specified cache; or null if the key does not exist.
|
Map<K,ICacheElement<K,V>> |
getMatching(String cacheName,
String pattern)
Gets multiple items from the cache matching the pattern.
|
Map<K,ICacheElement<K,V>> |
getMultiple(String cacheName,
Set<K> keys)
Gets multiple items from the cache based on the given set of keys.
|
void |
release()
Frees all caches.
|
void |
remove(String cacheName,
K key)
Removes the given key from the specified cache.
|
void |
removeAll(String cacheName)
Remove all keys from the specified cache.
|
void |
update(ICacheElement<K,V> item)
Puts a cache item to the cache.
|
void update(ICacheElement<K,V> item) throws ObjectExistsException, IOException
item - ObjectExistsExceptionIOExceptionICacheElement<K,V> get(String cacheName, K key) throws ObjectNotFoundException, IOException
cacheName - key - ObjectNotFoundExceptionIOExceptionMap<K,ICacheElement<K,V>> getMultiple(String cacheName, Set<K> keys) throws ObjectNotFoundException, IOException
cacheName - keys - ObjectNotFoundExceptionIOExceptionMap<K,ICacheElement<K,V>> getMatching(String cacheName, String pattern) throws IOException
cacheName - pattern - IOExceptionvoid remove(String cacheName, K key) throws IOException
cacheName - key - IOExceptionvoid removeAll(String cacheName) throws IOException
cacheName - IOExceptionvoid dispose(String cacheName) throws IOException
cacheName - IOExceptionvoid release()
throws IOException
IOExceptionCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.