Class Cache<K,V>
java.lang.Object
cool.scx.common.cache.Cache<K,V>
- Type Parameters:
K-V-
- All Implemented Interfaces:
ICache<K,V>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Cache
public Cache(int maxSize) -
Cache
public Cache(int maxSize, boolean useSynchronized) -
Cache
public Cache(int maxSize, boolean useSynchronized, boolean accessOrder) - Parameters:
maxSize- 最大容量useSynchronized- 是否使用同步accessOrder- 使用 LRU 策略
-
-
Method Details
-
get
-
put
-
remove
-
clear
-
computeIfAbsent
-