Class RemoteHttpCacheService<K,V>
java.lang.Object
org.apache.commons.jcs3.auxiliary.remote.http.server.AbstractRemoteCacheService<K,V>
org.apache.commons.jcs3.auxiliary.remote.http.server.RemoteHttpCacheService<K,V>
- All Implemented Interfaces:
Remote
,ICacheService<K,
,V> ICacheServiceNonLocal<K,
V>
This does the work. It's called by the processor. The base class wraps the processing calls in
event logs, if an event logger is present.
For now we assume that all clients are non-cluster clients. And listener notification is not supported.
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteHttpCacheService
(ICompositeCacheManager cacheManager, RemoteHttpCacheServerAttributes remoteHttpCacheServerAttributes, ICacheEventLogger cacheEventLogger) Create a process with a cache manager. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
getExtraInfoForRequesterId
(long requesterId) This is called by the event log.void
processDispose
(String cacheName, long requesterId) Processes a shutdown request.processGet
(String cacheName, K key, long requesterId) Processes a get request.Map<K,
ICacheElement<K, V>> processGetMatching
(String cacheName, String pattern, long requesterId) Processes a get request.Map<K,
ICacheElement<K, V>> processGetMultiple
(String cacheName, Set<K> keys, long requesterId) Processes a get request.void
processRemove
(String cacheName, K key, long requesterId) Processes a remove request.void
processRemoveAll
(String cacheName, long requesterId) Processes a removeAll request.void
processUpdate
(ICacheElement<K, V> item, long requesterId) Processes an update request.void
release()
This general method should be deprecated.Methods inherited from class org.apache.commons.jcs3.auxiliary.remote.http.server.AbstractRemoteCacheService
createICacheEvent, createICacheEvent, dispose, dispose, get, get, getCacheManager, getEventLogSourceName, getKeySet, getMatching, getMatching, getMultiple, getMultiple, getStats, logApplicationEvent, logICacheEvent, processGetKeySet, remove, remove, removeAll, removeAll, setCacheEventLogger, setCacheManager, setEventLogSourceName, update, update
-
Constructor Details
-
RemoteHttpCacheService
public RemoteHttpCacheService(ICompositeCacheManager cacheManager, RemoteHttpCacheServerAttributes remoteHttpCacheServerAttributes, ICacheEventLogger cacheEventLogger) Create a process with a cache manager.- Parameters:
cacheManager
-remoteHttpCacheServerAttributes
-cacheEventLogger
-
-
-
Method Details
-
processGet
Processes a get request.If isAllowClusterGet is enabled we will treat this as a normal request or non-remote origins.
- Parameters:
cacheName
-key
-requesterId
-- Returns:
- ICacheElement
- Throws:
IOException
-
processGetMultiple
public Map<K,ICacheElement<K, processGetMultipleV>> (String cacheName, Set<K> keys, long requesterId) throws IOException Processes a get request.If isAllowClusterGet is enabled we will treat this as a normal request of non-remote origination.
- Parameters:
cacheName
-keys
-requesterId
-- Returns:
- Map
- Throws:
IOException
-
processGetMatching
public Map<K,ICacheElement<K, processGetMatchingV>> (String cacheName, String pattern, long requesterId) throws IOException Processes a get request.If isAllowClusterGet is enabled we will treat this as a normal request of non-remote origination.
- Parameters:
cacheName
-pattern
-requesterId
-- Returns:
- Map
- Throws:
IOException
-
processUpdate
Processes an update request.If isLocalClusterConsistency is enabled we will treat this as a normal request of non-remote origination.
- Parameters:
item
-requesterId
-- Throws:
IOException
-
processRemove
Processes a remove request.If isLocalClusterConsistency is enabled we will treat this as a normal request of non-remote origination.
- Parameters:
cacheName
-key
-requesterId
-- Throws:
IOException
-
processRemoveAll
Processes a removeAll request.If isLocalClusterConsistency is enabled we will treat this as a normal request of non-remote origination.
- Parameters:
cacheName
-requesterId
-- Throws:
IOException
-
processDispose
Processes a shutdown request.- Parameters:
cacheName
-requesterId
-- Throws:
IOException
-
release
This general method should be deprecated.- Throws:
IOException
-
getExtraInfoForRequesterId
This is called by the event log.- Specified by:
getExtraInfoForRequesterId
in classAbstractRemoteCacheService<K,
V> - Parameters:
requesterId
-- Returns:
- requesterId + ""
-