com.wiley.posa3.caching
Interface Cache

All Known Implementing Classes:
CacheImpl

public interface Cache

Cache is the base interface for any type of caching implementation. It provides an API that allows acquisition and release of these resources.

Version:
1.0
Author:
Michael Kircher, Prashant Jain

Method Summary
 Resource acquire(Identity id)
          Acquire the resource from the cache corresponding to id.
 void release(Resource resource)
          Put the released resource into the cache so that it can be acquired later.
 

Method Detail

release

public void release(Resource resource)
Put the released resource into the cache so that it can be acquired later.

Parameters:
resource - the resource that has been released and is to be put into the cache

acquire

public Resource acquire(Identity id)
                 throws ResourceNotFound
Acquire the resource from the cache corresponding to id.

Parameters:
id - the identity of the resource that needs to be acquired.
Returns:
Resource corresponding to the Identity that should be in the cache.
Throws:
ResourceNotFound - is thrown if the resource corresponding to Identity was not found in the cache


Copyright 2004 John Wiley and Sons. All Rights Reserved.