Class RemoteCacheNoWaitFacade<K,V> 
- All Implemented Interfaces:
- AuxiliaryCache<K,,- V> - ICache<K,,- V> - ICacheType
Typically, we only connect to one remote server per facade. We use a list of one RemoteCacheNoWait.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.commons.jcs3.engine.behavior.ICacheTypeICacheType.CacheType
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanAttempt to restore primary connection (switched off for testing)Fields inherited from class org.apache.commons.jcs3.auxiliary.remote.AbstractRemoteCacheNoWaitFacadenoWaitsFields inherited from interface org.apache.commons.jcs3.engine.behavior.ICacheNAME_COMPONENT_DELIMITER
- 
Constructor SummaryConstructorsConstructorDescriptionRemoteCacheNoWaitFacade(List<RemoteCacheNoWait<K, V>> noWaits, IRemoteCacheAttributes rca, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer, RemoteCacheFactory cacheFactory) Constructs with the given remote cache, and fires events to any listeners.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidThe thread tries to establish a connection with a failover server, if any are defined.protected voidfailover(RemoteCacheNoWait<K, V> rcnw) Begin the failover process if this is a local cache.Methods inherited from class org.apache.commons.jcs3.auxiliary.remote.AbstractRemoteCacheNoWaitFacadedispose, get, getAuxiliaryCacheAttributes, getCacheName, getCacheType, getEventLoggingExtraInfo, getKeySet, getMatching, getMultiple, getPrimaryServer, getSize, getStatistics, getStats, getStatus, remove, removeAll, restorePrimaryServer, toString, updateMethods inherited from class org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCachecreateICacheEvent, createICacheEvent, getCacheEventLogger, getElementSerializer, getKeyMatcher, logApplicationEvent, logError, logICacheEvent, processGetMultiple, setCacheEventLogger, setElementSerializer, setKeyMatcher
- 
Field Details- 
attemptRestorePrimaryAttempt to restore primary connection (switched off for testing)
 
- 
- 
Constructor Details- 
RemoteCacheNoWaitFacadepublic RemoteCacheNoWaitFacade(List<RemoteCacheNoWait<K, V>> noWaits, IRemoteCacheAttributes rca, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer, RemoteCacheFactory cacheFactory) Constructs with the given remote cache, and fires events to any listeners.- Parameters:
- noWaits-
- rca-
- cacheEventLogger-
- elementSerializer-
- cacheFactory-
 
 
- 
- 
Method Details- 
failoverBegin the failover process if this is a local cache. Clustered remote caches do not failover.- Specified by:
- failoverin class- AbstractRemoteCacheNoWaitFacade<K,- V> 
- Parameters:
- rcnw- The no wait in error.
 
- 
connectAndRestoreThe thread tries to establish a connection with a failover server, if any are defined. Once a failover connection is made, it will attempt to replace the failover with the primary remote server.It works by switching out the RemoteCacheNoWait inside the Facade. Client (i.e.) the CompositeCache has reference to a RemoteCacheNoWaitFacade. This facade is created by the RemoteCacheFactory. The factory maintains a set of managers, one for each remote server. Typically, there will only be one manager. If you use multiple remote servers, you may want to set one or more as failovers. If a local cache cannot connect to the primary server, or looses its connection to the primary server, it will attempt to restore that Connection in the background. If failovers are defined, the Failover runner will try to connect to a failover until the primary is restored. If no failovers are defined, this will exit automatically. - Since:
- 3.1
 
 
-