Skip to content

Commit

Permalink
reduced from concrete type to interface for cache member
Browse files Browse the repository at this point in the history
  • Loading branch information
jdereg committed Jun 23, 2024
1 parent 4a9cddd commit 4ddf44b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/cedarsoftware/util/LRUCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -41,7 +42,7 @@ public class LRUCache<K, V> extends AbstractMap<K, V> implements Map<K, V> {
private static final ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
private static final long DELAY = 10; // 10ms delay
private final int capacity;
private final ConcurrentHashMap<K, Node<K, V>> cache;
private final ConcurrentMap<K, Node<K, V>> cache;
private volatile boolean cleanupScheduled = false;

private static class Node<K, V> {
Expand Down

0 comments on commit 4ddf44b

Please sign in to comment.