public class ThumbCache
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
ThumbCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToCache(Pic pic,
Thumbnail tn)
Add a thumbnail to the cache
|
void |
batchBuildCache()
Read each pic with the sole purpose of creating a cache entry for it.
|
void |
deleteCache()
Delete the thumb cache.
|
int |
getCachedHeight()
Fetch the size of the thumbnails that we are managing
|
int |
getMosaicSet() |
int |
getMosaicSuperCacheMaxSize() |
int |
getPicProcessing()
Return which pic number we are building during batchBuildCache.
|
Thumbnail |
getThumbNail(Pic pic,
int height)
Get a cached Thumbnail.
|
boolean |
isBuildThumbCache()
Are we wanting to build the thumb cache?
|
void |
release()
Release any cache buffers we are holding
|
void |
setBuildThumbCache(boolean buildThumbCache)
Build the thumb cache.
|
void |
setMosaicSet(int mosaicSet) |
void |
setMosaicSuperCacheMaxSize(int mosaicSuperCacheMaxSize) |
void |
setPicMan(PicManFacade pmf)
Set the reference to the main API
|
void |
setupCache(java.lang.String cacheDir,
int cacheHeight,
int maxEntriesPerCache)
Initialize the thumbCache
|
public void setPicMan(PicManFacade pmf)
pmf - The PicManFacadepublic boolean isBuildThumbCache()
public int getCachedHeight()
public int getMosaicSet()
public void setMosaicSet(int mosaicSet)
mosaicSet - the mosaicSet to setpublic int getMosaicSuperCacheMaxSize()
public void release()
public void setMosaicSuperCacheMaxSize(int mosaicSuperCacheMaxSize)
mosaicSuperCacheMaxSize - the mosaicSuperCacheMaxSize to setpublic void setBuildThumbCache(boolean buildThumbCache)
buildThumbCache - the buildThumbCache to setpublic Thumbnail getThumbNail(Pic pic, int height)
pic - The Pic who's Thumbnail we wantheight - The height of the thumbnail we wantpublic void addToCache(Pic pic, Thumbnail tn)
pic - The pic that is being cachedtn - The thumb to cachepublic void setupCache(java.lang.String cacheDir,
int cacheHeight,
int maxEntriesPerCache)
public void deleteCache()
public void batchBuildCache()
throws java.lang.Exception
java.lang.Exceptionpublic int getPicProcessing()