WebObjects 5.4.2

com.webobjects.appserver
Class WOSession.PageFragmentCache

java.lang.Object
  extended by java.util.AbstractMap
      extended by java.util.HashMap
          extended by java.util.LinkedHashMap
              extended by com.webobjects.appserver.WOSession.PageFragmentCache
All Implemented Interfaces:
Serializable, Cloneable, Map
Enclosing class:
WOSession

public static class WOSession.PageFragmentCache
extends LinkedHashMap

Used primarily in Ajax style page caching. We remove the eldest entry if the page frament cache size has grown beyone 2X the settting for WOApplication.pageFragmentCacheSize().

Since:
5.4
See Also:
Serialized Form

Constructor Summary
WOSession.PageFragmentCache()
           
 
Method Summary
 boolean cleanPageCache(String fragmentKey)
          Maintenance the page fragement cache.
 WOComponent pageForContextID(String contextID)
          For a given contextID, return the page.
protected  boolean removeEldestEntry(Map.Entry eldest)
           
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

WOSession.PageFragmentCache

public WOSession.PageFragmentCache()
Method Detail

removeEldestEntry

protected boolean removeEldestEntry(Map.Entry eldest)
Overrides:
removeEldestEntry in class LinkedHashMap

pageForContextID

public WOComponent pageForContextID(String contextID)
For a given contextID, return the page.

Parameters:
contextID -
Returns:
WOComponent
Since:
5.4

cleanPageCache

public boolean cleanPageCache(String fragmentKey)
Maintenance the page fragement cache. Remove the oldest entry if we're about to add a new one and that would put us over the cache size. Also, clears out expired pages from the cache when invoked.

Parameters:
fragmentKey - if null, will perform maintenance on the cache
Returns:
boolean true if cache entry successfully cleared
Since:
5.4

Last updated June 2008

Copyright © 2000-2008 Apple Inc.