Class AbstractRemoteCacheNoWaitFacade<K,V> 
java.lang.Object
org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCache<K,V>
 
org.apache.commons.jcs3.auxiliary.remote.AbstractRemoteCacheNoWaitFacade<K,V> 
- All Implemented Interfaces:
- AuxiliaryCache<K,,- V> - ICache<K,,- V> - ICacheType
- Direct Known Subclasses:
- RemoteCacheNoWaitFacade
An abstract base for the No Wait Facade.  Different implementations will failover differently.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.commons.jcs3.engine.behavior.ICacheTypeICacheType.CacheType
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected List<RemoteCacheNoWait<K,V>> The connection to a remote server, or a zombie.Fields inherited from interface org.apache.commons.jcs3.engine.behavior.ICacheNAME_COMPONENT_DELIMITER
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractRemoteCacheNoWaitFacade(List<RemoteCacheNoWait<K, V>> noWaits, IRemoteCacheAttributes rca, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer) Constructs with the given remote cache, and fires events to any listeners.
- 
Method SummaryModifier and TypeMethodDescriptionvoiddispose()Adds a dispose request to the remote cache.protected abstract voidfailover(RemoteCacheNoWait<K, V> rcnw) Begin the failover process if this is a local cache.Synchronously reads from the remote cache.This returns the generic attributes for an auxiliary cache.Gets the cacheName attribute of the RemoteCacheNoWaitFacade object.Gets the cacheType attribute of the RemoteCacheNoWaitFacade object.This typically returns end point info .Return the keys in this cache.Map<K,ICacheElement<K, V>> getMatching(String pattern) Synchronously read from the remote cache.Map<K,ICacheElement<K, V>> getMultiple(Set<K> keys) Gets multiple items from the cache based on the given set of keys.Get the primary server from the list of failoversintgetSize()No remote invocation.getStats()getStatsGets the status attribute of the RemoteCacheNoWaitFacade objectbooleanAdds a remove request to the remote cache.voidAdds a removeAll request to the remote cache.voidrestorePrimaryServer(RemoteCacheNoWait<K, V> rcnw) restore the primary server in the list of failoverstoString()String form of some of the configuration information for the remote cache.voidupdate(ICacheElement<K, V> ce) Put an element in the cache.Methods inherited from class org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCachecreateICacheEvent, createICacheEvent, getCacheEventLogger, getElementSerializer, getKeyMatcher, logApplicationEvent, logError, logICacheEvent, processGetMultiple, setCacheEventLogger, setElementSerializer, setKeyMatcher
- 
Field Details- 
noWaitsThe connection to a remote server, or a zombie.
 
- 
- 
Constructor Details- 
AbstractRemoteCacheNoWaitFacadepublic AbstractRemoteCacheNoWaitFacade(List<RemoteCacheNoWait<K, V>> noWaits, IRemoteCacheAttributes rca, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer) Constructs with the given remote cache, and fires events to any listeners.- Parameters:
- noWaits-
- rca-
- cacheEventLogger-
- elementSerializer-
 
 
- 
- 
Method Details- 
updatePut an element in the cache.- Parameters:
- ce-
- Throws:
- IOException
 
- 
getSynchronously reads from the remote cache.- Specified by:
- getin interface- ICache<K,- V> 
- Specified by:
- getin class- AbstractAuxiliaryCache<K,- V> 
- Parameters:
- key-
- Returns:
- Either an ICacheElement<K, V> or null if it is not found.
- Throws:
- IOException
 
- 
getMatchingSynchronously read from the remote cache.- Parameters:
- pattern-
- Returns:
- map
- Throws:
- IOException
 
- 
getMultipleGets multiple items from the cache based on the given set of keys.- Parameters:
- keys-
- Returns:
- a map of K key to ICacheElement<K, V> element, or an empty map if there is no data in cache for any of these keys
- Throws:
- IOException
 
- 
getKeySetReturn the keys in this cache.- Returns:
- a set of the key type TODO This should probably be done in chunks with a range passed in. This will be a problem if someone puts a 1,000,000 or so items in a region.
- Throws:
- IOException- if access to the auxiliary cache fails
- See Also:
 
- 
removeAdds a remove request to the remote cache.- Parameters:
- key-
- Returns:
- whether or not it was removed, right now it return false.
- Throws:
- IOException
 
- 
removeAllAdds a removeAll request to the remote cache.- Throws:
- IOException
 
- 
disposeAdds a dispose request to the remote cache.
- 
getSizeNo remote invocation.- Returns:
- The size value
 
- 
getCacheTypeGets the cacheType attribute of the RemoteCacheNoWaitFacade object.- Returns:
- The cacheType value
 
- 
getCacheNameGets the cacheName attribute of the RemoteCacheNoWaitFacade object.- Returns:
- The cacheName value
 
- 
getStatusGets the status attribute of the RemoteCacheNoWaitFacade objectReturn ALIVE if any are alive. - Returns:
- The status value
 
- 
toStringString form of some of the configuration information for the remote cache.
- 
failoverBegin the failover process if this is a local cache. Clustered remote caches do not failover.- Parameters:
- rcnw- The no wait in error.
 
- 
getPrimaryServerGet the primary server from the list of failovers- Returns:
- a no wait
 
- 
restorePrimaryServerrestore the primary server in the list of failovers
- 
getAuxiliaryCacheAttributesDescription copied from interface:AuxiliaryCacheThis returns the generic attributes for an auxiliary cache. Most implementations will cast this to a more specific type.- Returns:
- Returns the AuxiliaryCacheAttributes.
 
- 
getStatsgetStats- Returns:
- String
 
- 
getStatistics- Returns:
- statistics about the cache region
 
- 
getEventLoggingExtraInfoThis typically returns end point info .- Specified by:
- getEventLoggingExtraInfoin class- AbstractAuxiliaryCache<K,- V> 
- Returns:
- the name
 
 
-