org.apache.jcs.auxiliary.remote.behavior
Interface IRemoteCacheService

All Superinterfaces:
ICacheService, java.rmi.Remote
All Known Subinterfaces:
IRemoteHttpCacheClient
All Known Implementing Classes:
AbstractRemoteCacheService, RemoteHttpCacheClient, RemoteHttpCacheService, ZombieRemoteCacheService

public interface IRemoteCacheService
extends java.rmi.Remote, ICacheService

Used to retrieve and update the remote cache.


Method Summary
 ICacheElement get(java.lang.String cacheName, java.io.Serializable key, long requesterId)
          Returns a cache bean from the specified cache; or null if the key does not exist.
 java.util.Set getGroupKeys(java.lang.String cacheName, java.lang.String groupName)
           
 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.
 void remove(java.lang.String cacheName, java.io.Serializable key, long requesterId)
          Removes the given key from the specified cache.
 void removeAll(java.lang.String cacheName, long requesterId)
          Remove all keys from the specified cache.
 void update(ICacheElement item, long requesterId)
          Puts a cache item to the cache.
 
Methods inherited from interface org.apache.jcs.engine.behavior.ICacheService
dispose, get, getMatching, getMultiple, release, remove, removeAll, update
 

Method Detail

update

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

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

remove

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

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

removeAll

void removeAll(java.lang.String cacheName,
               long requesterId)
               throws java.io.IOException
Remove all keys from the specified cache.

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

get

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

Adding the requestor id, allows the cache to determine the sournce of the get.

Parameters:
cacheName -
key -
requesterId -
Returns:
ICacheElement
Throws:
java.io.IOException

getMultiple

java.util.Map getMultiple(java.lang.String cacheName,
                          java.util.Set keys,
                          long requesterId)
                          throws java.io.IOException
Gets multiple items from the cache based on the given set of keys.

Parameters:
cacheName -
keys -
requesterId -
Returns:
a map of Serializable key to ICacheElement element, or an empty map if there is no data in cache for any of these keys
Throws:
java.io.IOException

getMatching

java.util.Map getMatching(java.lang.String cacheName,
                          java.lang.String pattern,
                          long requesterId)
                          throws java.io.IOException
Gets multiple items from the cache matching the pattern.

Parameters:
cacheName -
pattern -
requesterId -
Returns:
a map of Serializable key to ICacheElement element, or an empty map if there is no data in cache matching the pattern.
Throws:
java.io.IOException

getGroupKeys

java.util.Set getGroupKeys(java.lang.String cacheName,
                           java.lang.String groupName)
                           throws java.rmi.RemoteException,
                                  java.io.IOException
Parameters:
cacheName -
groupName -
Returns:
A Set of keys
Throws:
java.rmi.RemoteException
java.io.IOException


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