Clears all expired cache entries; also clear any cache entries where the SoftReference in the CacheLine object has been cleared by the gc
()
| 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(); |
no test coverage detected