public class BinariesCache extends Object
BinaryPage
objects.Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_MAX_OBJECT_SIZE_BYTES |
static long |
DEFAULT_VALIDITY_CHECK_INTERVAL_MILLIS
Default validity check interval set to 3 minutes
|
Constructor and Description |
---|
BinariesCache(HstCache cache) |
Modifier and Type | Method and Description |
---|---|
void |
clearBlockingLock(BinaryPage.CacheKey cacheKey)
net.sf.ehcache.constructs.blocking.BlockingCache#get(Object) never releases its acquired lock
when the method throws an exception or returns null
until put(new Element(key, null)); to release the lock acquired. |
void |
clearBlockingLock(BinaryPage page)
Deprecated.
deprecated since 2.26.00 Use
#clearBlockingLock(CacheKey) instead. |
HstCache |
getHstCache() |
long |
getMaxObjectSizeBytes() |
BinaryPage |
getPageFromBlockingCache(BinaryPage.CacheKey cacheKey) |
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) |
public static final long DEFAULT_MAX_OBJECT_SIZE_BYTES
public static final long DEFAULT_VALIDITY_CHECK_INTERVAL_MILLIS
public BinariesCache(HstCache cache)
public HstCache getHstCache()
public void setHstCache(HstCache cache)
public long getValidityCheckIntervalMillis()
public void setValidityCheckIntervalMillis(long validityCheckIntervalSeconds)
public long getMaxObjectSizeBytes()
public void setMaxObjectSizeBytes(long maxObjectSizeBytes)
public BinaryPage getPageFromBlockingCache(BinaryPage.CacheKey cacheKey)
public void updateNextValidityCheckTime(BinaryPage page)
public void putPage(BinaryPage page)
@Deprecated public void clearBlockingLock(BinaryPage page)
#clearBlockingLock(CacheKey)
instead.page
- public void clearBlockingLock(BinaryPage.CacheKey cacheKey)
net.sf.ehcache.constructs.blocking.BlockingCache#get(Object)
never releases its acquired lock
when the method throws an exception or returns null
until put(new Element(key, null));
to release the lock acquired.
Therefore, the caller code is responsible for calling this method to release the acquired lock.cacheKey
- public void removePage(BinaryPage page)
public boolean isBinaryDataCacheable(BinaryPage page)
public boolean mustCheckValidity(BinaryPage page)
public boolean isPageStale(BinaryPage page, long lastModified)
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.