MCPcopy Index your code
hub / github.com/clojure/clojure / clearCache

Method clearCache

src/jvm/clojure/lang/Util.java:205–218  ·  view source on GitHub ↗
(ReferenceQueue rq, ConcurrentHashMap<K, Reference<V>> cache)

Source from the content-addressed store, hash-verified

203}
204
205static public <K,V> void clearCache(ReferenceQueue rq, ConcurrentHashMap<K, Reference<V>> cache){
206 //cleanup any dead entries
207 if(rq.poll() != null)
208 {
209 while(rq.poll() != null)
210 ;
211 for(Map.Entry<K, Reference<V>> e : cache.entrySet())
212 {
213 Reference<V> val = e.getValue();
214 if(val != null && val.get() == null)
215 cache.remove(e.getKey(), val);
216 }
217 }
218}
219
220static public RuntimeException runtimeException(String s){
221 return new RuntimeException(s);

Callers 2

internMethod · 0.95
defineClassMethod · 0.95

Calls 5

getMethod · 0.65
removeMethod · 0.65
entrySetMethod · 0.45
getValueMethod · 0.45
getKeyMethod · 0.45

Tested by

no test coverage detected