org.apache.jcs.auxiliary.remote.http.server
Class RemoteHttpCacheService

java.lang.Object
  extended by org.apache.jcs.auxiliary.remote.http.server.AbstractRemoteCacheService
      extended by org.apache.jcs.auxiliary.remote.http.server.RemoteHttpCacheService
All Implemented Interfaces:
Remote, IRemoteCacheService, ICacheService, ICacheServiceNonLocal

public class RemoteHttpCacheService
extends AbstractRemoteCacheService

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
RemoteHttpCacheService(ICompositeCacheManager cacheManager, RemoteHttpCacheServerAttributes remoteHttpCacheServerAttributes, ICacheEventLogger cacheEventLogger)
          Create a process with a cache manager.
 
Method Summary
protected  String getExtraInfoForRequesterId(long requesterId)
          This is called by the event log.
 void processDispose(String cacheName, long requesterId)
          Processes a shutdown request.
 ICacheElement processGet(String cacheName, Serializable key, long requesterId)
          Processes a get request.
 Map processGetMatching(String cacheName, String pattern, long requesterId)
          Processes a get request.
 Map processGetMultiple(String cacheName, Set keys, long requesterId)
          Processes a get request.
 void processRemove(String cacheName, Serializable key, long requesterId)
          Processes a remove request.
 void processRemoveAll(String cacheName, long requesterId)
          Processes a removeAll request.
 void processUpdate(ICacheElement item, long requesterId)
          Processes an update request.
 void release()
          This general method should be deprecated.
 
Methods inherited from class org.apache.jcs.auxiliary.remote.http.server.AbstractRemoteCacheService
createICacheEvent, createICacheEvent, dispose, dispose, get, get, getCacheManager, getEventLogSourceName, getGroupKeys, getMatching, getMatching, getMultiple, getMultiple, getStats, logApplicationEvent, logICacheEvent, processGetGroupKeys, remove, remove, removeAll, removeAll, setCacheEventLogger, setCacheManager, setEventLogSourceName, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteHttpCacheService

public RemoteHttpCacheService(ICompositeCacheManager cacheManager,
                              RemoteHttpCacheServerAttributes remoteHttpCacheServerAttributes,
                              ICacheEventLogger cacheEventLogger)
Create a process with a cache manager.

Parameters:
cacheManager -
remoteHttpCacheServerAttributes -
cacheEventLogger -
Method Detail

processGet

public ICacheElement processGet(String cacheName,
                                Serializable key,
                                long requesterId)
                         throws IOException
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 processGetMultiple(String cacheName,
                              Set 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 processGetMatching(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

public void processUpdate(ICacheElement item,
                          long requesterId)
                   throws IOException
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

public void processRemove(String cacheName,
                          Serializable key,
                          long requesterId)
                   throws IOException
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

public void processRemoveAll(String cacheName,
                             long requesterId)
                      throws IOException
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

public void processDispose(String cacheName,
                           long requesterId)
                    throws IOException
Processes a shutdown request.

Parameters:
cacheName -
requesterId -
Throws:
IOException

release

public void release()
             throws IOException
This general method should be deprecated.

Throws:
IOException

getExtraInfoForRequesterId

protected String getExtraInfoForRequesterId(long requesterId)
This is called by the event log.

Specified by:
getExtraInfoForRequesterId in class AbstractRemoteCacheService
Parameters:
requesterId -
Returns:
requesterId + ""


Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.