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, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose, get, getMatching, getMultiple, release, remove, removeAll, update
public ZombieRemoteCacheService()
public ZombieRemoteCacheService(int maxQueueSize)
maxQueueSize
- public int getQueueSize()
public void update(ICacheElement item, long listenerId)
(non-Javadoc)
update
in interface IRemoteCacheService
IRemoteCacheService.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 IRemoteCacheService
IRemoteCacheService.remove(java.lang.String,
java.io.Serializable, long)
public void removeAll(java.lang.String cacheName, long listenerId)
(non-Javadoc)
removeAll
in interface IRemoteCacheService
IRemoteCacheService.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 IRemoteCacheService
java.io.IOException
IRemoteCacheService.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
IRemoteCacheService
getMatching
in interface IRemoteCacheService
cacheName
- pattern
- requesterId
- java.io.IOException
public java.util.Map getMultiple(java.lang.String cacheName, java.util.Set keys, long requesterId)
IRemoteCacheService
getMultiple
in interface IRemoteCacheService
cacheName
- keys
- requesterId
- public java.util.Set getGroupKeys(java.lang.String cacheName, java.lang.String groupName)
(non-Javadoc)
getGroupKeys
in interface IRemoteCacheService
IRemoteCacheService.getGroupKeys(java.lang.String,
java.lang.String)
protected void propagateEvents(IRemoteCacheService service) throws java.lang.Exception
service
- java.lang.Exception
Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.