Method | Hit | Miss | Put | Update | Removal | Expiration | Eviction | Notes |
clear | No | No | No | No | No | No | No | A bulk remove with no impact on statistics. |
containsKey | No | No | No | No | No | No | No | Generates no hit or miss since the value isn't accessed. |
forEach | Yes | No | No | No | No | Yes | No | Java 8. Will hit each entry once. |
get | Yes | Yes | No | No | No | Yes | No | Hit when the entry is found, miss otherwise. |
getAll | Yes | Yes | No | No | No | Yes | No | Like get but calculated per entry. |
getAndPut | Yes | Yes | Yes | Yes | No | Yes | Yes | JSR107 specific. Hit and update when the entry is found, miss otherwise. Always put. |
getAndRemove | Yes | Yes | No | No | Yes | Yes | No | JSR107 specific. Hit and remove when the entry is found, miss otherwise. |
getAndReplace | Yes | Yes | Yes | Yes | No | Yes | Yes | JSR107 specific. Hit, put and update when the entry is found, miss otherwise. |
invoke | Yes | Yes | Yes | Yes | Yes | Yes | Yes | JSR107 specific. Depends on how the EntryProcessor modifies the MutableEntry. |
invokeAll | Yes | Yes | Yes | Yes | Yes | Yes | Yes | JSR107 specific. Like invoke but calculated per entry. |
iterator | Yes | No | No | No | Yes | Yes | No | Will hit each iterated entry and count a removal on Iterator.remove. |
loadAll | No | No | No | No | No | No | No | JSR107 specific. Background loading that has no impact on statistics. |
put | No | No | Yes | Yes | No | No | Yes | Put an entry whether it already existed or not. |
putAll | No | No | Yes | Yes | No | No | Yes | Like put but calculated per entry. |
putIfAbsent | Yes | Yes | Yes | No | No | Yes | Yes | Will hit if the entry exists. Will put and miss if it doesn't. |
remove(K) | No | No | No | No | Yes | Yes | No | Count a removal if the entry exists. |
remove(K,V) | Yes | Yes | No | No | Yes | Yes | No | Hit if the key is found. Miss otherwise. |
removeAll | No | No | No | No | Yes | No | No | One removal per entry in the cache. |
removeAll(keys) | No | No | No | No | Yes | No | No | Like remove but calculated per entry. |
replace(K,V) | Yes | Yes | Yes | Yes | No | Yes | Yes | Hit, put and update if the entry exists. Miss otherwise. |
replace(K,O,N) | Yes | Yes | Yes | Yes | No | Yes | Yes | Hit if the entry exists. |
spliterator | Yes | No | No | No | No | Yes | No | Java 8. Will hit for each iterated entry. |