Package org.apache.commons.jcs3.engine
Class ZombieCacheServiceNonLocal<K,V> 
java.lang.Object
org.apache.commons.jcs3.engine.ZombieCacheService<K,V>
 
org.apache.commons.jcs3.engine.ZombieCacheServiceNonLocal<K,V> 
- All Implemented Interfaces:
- Remote,- ICacheService<K,,- V> - ICacheServiceNonLocal<K,,- V> - IZombie
public class ZombieCacheServiceNonLocal<K,V> 
extends ZombieCacheService<K,V>
implements ICacheServiceNonLocal<K,V>  
Zombie adapter for the non local cache services. It just balks if there is no queue configured.
 
If a queue is configured, then events will be added to the queue. The idea is that when proper operation is restored, the non local cache will walk the queue. The queue must be bounded so it does not eat memory.
This originated in the remote cache.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static classBase of the other events.
- 
Constructor SummaryConstructorsConstructorDescriptionDefault.ZombieCacheServiceNonLocal(int maxQueueSize) Sets the maximum number of items that will be allowed on the queue.
- 
Method SummaryModifier and TypeMethodDescriptionDoes nothing.Does nothing.Map<K,ICacheElement<K, V>> getMatching(String cacheName, String pattern, long requesterId) Does nothing.Map<K,ICacheElement<K, V>> getMultiple(String cacheName, Set<K> keys, long requesterId) Gets multiple items from the cache based on the given set of keys.intGets the number of items on the queue.voidpropagateEvents(ICacheServiceNonLocal<K, V> service) Walk the queue, calling the service for each queue operation.voidAdds a removeAll event to the queue if the maxSize is greater than 0;voidAdds a removeAll event to the queue if the maxSize is greater than 0;voidupdate(ICacheElement<K, V> item, long listenerId) Adds an update event to the queue if the maxSize is greater than 0;Methods inherited from class org.apache.commons.jcs3.engine.ZombieCacheServicedispose, get, get, getMatching, getMultiple, put, release, remove, removeAll, updateMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.jcs3.engine.behavior.ICacheServicedispose, get, getMatching, getMultiple, release, remove, removeAll, update
- 
Constructor Details- 
ZombieCacheServiceNonLocalpublic ZombieCacheServiceNonLocal()Default.
- 
ZombieCacheServiceNonLocalSets the maximum number of items that will be allowed on the queue.- Parameters:
- maxQueueSize-
 
 
- 
- 
Method Details- 
getQueueSizeGets the number of items on the queue.- Returns:
- size of the queue.
 
- 
updateAdds an update event to the queue if the maxSize is greater than 0;- Specified by:
- updatein interface- ICacheServiceNonLocal<K,- V> 
- Parameters:
- item- ICacheElement
- listenerId- - identifies the caller.
 
- 
removeAdds a removeAll event to the queue if the maxSize is greater than 0;- Specified by:
- removein interface- ICacheServiceNonLocal<K,- V> 
- Parameters:
- cacheName- - region name
- key- - item key
- listenerId- - identifies the caller.
 
- 
removeAllAdds a removeAll event to the queue if the maxSize is greater than 0;- Specified by:
- removeAllin interface- ICacheServiceNonLocal<K,- V> 
- Parameters:
- cacheName- - name of the region
- listenerId- - identifies the caller.
 
- 
getDoes nothing. Gets are synchronous and cannot be added to a queue.- Specified by:
- getin interface- ICacheServiceNonLocal<K,- V> 
- Parameters:
- cacheName- - region name
- key- - item key
- requesterId- - identifies the caller.
- Returns:
- null
- Throws:
- IOException
 
- 
getMatchingpublic Map<K,ICacheElement<K, getMatchingV>> (String cacheName, String pattern, long requesterId) throws IOException Does nothing.- Specified by:
- getMatchingin interface- ICacheServiceNonLocal<K,- V> 
- Parameters:
- cacheName-
- pattern-
- requesterId-
- Returns:
- empty map
- Throws:
- IOException
 
- 
getMultipleDescription copied from interface:ICacheServiceNonLocalGets multiple items from the cache based on the given set of keys.- Specified by:
- getMultiplein interface- ICacheServiceNonLocal<K,- V> 
- Parameters:
- cacheName- - region name
- keys- - item key
- requesterId- - identity of the caller
- Returns:
- an empty map. zombies have no internal data
 
- 
getKeySetDoes nothing.- Specified by:
- getKeySetin interface- ICacheServiceNonLocal<K,- V> 
- Parameters:
- cacheName- - region name
- Returns:
- empty set
 
- 
propagateEventsWalk the queue, calling the service for each queue operation.- Parameters:
- service-
- Throws:
- Exception
 
 
-