public class RemoteHttpCacheClient<K,V> extends Object implements IRemoteHttpCacheClient<K,V>
| Constructor and Description |
|---|
RemoteHttpCacheClient()
For factory construction.
|
RemoteHttpCacheClient(RemoteHttpCacheAttributes attributes)
Constructs a client.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose(String cacheName)
Frees the specified cache.
|
ICacheElement<K,V> |
get(String cacheName,
K key)
Create a request, process, extract the payload.
|
ICacheElement<K,V> |
get(String cacheName,
K key,
long requesterId)
Create a request, process, extract the payload.
|
Set<K> |
getKeySet(String cacheName)
Return the keys in this cache.
|
Map<K,ICacheElement<K,V>> |
getMatching(String cacheName,
String pattern)
Gets multiple items from the cache matching the pattern.
|
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)
Gets multiple items from the cache based on the given set of keys.
|
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.
|
IRemoteCacheDispatcher |
getRemoteDispatcher() |
RemoteHttpCacheAttributes |
getRemoteHttpCacheAttributes() |
void |
initialize(RemoteHttpCacheAttributes attributes)
The provides an extension point.
|
boolean |
isAlive()
Make and alive request.
|
protected boolean |
isInitialized() |
void |
release()
Frees the specified cache.
|
void |
remove(String cacheName,
K key)
Removes the given key from the specified cache.
|
void |
remove(String cacheName,
K key,
long requesterId)
Removes the given key from the specified cache.
|
void |
removeAll(String cacheName)
Remove all keys from the specified cache.
|
void |
removeAll(String cacheName,
long requesterId)
Remove all keys from the specified cache.
|
protected void |
setInitialized(boolean initialized) |
void |
setRemoteDispatcher(IRemoteCacheDispatcher remoteDispatcher) |
void |
setRemoteHttpCacheAttributes(RemoteHttpCacheAttributes remoteHttpCacheAttributes) |
void |
update(ICacheElement<K,V> item)
Puts a cache item to the cache.
|
void |
update(ICacheElement<K,V> cacheElement,
long requesterId)
Puts a cache item to the cache.
|
public RemoteHttpCacheClient()
public RemoteHttpCacheClient(RemoteHttpCacheAttributes attributes)
attributes - public void initialize(RemoteHttpCacheAttributes attributes)
initialize in interface IRemoteHttpCacheClient<K,V>attributes - public ICacheElement<K,V> get(String cacheName, K key) throws IOException
get in interface ICacheService<K,V>cacheName - key - IOExceptionpublic ICacheElement<K,V> get(String cacheName, K key, long requesterId) throws IOException
get in interface ICacheServiceNonLocal<K,V>cacheName - key - requesterId - IOExceptionpublic Map<K,ICacheElement<K,V>> getMatching(String cacheName, String pattern) throws IOException
getMatching in interface ICacheService<K,V>cacheName - pattern - IOExceptionpublic Map<K,ICacheElement<K,V>> getMatching(String cacheName, String pattern, long requesterId) throws IOException
getMatching in interface ICacheServiceNonLocal<K,V>cacheName - pattern - requesterId - IOExceptionpublic Map<K,ICacheElement<K,V>> getMultiple(String cacheName, Set<K> keys) throws IOException
getMultiple in interface ICacheService<K,V>cacheName - keys - IOExceptionpublic Map<K,ICacheElement<K,V>> getMultiple(String cacheName, Set<K> keys, long requesterId) throws IOException
getMultiple in interface ICacheServiceNonLocal<K,V>cacheName - keys - requesterId - IOExceptionpublic void remove(String cacheName, K key) throws IOException
remove in interface ICacheService<K,V>cacheName - key - IOExceptionpublic void remove(String cacheName, K key, long requesterId) throws IOException
remove in interface ICacheServiceNonLocal<K,V>cacheName - key - requesterId - IOExceptionpublic void removeAll(String cacheName) throws IOException
removeAll in interface ICacheService<K,V>cacheName - IOExceptionpublic void removeAll(String cacheName, long requesterId) throws IOException
removeAll in interface ICacheServiceNonLocal<K,V>cacheName - requesterId - IOExceptionpublic void update(ICacheElement<K,V> item) throws IOException
update in interface ICacheService<K,V>item - IOExceptionpublic void update(ICacheElement<K,V> cacheElement, long requesterId) throws IOException
update in interface ICacheServiceNonLocal<K,V>cacheElement - requesterId - IOExceptionpublic void dispose(String cacheName) throws IOException
dispose in interface ICacheService<K,V>cacheName - IOExceptionpublic void release()
throws IOException
release in interface ICacheService<K,V>IOExceptionpublic Set<K> getKeySet(String cacheName) throws IOException
getKeySet in interface ICacheServiceNonLocal<K,V>cacheName - the name of the cacheIOExceptionAuxiliaryCache.getKeySet()public boolean isAlive()
throws IOException
isAlive in interface IRemoteHttpCacheClient<K,V>IOExceptionpublic void setRemoteDispatcher(IRemoteCacheDispatcher remoteDispatcher)
remoteDispatcher - the remoteDispatcher to setpublic IRemoteCacheDispatcher getRemoteDispatcher()
public void setRemoteHttpCacheAttributes(RemoteHttpCacheAttributes remoteHttpCacheAttributes)
remoteHttpCacheAttributes - the remoteHttpCacheAttributes to setpublic RemoteHttpCacheAttributes getRemoteHttpCacheAttributes()
protected void setInitialized(boolean initialized)
initialized - the initialized to setprotected boolean isInitialized()
Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.