Class RemoteCache<K,V>
java.lang.Object
org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCache<K,V>
org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheEventLogging<K,V>
org.apache.commons.jcs3.auxiliary.remote.AbstractRemoteAuxiliaryCache<K,V>
org.apache.commons.jcs3.auxiliary.remote.RemoteCache<K,V>
- All Implemented Interfaces:
AuxiliaryCache<K,,V> IRemoteCacheClient<K,,V> ICache<K,,V> ICacheType
Client proxy for an RMI remote cache.
This handles gets, updates, and removes. It also initiates failover recovery when an error is encountered.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.commons.jcs3.engine.behavior.ICacheType
ICacheType.CacheType -
Field Summary
Fields inherited from class org.apache.commons.jcs3.auxiliary.remote.AbstractRemoteAuxiliaryCache
cacheNameFields inherited from interface org.apache.commons.jcs3.engine.behavior.ICache
NAME_COMPONENT_DELIMITER -
Constructor Summary
ConstructorsConstructorDescriptionRemoteCache(IRemoteCacheAttributes cattr, ICacheServiceNonLocal<K, V> remote, IRemoteCacheListener<K, V> listener, RemoteCacheMonitor monitor) Constructor for the RemoteCache object. -
Method Summary
Modifier and TypeMethodDescriptionGets the extra info for the event log.protected AbstractRemoteCacheNoWaitFacade<K,V> Get facadeprotected StringIP address for the service, if one is stored.protected voidhandleException(Exception ex, String msg, String eventName) Handles exception by disabling the remote cache service before re-throwing the exception in the form of an IOException.protected voidsetFacade(AbstractRemoteCacheNoWaitFacade<K, V> facade) Set facadetoString()Debugging info.Methods inherited from class org.apache.commons.jcs3.auxiliary.remote.AbstractRemoteAuxiliaryCache
fixCache, getAuxiliaryCacheAttributes, getCacheName, getCacheType, getKeySet, getListener, getListenerId, getRemoteCacheAttributes, getRemoteCacheListener, getRemoteCacheService, getSize, getStats, getStatus, getUsingPool, processDispose, processGet, processGetMatching, processRemove, processRemoveAll, processUpdate, setListenerId, setRemoteCacheAttributes, setRemoteCacheListener, setRemoteCacheServiceMethods inherited from class org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheEventLogging
dispose, disposeWithEventLogging, get, getMatching, getMatchingWithEventLogging, getMultiple, getMultipleWithEventLogging, getWithEventLogging, remove, removeAll, removeAllWithEventLogging, removeWithEventLogging, update, updateWithEventLoggingMethods inherited from class org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCache
createICacheEvent, createICacheEvent, getCacheEventLogger, getElementSerializer, getKeyMatcher, logApplicationEvent, logError, logICacheEvent, processGetMultiple, setCacheEventLogger, setElementSerializer, setKeyMatcherMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.jcs3.auxiliary.AuxiliaryCache
setCacheEventLogger, setElementSerializerMethods inherited from interface org.apache.commons.jcs3.engine.behavior.ICache
dispose, get, getMatching, getMultiple, remove, removeAll, setKeyMatcher, update
-
Constructor Details
-
RemoteCache
public RemoteCache(IRemoteCacheAttributes cattr, ICacheServiceNonLocal<K, V> remote, IRemoteCacheListener<K, V> listener, RemoteCacheMonitor monitor) 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:
cattr- the cache configurationremote- the remote cache server handlelistener- a listenermonitor- the cache monitor
-
-
Method Details
-
getStatistics
- Specified by:
getStatisticsin interfaceAuxiliaryCache<K,V> - Overrides:
getStatisticsin classAbstractRemoteAuxiliaryCache<K,V> - Returns:
- IStats object
-
setFacade
Set facade- Parameters:
facade- the facade to set
-
getFacade
Get facade- Returns:
- the facade
-
handleException
Handles exception by disabling the remote cache service before re-throwing the exception in the form of an IOException.- Specified by:
handleExceptionin classAbstractRemoteAuxiliaryCache<K,V> - Parameters:
ex-msg-eventName-- Throws:
IOException
-
toString
Debugging info. -
getEventLoggingExtraInfo
Gets the extra info for the event log.- Specified by:
getEventLoggingExtraInfoin classAbstractAuxiliaryCache<K,V> - Returns:
- disk location
-
getIPAddressForService
IP address for the service, if one is stored.Protected for testing.
- Returns:
- String
-