public interface ICache<K,V>
Aside from get(Object) methods are optional.
Implementations may choose to respond "-1" for
methods that return numbers and proiver a no op
for resetCache()
| Modifier and Type | Interface and Description |
|---|---|
static class |
ICache.Base<K,V> |
| Modifier and Type | Method and Description |
|---|---|
V |
get(K key) |
long |
getCacheMisses()
The number of requests that could not be served
|
long |
getCacheRequests()
The number of requests made to the cache
|
long |
getCacheSize()
The size of the cache as number of entries
|
double |
getPercentageMisses()
a fraction < 1 (not a percentage) misses/requests
|
void |
resetCache()
Remove all entries from the cache and reset statistics if possible.
|
long getCacheSize()
long getCacheMisses()
long getCacheRequests()
double getPercentageMisses()
V get(K key)
key - not null key to retrieve valueIllegalStateException - if misoperation of underlying mechanismsvoid resetCache()
Copyright © 2017 51Degrees. All rights reserved.