org.apache.jcs.engine.behavior
Interface ICacheService

All Known Subinterfaces:
IHSQLCacheService, ILateralCacheService, IRemoteCacheService
All Known Implementing Classes:
LateralTCPService, RemoteCacheServer, ZombieCacheService, ZombieLateralCacheService, ZombieRemoteCacheService

public interface ICacheService

Used to retrieve and update the cache.

Note: server which implements this interface provides a local cache service, whereas server which implements IRmiCacheService provides a remote cache service.


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.
 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)
          Puts a cache item to the cache.
 

Method Detail

update

public void update(ICacheElement item)
            throws ObjectExistsException,
                   java.io.IOException
Puts a cache item to the cache.

Parameters:
item -
Throws:
ObjectExistsException
java.io.IOException

get

public ICacheElement get(java.lang.String cacheName,
                         java.io.Serializable key)
                  throws ObjectNotFoundException,
                         java.io.IOException
Returns a cache bean from the specified cache; or null if the key does not exist.

Parameters:
cacheName -
key -
Returns:
Throws:
ObjectNotFoundException
java.io.IOException

remove

public void remove(java.lang.String cacheName,
                   java.io.Serializable key)
            throws java.io.IOException
Removes the given key from the specified cache.

Parameters:
cacheName -
key -
Throws:
java.io.IOException

removeAll

public void removeAll(java.lang.String cacheName)
               throws java.io.IOException
Remove all keys from the sepcified cache.

Parameters:
cacheName -
Throws:
java.io.IOException

dispose

public void dispose(java.lang.String cacheName)
             throws java.io.IOException
Frees the specified cache.

Parameters:
cacheName -
Throws:
java.io.IOException

release

public void release()
             throws java.io.IOException
Frees all caches.

Throws:
java.io.IOException


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