mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add method
This commit is contained in:
@@ -3,13 +3,14 @@
|
|||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# 5.5.9 (2021-02-18)
|
# 5.5.9 (2021-02-20)
|
||||||
|
|
||||||
### 新特性
|
### 新特性
|
||||||
* 【crypto 】 PemUtil.readPemKey支持EC(pr#1366@Github)
|
* 【crypto 】 PemUtil.readPemKey支持EC(pr#1366@Github)
|
||||||
* 【extra 】 Ftp等cd方法增加同步(issue#1397@Github)
|
* 【extra 】 Ftp等cd方法增加同步(issue#1397@Github)
|
||||||
* 【core 】 StrUtil增加endWithAnyIgnoreCase(issue#I37I0B@Gitee)
|
* 【core 】 StrUtil增加endWithAnyIgnoreCase(issue#I37I0B@Gitee)
|
||||||
* 【crypto 】 Sm2增加getD和getQ方法(issue#I37Z4C@Gitee)
|
* 【crypto 】 Sm2增加getD和getQ方法(issue#I37Z4C@Gitee)
|
||||||
|
* 【cache 】 AbstractCache增加keySet方法(issue#I37Z4C@Gitee)
|
||||||
|
|
||||||
### Bug修复
|
### Bug修复
|
||||||
* 【json 】 JSONUtil.isJson方法改变trim策略,解决特殊空白符导致判断失败问题
|
* 【json 】 JSONUtil.isJson方法改变trim策略,解决特殊空白符导致判断失败问题
|
||||||
|
@@ -7,6 +7,7 @@ import cn.hutool.core.lang.func.Func0;
|
|||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
import java.util.concurrent.locks.Lock;
|
import java.util.concurrent.locks.Lock;
|
||||||
@@ -312,6 +313,16 @@ public abstract class AbstractCache<K, V> implements Cache<K, V> {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回所有键
|
||||||
|
*
|
||||||
|
* @return 所有键
|
||||||
|
* @since 5.5.9
|
||||||
|
*/
|
||||||
|
public Set<K> keySet(){
|
||||||
|
return this.cacheMap.keySet();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对象移除回调。默认无动作<br>
|
* 对象移除回调。默认无动作<br>
|
||||||
* 子类可重写此方法用于监听移除事件,如果重写,listener将无效
|
* 子类可重写此方法用于监听移除事件,如果重写,listener将无效
|
||||||
|
@@ -48,7 +48,7 @@ public class LRUCache<K, V> extends AbstractCache<K, V> {
|
|||||||
// ---------------------------------------------------------------- prune
|
// ---------------------------------------------------------------- prune
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 只清理超时对象,LRU的实现会交给<code>LinkedHashMap</code>
|
* 只清理超时对象,LRU的实现会交给{@code LinkedHashMap}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected int pruneCache() {
|
protected int pruneCache() {
|
||||||
|
Reference in New Issue
Block a user