mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
废弃StampedCache,可能造成Map循环调用导致死锁(issue#IBDGBZ@Gitee)
This commit is contained in:
@@ -15,7 +15,7 @@ import java.util.Iterator;
|
||||
* @param <K> 键类型
|
||||
* @param <V> 值类型
|
||||
*/
|
||||
public class LFUCache<K, V> extends StampedCache<K, V> {
|
||||
public class LFUCache<K, V> extends ReentrantCache<K, V> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
|
@@ -12,7 +12,9 @@ import java.util.concurrent.locks.StampedLock;
|
||||
* @param <V> 值类型
|
||||
* @author looly
|
||||
* @since 5.7.15
|
||||
* @deprecated Map使用StampedLock可能造成数据不一致甚至Map循环调用,此缓存废弃
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class StampedCache<K, V> extends AbstractCache<K, V> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@@ -17,7 +17,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
* @param <K> 键类型
|
||||
* @param <V> 值类型
|
||||
*/
|
||||
public class TimedCache<K, V> extends StampedCache<K, V> {
|
||||
public class TimedCache<K, V> extends ReentrantCache<K, V> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 正在执行的定时任务 */
|
||||
|
Reference in New Issue
Block a user