(ReferenceEntry<K, V> entry, K key, int hash, V oldValue, long now, CacheLoader<? super K, V> loader)
| 2436 | } |
| 2437 | |
| 2438 | V scheduleRefresh(ReferenceEntry<K, V> entry, K key, int hash, V oldValue, long now, CacheLoader<? super K, V> loader) { |
| 2439 | if (map.refreshes() |
| 2440 | && (now - entry.getWriteTime() > map.refreshNanos) |
| 2441 | && !entry.getValueReference().isLoading()) { |
| 2442 | V newValue = refresh(key, hash, loader, true); |
| 2443 | if (newValue != null) { |
| 2444 | return newValue; |
| 2445 | } |
| 2446 | } |
| 2447 | return oldValue; |
| 2448 | } |
| 2449 | |
| 2450 | /** |
| 2451 | * Refreshes the value associated with {@code key}, unless another thread is already doing so. |
no test coverage detected