org.apache.jcs.auxiliary.remote.http.client
Class RemoteHttpCache<K extends Serializable,V extends Serializable>

java.lang.Object
  extended by org.apache.jcs.auxiliary.AbstractAuxiliaryCache<K,V>
      extended by org.apache.jcs.auxiliary.AbstractAuxiliaryCacheEventLogging<K,V>
          extended by org.apache.jcs.auxiliary.remote.AbstractRemoteAuxiliaryCache<K,V>
              extended by org.apache.jcs.auxiliary.remote.http.client.RemoteHttpCache<K,V>
All Implemented Interfaces:
AuxiliaryCache<K,V>, IRemoteCacheClient<K,V>, ICache<K,V>, ICacheType

public class RemoteHttpCache<K extends Serializable,V extends Serializable>
extends AbstractRemoteAuxiliaryCache<K,V>

This uses an http client as the service.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.jcs.engine.behavior.ICacheType
ICacheType.CacheType
 
Field Summary
 
Fields inherited from class org.apache.jcs.auxiliary.remote.AbstractRemoteAuxiliaryCache
cacheName
 
Fields inherited from class org.apache.jcs.auxiliary.AbstractAuxiliaryCache
cacheEventLogger, elementSerializer, keyMatcher
 
Constructor Summary
RemoteHttpCache(RemoteHttpCacheAttributes remoteHttpCacheAttributes, ICacheServiceNonLocal<K,V> remote, IRemoteCacheListener<K,V> listener)
          Constructor for the RemoteCache object.
 
Method Summary
 String getEventLoggingExtraInfo()
          Gets the extra info for the event log.
 RemoteHttpCacheAttributes getRemoteHttpCacheAttributes()
           
protected  void handleException(Exception ex, String msg, String eventName)
          Nothing right now.
 void setRemoteHttpCacheAttributes(RemoteHttpCacheAttributes remoteHttpCacheAttributes)
           
 
Methods inherited from class org.apache.jcs.auxiliary.remote.AbstractRemoteAuxiliaryCache
fixCache, getAuxiliaryCacheAttributes, getCacheName, getCacheType, getGroupKeys, getGroupNames, getListener, getListenerId, getRemoteCacheAttributes, getRemoteCacheListener, getRemoteCacheService, getSize, getStatistics, getStats, getStatus, getUsingPool, processDispose, processGet, processGetMatching, processGetMultiple, processRemove, processRemoveAll, processUpdate, setListenerId, setRemoteCacheAttributes, setRemoteCacheListener, setRemoteCacheService
 
Methods inherited from class org.apache.jcs.auxiliary.AbstractAuxiliaryCacheEventLogging
dispose, disposeWithEventLogging, get, getMatching, getMatchingWithEventLogging, getMultiple, getMultipleWithEventLogging, getWithEventLogging, remove, removeAll, removeAllWithEventLogging, removeWithEventLogging, update, updateWithEventLogging
 
Methods inherited from class org.apache.jcs.auxiliary.AbstractAuxiliaryCache
createICacheEvent, createICacheEvent, getCacheEventLogger, getElementSerializer, getKeyMatcher, logApplicationEvent, logError, logICacheEvent, setCacheEventLogger, setElementSerializer, setKeyMatcher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jcs.auxiliary.AuxiliaryCache
setCacheEventLogger, setElementSerializer
 
Methods inherited from interface org.apache.jcs.engine.behavior.ICache
dispose, get, getMatching, getMultiple, remove, removeAll, setKeyMatcher, update
 

Constructor Detail

RemoteHttpCache

public RemoteHttpCache(RemoteHttpCacheAttributes remoteHttpCacheAttributes,
                       ICacheServiceNonLocal<K,V> remote,
                       IRemoteCacheListener<K,V> listener)
Constructor for the RemoteCache object. This object communicates with a remote cache server. One of these exists for each region. This also holds a reference to a listener. The same listener is used for all regions for one remote server. Holding a reference to the listener allows this object to know the listener id assigned by the remote cache.

Parameters:
remoteHttpCacheAttributes -
remote -
listener -
Method Detail

handleException

protected void handleException(Exception ex,
                               String msg,
                               String eventName)
                        throws IOException
Nothing right now. This should setup a zombie and initiate recovery.

Specified by:
handleException in class AbstractRemoteAuxiliaryCache<K extends Serializable,V extends Serializable>
Parameters:
ex -
msg -
eventName -
Throws:
IOException

getEventLoggingExtraInfo

public String getEventLoggingExtraInfo()
Description copied from class: AbstractAuxiliaryCache
Gets the extra info for the event log.

Specified by:
getEventLoggingExtraInfo in class AbstractAuxiliaryCache<K extends Serializable,V extends Serializable>
Returns:
url of service

setRemoteHttpCacheAttributes

public void setRemoteHttpCacheAttributes(RemoteHttpCacheAttributes remoteHttpCacheAttributes)
Parameters:
remoteHttpCacheAttributes - the remoteHttpCacheAttributes to set

getRemoteHttpCacheAttributes

public RemoteHttpCacheAttributes getRemoteHttpCacheAttributes()
Returns:
the remoteHttpCacheAttributes


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.