org.hippoecm.hst.servlet.utils
Class BinariesCache

java.lang.Object
  extended by org.hippoecm.hst.servlet.utils.BinariesCache

public class BinariesCache
extends Object

This class provides some convenience methods for caching BinaryPage objects.


Field Summary
static long DEFAULT_MAX_OBJECT_SIZE_BYTES
           
static long DEFAULT_VALIDITY_CHECK_INTERVAL_MILLIS
          Default validity check interval set to 3 minutes
 
Constructor Summary
BinariesCache(HstCache cache)
           
 
Method Summary
 void clearBlockingLock(BinaryPage page)
           
 HstCache getHstCache()
           
 long getMaxObjectSizeBytes()
           
 BinaryPage getPageFromBlockingCache(String resourcePath)
           
 long getValidityCheckIntervalMillis()
           
 boolean isBinaryDataCacheable(BinaryPage page)
           
 boolean isPageStale(BinaryPage page, long lastModified)
           
 boolean mustCheckValidity(BinaryPage page)
           
 void putPage(BinaryPage page)
           
 void removePage(BinaryPage page)
           
 void setHstCache(HstCache cache)
           
 void setMaxObjectSizeBytes(long maxObjectSizeBytes)
           
 void setValidityCheckIntervalMillis(long validityCheckIntervalSeconds)
           
 void updateNextValidityCheckTime(BinaryPage page)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_OBJECT_SIZE_BYTES

public static final long DEFAULT_MAX_OBJECT_SIZE_BYTES
See Also:
Constant Field Values

DEFAULT_VALIDITY_CHECK_INTERVAL_MILLIS

public static final long DEFAULT_VALIDITY_CHECK_INTERVAL_MILLIS
Default validity check interval set to 3 minutes

See Also:
Constant Field Values
Constructor Detail

BinariesCache

public BinariesCache(HstCache cache)
Method Detail

getHstCache

public HstCache getHstCache()

setHstCache

public void setHstCache(HstCache cache)

getValidityCheckIntervalMillis

public long getValidityCheckIntervalMillis()

setValidityCheckIntervalMillis

public void setValidityCheckIntervalMillis(long validityCheckIntervalSeconds)

getMaxObjectSizeBytes

public long getMaxObjectSizeBytes()

setMaxObjectSizeBytes

public void setMaxObjectSizeBytes(long maxObjectSizeBytes)

getPageFromBlockingCache

public BinaryPage getPageFromBlockingCache(String resourcePath)

updateNextValidityCheckTime

public void updateNextValidityCheckTime(BinaryPage page)

putPage

public void putPage(BinaryPage page)

clearBlockingLock

public void clearBlockingLock(BinaryPage page)

removePage

public void removePage(BinaryPage page)

isBinaryDataCacheable

public boolean isBinaryDataCacheable(BinaryPage page)

mustCheckValidity

public boolean mustCheckValidity(BinaryPage page)

isPageStale

public boolean isPageStale(BinaryPage page,
                           long lastModified)


Copyright © 2008-2012 Hippo. All Rights Reserved.