public class CacheStatsAtomic<Key,Value> extends CacheWrapper<Key,Value> implements CacheStats<Key,Value>
| Constructor and Description |
|---|
CacheStatsAtomic(Cache<Key,Value> cache) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
Value |
get(Key key)
Get from cache - or return null.
|
long |
getCacheEjects() |
long |
getCacheEntries() |
long |
getCacheHits() |
long |
getCacheMisses() |
Value |
put(Key key,
Value t)
Insert into from cache and return old value (or null if none)
|
boolean |
remove(Key key)
Remove from cache - return true if key referenced an entry
|
void |
setDropHandler(ActionKeyValue<Key,Value> dropHandler)
Register a callback - called when an object is dropped from the cache (optional operation)
|
containsKey, isEmpty, keys, sizeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontainsKey, isEmpty, keys, sizepublic Value get(Key key)
Cachepublic Value put(Key key, Value t)
Cachepublic boolean remove(Key key)
Cachepublic void clear()
public void setDropHandler(ActionKeyValue<Key,Value> dropHandler)
CachesetDropHandler in interface Cache<Key,Value>setDropHandler in class CacheWrapper<Key,Value>public final long getCacheEntries()
getCacheEntries in interface CacheStats<Key,Value>public final long getCacheHits()
getCacheHits in interface CacheStats<Key,Value>public final long getCacheMisses()
getCacheMisses in interface CacheStats<Key,Value>public final long getCacheEjects()
getCacheEjects in interface CacheStats<Key,Value>Licenced under the Apache License, Version 2.0