Turning cache fairness off.

This commit is contained in:
Harrison Deng 2020-04-28 17:40:28 -05:00
parent 9883a98aa0
commit 7311327d8d

View File

@ -9,7 +9,7 @@ public class Cache<K, V> {
private final int maxSize;
private final ConcurrentHashMap<K, CacheValue<K, V>> data;
private final UsageStack<K, V> usage = new UsageStack<>();
private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true);
private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
private final WriteLock writeLock = lock.writeLock();
private final ReadLock readLock = lock.readLock();