public class ImageCacheStatistics extends java.lang.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(java.lang.String uri)
An ImageInfo was found in the cache
|
void |
cacheMissImage(ImageKey key)
An Image was not in the cache
|
void |
cacheMissImageInfo(java.lang.String uri)
An ImageInfo was not in the cache
|
java.util.Map |
getImageCacheHitMap()
Returns a Map
|
int |
getImageCacheHits()
Returns the number of cache hits for Image instances.
|
int |
getImageCacheMisses()
Returns the number of cache misses for Image instances.
|
java.util.Map |
getImageCacheMissMap()
Returns a Map
|
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(java.lang.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(java.lang.String uri)
invalidHit
in interface ImageCacheListener
uri
- the invalid URIpublic void cacheHitImageInfo(java.lang.String uri)
cacheHitImageInfo
in interface ImageCacheListener
uri
- the image's URIpublic void cacheMissImageInfo(java.lang.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 java.util.Map getImageCacheHitMap()
public java.util.Map getImageCacheMissMap()
Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.