org.apache.jcs.engine
Class ZombieCacheService

java.lang.Object
  extended by org.apache.jcs.engine.ZombieCacheService
All Implemented Interfaces:
ICacheService, IZombie
Direct Known Subclasses:
ZombieLateralCacheService, ZombieRemoteCacheService

public class ZombieCacheService
extends java.lang.Object
implements ICacheService, IZombie

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


Constructor Summary
ZombieCacheService()
           
 
Method Summary
 void dispose(java.lang.String cacheName)
          Frees the specified cache.
 ICacheElement get(java.lang.String cacheName, java.io.Serializable key)
          Returns a cache bean from the specified cache; or null if the key does not exist.
 java.io.Serializable get(java.lang.String cacheName, java.io.Serializable key, boolean container)
          Logs the get to debug, but always balks.
 java.util.Map getMatching(java.lang.String cacheName, java.lang.String pattern)
          Returns an empty map.
 java.util.Map getMultiple(java.lang.String cacheName, java.util.Set keys)
          Returns an empty map.
 void put(ICacheElement item)
           
 void release()
          Frees all caches.
 void remove(java.lang.String cacheName, java.io.Serializable key)
          Removes the given key from the specified cache.
 void removeAll(java.lang.String cacheName)
          Remove all keys from the sepcified cache.
 void update(ICacheElement 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 item)
Parameters:
item -

update

public void update(ICacheElement item)
Does nothing.

Specified by:
update in interface ICacheService
Parameters:
item -

get

public ICacheElement get(java.lang.String cacheName,
                         java.io.Serializable 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
Parameters:
cacheName -
key -
Returns:
null. zombies have no internal data

getMultiple

public java.util.Map getMultiple(java.lang.String cacheName,
                                 java.util.Set keys)
Returns an empty map. Zombies have no internal data.

Specified by:
getMultiple in interface ICacheService
Parameters:
cacheName -
keys -
Returns:
Collections.EMPTY_MAP

getMatching

public java.util.Map getMatching(java.lang.String cacheName,
                                 java.lang.String pattern)
Returns an empty map. Zombies have no internal data.

Specified by:
getMatching in interface ICacheService
Parameters:
cacheName -
pattern -
Returns:
Collections.EMPTY_MAP

get

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

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

remove

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

Specified by:
remove in interface ICacheService
Parameters:
cacheName -
key -

removeAll

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

Specified by:
removeAll in interface ICacheService
Parameters:
cacheName -

dispose

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

Specified by:
dispose in interface ICacheService
Parameters:
cacheName -

release

public void release()
Frees all caches.

Specified by:
release in interface ICacheService


Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.