Package gov.nasa.worldwind.render
Class RenderResourceCache
- java.lang.Object
-
- gov.nasa.worldwind.util.LruMemoryCache<java.lang.Object,RenderResource>
-
- gov.nasa.worldwind.render.RenderResourceCache
-
- All Implemented Interfaces:
android.os.Handler.Callback
,Retriever.Callback<ImageSource,ImageOptions,android.graphics.Bitmap>
public class RenderResourceCache extends LruMemoryCache<java.lang.Object,RenderResource> implements Retriever.Callback<ImageSource,ImageOptions,android.graphics.Bitmap>, android.os.Handler.Callback
-
-
Constructor Summary
Constructors Constructor Description RenderResourceCache(int capacity)
RenderResourceCache(int capacity, int lowWater)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
android.content.res.Resources
getResources()
boolean
handleMessage(android.os.Message msg)
static int
recommendedCapacity()
void
releaseEvictedResources(DrawContext dc)
void
retrievalFailed(Retriever<ImageSource,ImageOptions,android.graphics.Bitmap> retriever, ImageSource key, java.lang.Throwable ex)
void
retrievalRejected(Retriever<ImageSource,ImageOptions,android.graphics.Bitmap> retriever, ImageSource key)
void
retrievalSucceeded(Retriever<ImageSource,ImageOptions,android.graphics.Bitmap> retriever, ImageSource key, ImageOptions options, android.graphics.Bitmap value)
Texture
retrieveTexture(ImageSource imageSource, ImageOptions options)
void
setResources(android.content.res.Resources res)
-
Methods inherited from class gov.nasa.worldwind.util.LruMemoryCache
containsKey, get, getCapacity, getEntryCount, getUsedCapacity, put, remove, trimToAge
-
-
-
-
Method Detail
-
recommendedCapacity
public static int recommendedCapacity()
-
getResources
public android.content.res.Resources getResources()
-
setResources
public void setResources(android.content.res.Resources res)
-
clear
public void clear()
- Overrides:
clear
in classLruMemoryCache<java.lang.Object,RenderResource>
-
releaseEvictedResources
public void releaseEvictedResources(DrawContext dc)
-
retrieveTexture
public Texture retrieveTexture(ImageSource imageSource, ImageOptions options)
-
retrievalSucceeded
public void retrievalSucceeded(Retriever<ImageSource,ImageOptions,android.graphics.Bitmap> retriever, ImageSource key, ImageOptions options, android.graphics.Bitmap value)
- Specified by:
retrievalSucceeded
in interfaceRetriever.Callback<ImageSource,ImageOptions,android.graphics.Bitmap>
-
retrievalFailed
public void retrievalFailed(Retriever<ImageSource,ImageOptions,android.graphics.Bitmap> retriever, ImageSource key, java.lang.Throwable ex)
- Specified by:
retrievalFailed
in interfaceRetriever.Callback<ImageSource,ImageOptions,android.graphics.Bitmap>
-
retrievalRejected
public void retrievalRejected(Retriever<ImageSource,ImageOptions,android.graphics.Bitmap> retriever, ImageSource key)
- Specified by:
retrievalRejected
in interfaceRetriever.Callback<ImageSource,ImageOptions,android.graphics.Bitmap>
-
handleMessage
public boolean handleMessage(android.os.Message msg)
- Specified by:
handleMessage
in interfaceandroid.os.Handler.Callback
-
-