com.cafesoft.cams.access
Interface AccessControlCheckCache


public interface AccessControlCheckCache

Caches AccessControlCheck instances. Caching of AccessControlChecks may be used to improve Cams system performance or record the state of various requests for analysis.

Since:
12/6/02

Method Summary
 AccessControlCheck add(ResourceRequest resourceRequest, AccessControlResponse response)
          Adds an AccessControlCheck to the cache.
 void clear()
          Clears the cache.
 AccessControlCheck get(ResourceRequest resReq)
          Returns the AccessControlCheck that matches a ResourceRequest.
 int getMaxSize()
          Returns the maximum size of the cache.
 int getSize()
          Returns the size of the cache.
 void remove(AccessControlCheck acchk)
          Removes an AccessControlCheck from the cache.
 Iterator values()
          Returns all cached AccessControlCheck values.
 

Method Detail

add

AccessControlCheck add(ResourceRequest resourceRequest,
                       AccessControlResponse response)
                       throws AccessControlCheckException
Adds an AccessControlCheck to the cache.

Parameters:
resourceRequest - the resource request for which the response will be cached
response - the response to cache
Returns:
a cached AccessControlCheck if its ResourceRequest matches the newly cached AccessControlCheck. If an AccessControlCheck must be removed from the cache to make room for the new one, the removed AccessControlCheck is returned. Otherwise, return null.
Throws:
AccessControlCheckException

remove

void remove(AccessControlCheck acchk)
Removes an AccessControlCheck from the cache.

Parameters:
acchk - the AccessControlCheck to be removed.

get

AccessControlCheck get(ResourceRequest resReq)
Returns the AccessControlCheck that matches a ResourceRequest.

Parameters:
resReq - the ResourceRequest.
Returns:
the cached AccessControlCheck if the ResourceRequest's resource identifer matches (exactly) and one or more actions match. Return null if no matching AccessControlCheck is cached.

values

Iterator values()
Returns all cached AccessControlCheck values.

Returns:
an Iterator providing access to all cached AccessControlChecks.

getSize

int getSize()
Returns the size of the cache.

Returns:
the current number of AccessControlCheck instances cached.

getMaxSize

int getMaxSize()
Returns the maximum size of the cache.

Returns:
the maximum number of AccessControlCheck instances that can be cached. If no hard-coded upper limit, -1 is returned.

clear

void clear()
Clears the cache.

All cached AccessControlChecks are cleared.



Generated on 10:38:35 AM April 14, 2011, © 1996-2010 Cafésoft LLC. All rights reserved.