org.apache.jcs.engine
Class ZombieCacheService<K extends Serializable,V extends Serializable>

java.lang.Object
  extended by org.apache.jcs.engine.ZombieCacheService<K,V>
All Implemented Interfaces:
ICacheService<K,V>, IZombie
Direct Known Subclasses:
ZombieCacheServiceNonLocal

public class ZombieCacheService<K extends Serializable,V extends Serializable>
extends Object
implements ICacheService<K,V>, IZombie

Zombie adapter for any cache service. Balks at every call.


Constructor Summary
ZombieCacheService()
           
 
Method Summary
 void dispose(String cacheName)
          Frees the specified cache.
 ICacheElement<K,V> get(String cacheName, K key)
          Returns a cache bean from the specified cache; or null if the key does not exist.
 Serializable get(String cacheName, K key, boolean container)
          Logs the get to debug, but always balks.
 Map<K,ICacheElement<K,V>> getMatching(String cacheName, String pattern)
          Returns an empty map.
 Map<K,ICacheElement<K,V>> getMultiple(String cacheName, Set<K> keys)
          Returns an empty map.
 void put(ICacheElement<K,V> item)
           
 void release()
          Frees all caches.
 void remove(String cacheName, K key)
          Removes the given key from the specified cache.
 void removeAll(String cacheName)
          Remove all keys from the specified cache.
 void update(ICacheElement<K,V> item)
          Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZombieCacheService

public ZombieCacheService()
Method Detail

put

public void put(ICacheElement<K,V> item)
Parameters:
item -

update

public void update(ICacheElement<K,V> item)
Does nothing.

Specified by:
update in interface ICacheService<K extends Serializable,V extends Serializable>
Parameters:
item -

get

public ICacheElement<K,V> get(String cacheName,
                              K key)
Description copied from interface: ICacheService
Returns a cache bean from the specified cache; or null if the key does not exist.

Specified by:
get in interface ICacheService<K extends Serializable,V extends Serializable>
Parameters:
cacheName -
key -
Returns:
null. zombies have no internal data

getMultiple

public Map<K,ICacheElement<K,V>> getMultiple(String cacheName,
                                             Set<K> keys)
Returns an empty map. Zombies have no internal data.

Specified by:
getMultiple in interface ICacheService<K extends Serializable,V extends Serializable>
Parameters:
cacheName -
keys -
Returns:
Collections.EMPTY_MAP

getMatching

public Map<K,ICacheElement<K,V>> getMatching(String cacheName,
                                             String pattern)
Returns an empty map. Zombies have no internal data.

Specified by:
getMatching in interface ICacheService<K extends Serializable,V extends Serializable>
Parameters:
cacheName -
pattern -
Returns:
Collections.EMPTY_MAP

get

public Serializable get(String cacheName,
                        K key,
                        boolean container)
Logs the get to debug, but always balks.

Parameters:
cacheName -
key -
container -
Returns:
null always

remove

public void remove(String cacheName,
                   K key)
Description copied from interface: ICacheService
Removes the given key from the specified cache.

Specified by:
remove in interface ICacheService<K extends Serializable,V extends Serializable>
Parameters:
cacheName -
key -

removeAll

public void removeAll(String cacheName)
Description copied from interface: ICacheService
Remove all keys from the specified cache.

Specified by:
removeAll in interface ICacheService<K extends Serializable,V extends Serializable>
Parameters:
cacheName -

dispose

public void dispose(String cacheName)
Description copied from interface: ICacheService
Frees the specified cache.

Specified by:
dispose in interface ICacheService<K extends Serializable,V extends Serializable>
Parameters:
cacheName -

release

public void release()
Frees all caches.

Specified by:
release in interface ICacheService<K extends Serializable,V extends Serializable>


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.