org.enhydra.shark.api.internal.caching
Interface ResourceCache

All Superinterfaces:
ObjectCache

public interface ResourceCache
extends ObjectCache

This interface presents cache that stores resources.

Author:
Vladimir Puskas, Tanja Jovanovic

Method Summary
 void add(java.lang.String username, WfResourceInternal res)
          Adds resource to the resource cache.
 WfResourceInternal get(java.lang.String username)
          Returns the resource from the resource cache with username username.
 void remove(java.lang.String username)
          Removes resource from the resource cache.
 
Methods inherited from interface org.enhydra.shark.api.internal.caching.ObjectCache
configure, getAll, getSize, howManyEntries, setSize
 

Method Detail

add

public void add(java.lang.String username,
                WfResourceInternal res)
         throws java.lang.Exception
Adds resource to the resource cache.

Parameters:
username - username of the resource.
res - WfResourceInternal object to be added to the resource cache.
Throws:
java.lang.Exception - Thrown if an error occurs.

remove

public void remove(java.lang.String username)
            throws java.lang.Exception
Removes resource from the resource cache.

Parameters:
username - username of the resource.
Throws:
java.lang.Exception - Thrown if an error occurs.

get

public WfResourceInternal get(java.lang.String username)
                       throws java.lang.Exception
Returns the resource from the resource cache with username username.

Parameters:
username - username of the resource.
Returns:
Resource from the cache with the username username if exists, otherwise null.
Throws:
java.lang.Exception - Thrown if an error occurs.