public class ZombieRemoteCacheService extends ZombieCacheService implements IRemoteCacheService
If a queue is configured, then events will be added to the queue. The idea is that when proper operation is restored, the remote cache will walk the queue. The queue must be bounded so it does not eat memory.
Much of this is potentially reusable.
TODO figure out a way to get the propagate method into an interface for Zombies.
| Constructor and Description |
|---|
ZombieRemoteCacheService()
Default.
|
ZombieRemoteCacheService(int maxQueueSize)
Sets the maximum number of items that will be allowed on the queue.
|
| Modifier and Type | Method and Description |
|---|---|
ICacheElement |
get(java.lang.String cacheName,
java.io.Serializable key,
long requesterId)
Does nothing.
|
java.util.Set |
getGroupKeys(java.lang.String cacheName,
java.lang.String groupName)
Does nothing.
|
java.util.Map |
getMatching(java.lang.String cacheName,
java.lang.String pattern,
long requesterId)
Gets multiple items from the cache matching the pattern.
|
java.util.Map |
getMultiple(java.lang.String cacheName,
java.util.Set 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.
|
protected void |
propagateEvents(IRemoteCacheService service)
Walk the queue, calling the service for each queue operation.
|
void |
remove(java.lang.String cacheName,
java.io.Serializable key,
long listenerId)
Adds a removeAll event to the queue if the maxSize is greater than 0;
|
void |
removeAll(java.lang.String cacheName,
long listenerId)
Adds a removeAll event to the queue if the maxSize is greater than 0;
|
void |
update(ICacheElement 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, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdispose, get, getMatching, getMultiple, release, remove, removeAll, updatepublic ZombieRemoteCacheService()
public ZombieRemoteCacheService(int maxQueueSize)
maxQueueSize - public int getQueueSize()
public void update(ICacheElement item, long listenerId)
(non-Javadoc)
update in interface IRemoteCacheServiceIRemoteCacheService.update(org.apache.jcs.engine.behavior.ICacheElement,
long)public void remove(java.lang.String cacheName,
java.io.Serializable key,
long listenerId)
(non-Javadoc)
remove in interface IRemoteCacheServiceIRemoteCacheService.remove(java.lang.String,
java.io.Serializable, long)public void removeAll(java.lang.String cacheName,
long listenerId)
(non-Javadoc)
removeAll in interface IRemoteCacheServiceIRemoteCacheService.removeAll(java.lang.String,
long)public ICacheElement get(java.lang.String cacheName, java.io.Serializable key, long requesterId) throws java.io.IOException
(non-Javadoc)
get in interface IRemoteCacheServicejava.io.IOExceptionIRemoteCacheService.get(java.lang.String,
java.io.Serializable, long)public java.util.Map getMatching(java.lang.String cacheName,
java.lang.String pattern,
long requesterId)
throws java.io.IOException
IRemoteCacheServicegetMatching in interface IRemoteCacheServicecacheName - pattern - requesterId - java.io.IOExceptionpublic java.util.Map getMultiple(java.lang.String cacheName,
java.util.Set keys,
long requesterId)
IRemoteCacheServicegetMultiple in interface IRemoteCacheServicecacheName - keys - requesterId - public java.util.Set getGroupKeys(java.lang.String cacheName,
java.lang.String groupName)
(non-Javadoc)
getGroupKeys in interface IRemoteCacheServiceIRemoteCacheService.getGroupKeys(java.lang.String,
java.lang.String)protected void propagateEvents(IRemoteCacheService service) throws java.lang.Exception
service - java.lang.ExceptionCopyright © 2002-2013 Apache Software Foundation. All Rights Reserved.