MCPcopy Create free account
hub / github.com/banq/jdonframework / clearExpired

Method clearExpired

src/main/java/com/jdon/cache/UtilCache.java:481–491  ·  view source on GitHub ↗

Clears all expired cache entries; also clear any cache entries where the SoftReference in the CacheLine object has been cleared by the gc

()

Source from the content-addressed store, hash-verified

479 * SoftReference in the CacheLine object has been cleared by the gc
480 */
481 public void clearExpired() {
482 Iterator keys = cacheLineTable.keySet().iterator();
483
484 while (keys.hasNext()) {
485 Object key = keys.next();
486
487 if (hasExpired(key)) {
488 removeObject(key);
489 }
490 }
491 }
492
493 public void stop() {
494 clear();

Callers 1

runMethod · 0.95

Calls 6

hasExpiredMethod · 0.95
removeObjectMethod · 0.95
iteratorMethod · 0.80
keySetMethod · 0.65
hasNextMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected