(
ReferenceEntry<K, V> entry,
K key,
int hash,
V oldValue,
long now,
CacheLoader<? super K, V> loader)
| 2445 | } |
| 2446 | |
| 2447 | V scheduleRefresh( |
| 2448 | ReferenceEntry<K, V> entry, |
| 2449 | K key, |
| 2450 | int hash, |
| 2451 | V oldValue, |
| 2452 | long now, |
| 2453 | CacheLoader<? super K, V> loader) { |
| 2454 | if (map.refreshes() && (now - entry.getWriteTime() > map.refreshNanos) |
| 2455 | && !entry.getValueReference().isLoading()) { |
| 2456 | V newValue = refresh(key, hash, loader, true); |
| 2457 | if (newValue != null) { |
| 2458 | return newValue; |
| 2459 | } |
| 2460 | } |
| 2461 | return oldValue; |
| 2462 | } |
| 2463 | |
| 2464 | /** |
| 2465 | * Refreshes the value associated with {@code key}, unless another thread is already doing so. |
no test coverage detected