T - the type of keys.
D - the type of data.
public class ImageManagerSourceRam<T,D> extends AbstractImageManagerWithMemoryCachePlus<T ,D> implements PriorityImageManager <T ,D ,Integer >
desiredCacheSize, memoryCache| Constructor and Description |
|---|
ImageManagerSourceRam(int nThreads, int cacheSize, ImageSource
Create an ImageSource based ImageManager implementation that does in-RAM caching.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelJobs()
|
void |
clearCache()
Clear the underlying cache.
|
void |
destroy()
|
D |
get(T thing)
|
D |
get(T thing, Integer
|
ImageSource |
getImageSource()
Get the ImageSource object
|
void |
setCacheHintMinimumSize(int size)
|
void |
setIgnorePendingProductions()
|
void |
stopRunning()
Stop producing new elements.
|
void |
unchache(T thing)
Ensure that the denoted thing will be removed from the cache.
|
void |
willNeed(T thing)
|
addLoadListener, notifyListeners, notifyListenersFail, removeLoadListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLoadListener, removeLoadListenerpublic ImageManagerSourceRam(int nThreads,
int cacheSize,
ImageSource<T,D> source)
nThreads - the number of threads to use for providing images.
cacheSize - the number of data elements to store in the RAM cache.
source - the ImageSource to use for creation of unknown requests.
public ImageSource<T ,D> getImageSource()
public void cancelJobs()
public void willNeed(T thing)
public void setIgnorePendingProductions()
public void destroy()
public void stopRunning()
public void unchache(T thing)
thing - the thing to remove.
public void clearCache()
public void setCacheHintMinimumSize(int size)