Interface ICacheServiceNonLocal<K,V> 
- All Superinterfaces:
- ICacheService<K,,- V> - Remote
- All Known Subinterfaces:
- IRemoteCacheServer<K,,- V> - IRemoteHttpCacheClient<K,- V> 
- All Known Implementing Classes:
- AbstractRemoteCacheService,- LateralTCPService,- RemoteCacheServer,- RemoteHttpCacheClient,- RemoteHttpCacheService,- ZombieCacheServiceNonLocal
Used to retrieve and update non local caches, such as the remote and lateral caches. Unlike
 ICacheService, the methods here have a requester id. This allows us to avoid propagating events
 to ourself.
 
TODO consider not extending ICacheService
- 
Method SummaryModifier and TypeMethodDescriptionReturns a cache bean from the specified cache; or null if the key does not exist.Get a set of the keys for all elements in the cache.Map<K,ICacheElement<K, V>> getMatching(String cacheName, String pattern, long requesterId) Gets multiple items from the cache matching the pattern.Map<K,ICacheElement<K, V>> getMultiple(String cacheName, Set<K> keys, long requesterId) Gets multiple items from the cache based on the given set of keys.voidRemoves the given key from the specified cache.voidRemove all keys from the specified cache.voidupdate(ICacheElement<K, V> item, long requesterId) Puts a cache item to the cache.Methods inherited from interface org.apache.commons.jcs3.engine.behavior.ICacheServicedispose, get, getMatching, getMultiple, release, remove, removeAll, update
- 
Method Details- 
updatePuts a cache item to the cache.- Parameters:
- item-
- requesterId-
- Throws:
- IOException
 
- 
removeRemoves the given key from the specified cache.- Parameters:
- cacheName-
- key-
- requesterId-
- Throws:
- IOException
 
- 
removeAllRemove all keys from the specified cache.- Parameters:
- cacheName-
- requesterId-
- Throws:
- IOException
 
- 
getReturns a cache bean from the specified cache; or null if the key does not exist.Adding the requester id, allows the cache to determine the source of the get. - Parameters:
- cacheName-
- key-
- requesterId-
- Returns:
- ICacheElement
- Throws:
- IOException
 
- 
getMultipleMap<K,ICacheElement<K, getMultipleV>> (String cacheName, Set<K> keys, long requesterId) throws IOException Gets multiple items from the cache based on the given set of keys.- Parameters:
- cacheName-
- keys-
- requesterId-
- Returns:
- a map of K key to ICacheElement<K, V> element, or an empty map if there is no data in cache for any of these keys
- Throws:
- IOException
 
- 
getMatchingMap<K,ICacheElement<K, getMatchingV>> (String cacheName, String pattern, long requesterId) throws IOException Gets multiple items from the cache matching the pattern.- Parameters:
- cacheName-
- pattern-
- requesterId-
- Returns:
- a map of K key to ICacheElement<K, V> element, or an empty map if there is no data in cache matching the pattern.
- Throws:
- IOException
 
- 
getKeySetGet a set of the keys for all elements in the cache.- Parameters:
- cacheName- the name of the cache
- Returns:
- a set of the key type TODO This should probably be done in chunks with a range passed in. This will be a problem if someone puts a 1,000,000 or so items in a region.
- Throws:
- IOException
 
 
-