Fixed cache locks as they were swapped.
Must've been real tired or something while writing that.
This commit is contained in:
		| @@ -11,8 +11,8 @@ public class Cache<Key, Value> { | ||||
|     private final ConcurrentHashMap<Key, CacheValue<Value>> data; | ||||
|     private final ConcurrentLinkedQueue<Key> occurrenceOrder; | ||||
|     private ReentrantReadWriteLock cleaningLock = new ReentrantReadWriteLock(true); | ||||
|     private ReadLock writeLock = cleaningLock.readLock(); | ||||
|     private WriteLock readLock = cleaningLock.writeLock(); | ||||
|     private WriteLock writeLock = cleaningLock.writeLock(); | ||||
|     private ReadLock readLock = cleaningLock.readLock(); | ||||
|  | ||||
|     public Cache(int maxSize) { | ||||
|         data = new ConcurrentHashMap<>(maxSize + 1, 0.75f, 6); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user