public class ZombieCacheServiceNonLocal<K,V> extends ZombieCacheService<K,V> implements ICacheServiceNonLocal<K,V>
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.
Modifier and Type | Class and Description |
---|---|
protected static class |
ZombieCacheServiceNonLocal.ZombieEvent
Base of the other events.
|
Constructor and Description |
---|
ZombieCacheServiceNonLocal()
Default.
|
ZombieCacheServiceNonLocal(int maxQueueSize)
Sets the maximum number of items that will be allowed on the queue.
|
Modifier and Type | Method and Description |
---|---|
ICacheElement<K,V> |
get(String cacheName,
K key,
long requesterId)
Does nothing.
|
Set<K> |
getKeySet(String cacheName)
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.
|
int |
getQueueSize()
Gets the number of items on the queue.
|
void |
propagateEvents(ICacheServiceNonLocal<K,V> service)
Walk the queue, calling the service for each queue operation.
|
void |
remove(String cacheName,
K key,
long listenerId)
Adds a removeAll event to the queue if the maxSize is greater than 0;
|
void |
removeAll(String cacheName,
long listenerId)
Adds a removeAll event to the queue if the maxSize is greater than 0;
|
void |
update(ICacheElement<K,V> item,
long listenerId)
Adds an update event to the queue if the maxSize is greater than 0;
|
dispose, get, get, getMatching, getMultiple, put, release, remove, removeAll, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose, get, getMatching, getMultiple, release, remove, removeAll, update
public ZombieCacheServiceNonLocal()
public ZombieCacheServiceNonLocal(int maxQueueSize)
maxQueueSize
- public int getQueueSize()
public void update(ICacheElement<K,V> item, long listenerId)
update
in interface ICacheServiceNonLocal<K,V>
item
- ICacheElementlistenerId
- - identifies the caller.public void remove(String cacheName, K key, long listenerId)
remove
in interface ICacheServiceNonLocal<K,V>
cacheName
- - region namekey
- - item keylistenerId
- - identifies the caller.public void removeAll(String cacheName, long listenerId)
removeAll
in interface ICacheServiceNonLocal<K,V>
cacheName
- - name of the regionlistenerId
- - identifies the caller.public ICacheElement<K,V> get(String cacheName, K key, long requesterId) throws IOException
get
in interface ICacheServiceNonLocal<K,V>
cacheName
- - region namekey
- - item keyrequesterId
- - identifies the caller.IOException
public Map<K,ICacheElement<K,V>> getMatching(String cacheName, String pattern, long requesterId) throws IOException
getMatching
in interface ICacheServiceNonLocal<K,V>
cacheName
- pattern
- requesterId
- IOException
public Map<K,ICacheElement<K,V>> getMultiple(String cacheName, Set<K> keys, long requesterId)
ICacheServiceNonLocal
getMultiple
in interface ICacheServiceNonLocal<K,V>
cacheName
- - region namekeys
- - item keyrequesterId
- - identity of the callerpublic Set<K> getKeySet(String cacheName)
getKeySet
in interface ICacheServiceNonLocal<K,V>
cacheName
- - region namepublic void propagateEvents(ICacheServiceNonLocal<K,V> service) throws Exception
service
- Exception
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.