Class LateralCacheNoWaitFacade<K,V> 
java.lang.Object
org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCache<K,V>
 
org.apache.commons.jcs3.auxiliary.lateral.LateralCacheNoWaitFacade<K,V> 
- All Implemented Interfaces:
- AuxiliaryCache<K,,- V> - ICache<K,,- V> - ICacheType
Used to provide access to multiple services under nowait protection. Composite factory should
 construct LateralCacheNoWaitFacade to give to the composite cache out of caches it constructs
 from the varies manager to lateral services. Perhaps the lateralcache factory should be able to
 do this.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.commons.jcs3.engine.behavior.ICacheTypeICacheType.CacheType
- 
Field SummaryFieldsModifier and TypeFieldDescriptionLateralCacheNoWait<K,V>[] Deprecated.Should not have been public in the first placeFields inherited from interface org.apache.commons.jcs3.engine.behavior.ICacheNAME_COMPONENT_DELIMITER
- 
Constructor SummaryConstructorsConstructorDescriptionLateralCacheNoWaitFacade(ILateralCacheListener<K, V> listener, List<LateralCacheNoWait<K, V>> noWaits, ILateralCacheAttributes cattr) Constructs with the given lateral cache, and fires events to any listeners.LateralCacheNoWaitFacade(ILateralCacheListener<K, V> listener, LateralCacheNoWait<K, V>[] noWaits, ILateralCacheAttributes cattr) Deprecated.Use list constructor
- 
Method SummaryModifier and TypeMethodDescriptionbooleanaddNoWait(LateralCacheNoWait<K, V> noWait) Adds a no wait to the list if it isn't already in the list.booleancontainsNoWait(String tcpServer) Tells you if the no wait is in the list or not by checking for its identifying keybooleancontainsNoWait(LateralCacheNoWait<K, V> noWait) Tells you if the no wait is in the list or not.voiddispose()Adds a dispose request to the lateral cache.Synchronously reads from the lateral cache.This returns the generic attributes for an auxiliary cache.Gets the cacheName attribute of the LateralCacheNoWaitFacade object.Gets the cacheType attribute of the LateralCacheNoWaitFacade object.this won't be called since we don't do ICache logging here.Return the keys in this cache.Map<K,ICacheElement<K, V>> getMatching(String pattern) Synchronously reads from the lateral cache.Map<K,ICacheElement<K, V>> getMultiple(Set<K> keys) Gets multiple items from the cache based on the given set of keys.protected intReturn the size of the no wait list (for testing)intgetSize()No lateral invocation.getStats()getStatsGets the status attribute of the LateralCacheNoWaitFacade objectbooleanAdds a remove request to the lateral cache.voidAdds a removeAll request to the lateral cache.booleanremoveNoWait(String tcpServer) Removes a no wait from the list if it is already there by its identifying keybooleanremoveNoWait(LateralCacheNoWait<K, V> noWait) Removes a no wait from the list if it is already there.toString()voidupdate(ICacheElement<K, V> ce) Update the cache element in all lateral cachesMethods inherited from class org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCachecreateICacheEvent, createICacheEvent, getCacheEventLogger, getElementSerializer, getKeyMatcher, logApplicationEvent, logError, logICacheEvent, processGetMultiple, setCacheEventLogger, setElementSerializer, setKeyMatcher
- 
Field Details- 
noWaitsDeprecated.Should not have been public in the first placeThe queuing facade to the client.
 
- 
- 
Constructor Details- 
LateralCacheNoWaitFacade@Deprecated public LateralCacheNoWaitFacade(ILateralCacheListener<K, V> listener, LateralCacheNoWait<K, V>[] noWaits, ILateralCacheAttributes cattr) Deprecated.Use list constructorConstructs with the given lateral cache, and fires events to any listeners.- Parameters:
- listener- the cache listener
- noWaits- the array of noWaits
- cattr- the configuration
 
- 
LateralCacheNoWaitFacadepublic LateralCacheNoWaitFacade(ILateralCacheListener<K, V> listener, List<LateralCacheNoWait<K, V>> noWaits, ILateralCacheAttributes cattr) Constructs with the given lateral cache, and fires events to any listeners.- Parameters:
- listener- the cache listener
- noWaits- the list of noWaits
- cattr- the configuration
- Since:
- 3.1
 
 
- 
- 
Method Details- 
getNoWaitSizeReturn the size of the no wait list (for testing)- Returns:
- the noWait list size.
- Since:
- 3.1
 
- 
containsNoWaitTells you if the no wait is in the list or not.- Parameters:
- noWait-
- Returns:
- true if the noWait is in the list.
 
- 
containsNoWaitTells you if the no wait is in the list or not by checking for its identifying key- Parameters:
- tcpServer- the identifying key
- Returns:
- true if the noWait is in the list.
- Since:
- 3.1
 
- 
addNoWaitAdds a no wait to the list if it isn't already in the list.- Parameters:
- noWait-
- Returns:
- true if it wasn't already contained
 
- 
removeNoWaitRemoves a no wait from the list if it is already there.- Parameters:
- noWait-
- Returns:
- true if it was already in the array
 
- 
removeNoWaitRemoves a no wait from the list if it is already there by its identifying key- Parameters:
- tcpServer- the identifying key.
- Returns:
- true if it was already in the array
- Since:
- 3.1
 
- 
updateUpdate the cache element in all lateral caches- Parameters:
- ce- the cache element
- Throws:
- IOException
 
- 
getSynchronously reads from the lateral cache.
- 
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
 
- 
getMatchingSynchronously reads from the lateral cache. Get a response from each! This will be slow. Merge them.- Parameters:
- pattern-
- Returns:
- ICacheElement
 
- 
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 lateral cache.- Parameters:
- key-
- Returns:
- always false.
 
- 
removeAllAdds a removeAll request to the lateral cache.
- 
disposeAdds a dispose request to the lateral cache.
- 
getSizeNo lateral invocation.- Returns:
- The size value
 
- 
getCacheTypeGets the cacheType attribute of the LateralCacheNoWaitFacade object.- Returns:
- The cacheType value
 
- 
getCacheNameGets the cacheName attribute of the LateralCacheNoWaitFacade object.- Returns:
- The cacheName value
 
- 
getStatusGets the status attribute of the LateralCacheNoWaitFacade object- Returns:
- The status value
 
- 
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.
 
- 
toString
- 
getEventLoggingExtraInfothis won't be called since we don't do ICache logging here.- Specified by:
- getEventLoggingExtraInfoin class- AbstractAuxiliaryCache<K,- V> 
- Returns:
- String
 
- 
getStatsgetStats- Returns:
- String
 
- 
getStatistics- Returns:
- IStats
 
 
-