public class ImageCacheStatistics extends Object implements ImageCacheListener
Constructor and Description |
---|
ImageCacheStatistics(boolean detailed)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cacheHitImage(ImageKey key)
An Image was found in the cache
|
void |
cacheHitImageInfo(String uri)
An ImageInfo was found in the cache
|
void |
cacheMissImage(ImageKey key)
An Image was not in the cache
|
void |
cacheMissImageInfo(String uri)
An ImageInfo was not in the cache
|
Map |
getImageCacheHitMap()
Returns a Map<ImageKey, Integer> with the number of cache hits.
|
int |
getImageCacheHits()
Returns the number of cache hits for Image instances.
|
int |
getImageCacheMisses()
Returns the number of cache misses for Image instances.
|
Map |
getImageCacheMissMap()
Returns a Map<ImageKey, Integer> with the number of cache misses.
|
int |
getImageInfoCacheHits()
Returns the number of cache hits for ImageInfo instances.
|
int |
getImageInfoCacheMisses()
Returns the number of cache misses for ImageInfo instances.
|
int |
getInvalidHits()
Returns the number of times an invalid URI is tried.
|
void |
invalidHit(String uri)
An URi previously identified as invalid was requested again
|
void |
reset()
Reset the gathered statistics information.
|
public ImageCacheStatistics(boolean detailed)
detailed
- true if the cache hits/misses for each Image instance should be recorded.public void reset()
public void invalidHit(String uri)
invalidHit
in interface ImageCacheListener
uri
- the invalid URIpublic void cacheHitImageInfo(String uri)
cacheHitImageInfo
in interface ImageCacheListener
uri
- the image's URIpublic void cacheMissImageInfo(String uri)
cacheMissImageInfo
in interface ImageCacheListener
uri
- the image's URIpublic void cacheHitImage(ImageKey key)
cacheHitImage
in interface ImageCacheListener
key
- the image keypublic void cacheMissImage(ImageKey key)
cacheMissImage
in interface ImageCacheListener
key
- the image keypublic int getInvalidHits()
public int getImageInfoCacheHits()
public int getImageInfoCacheMisses()
public int getImageCacheHits()
public int getImageCacheMisses()
public Map getImageCacheHitMap()
public Map getImageCacheMissMap()
Copyright © 2020 Apache Software Foundation. All rights reserved.