com.hp.hpl.deli
Class ProfileCache

java.lang.Object
  extended bycom.hp.hpl.deli.ProfileCache

class ProfileCache
extends java.lang.Object

This class provides a way of caching profiles. When it retrieves a CC/PP profile, it resolves it to the internal CC/PP data structure and caches it. It indexes these cached profiles using the profile URL.

Author:
Mark H. Butler (marbut@hplb.hpl.hp.com)

Field Summary
private  java.util.Map cache
           
 
Constructor Summary
protected ProfileCache()
          The constructor creates the map used to resolve profile URLs onto cached profile objects.
 
Method Summary
protected  Profile get(java.lang.String profileURL)
          This method retrieves a profile.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

private java.util.Map cache
Constructor Detail

ProfileCache

protected ProfileCache()
The constructor creates the map used to resolve profile URLs onto cached profile objects.

Method Detail

get

protected Profile get(java.lang.String profileURL)
               throws java.lang.Exception
This method retrieves a profile. It checks first to see if the profile is already in the cache. If it is then it returns the cached version. If not it checks to see if the cache is full. If it is it removes one profile from the cache. It then retrieves the profile and stores it in the cache.

Parameters:
profileURL - The URL of the profile to be retrieved.
Returns:
The resolved profile.
Throws:
java.lang.Exception