mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-04-29 22:27:33 +00:00
[Change] HotDataCacheStore 调整'supportedList'的条件, HotDataCacheStore将支持使用ListCacheStore;
[Change] AutoSender 将AutoSender的messageSender增加final属性;
This commit is contained in:
parent
ee02072b2d
commit
4c03a0f7d9
@ -9,7 +9,7 @@ import java.util.Objects;
|
||||
*/
|
||||
public abstract class AutoSender {
|
||||
|
||||
private MessageSender messageSender;
|
||||
private final MessageSender messageSender;
|
||||
|
||||
/**
|
||||
* 构造一个自动发送器
|
||||
|
@ -119,12 +119,15 @@ public class HotDataCacheStore<T> implements CacheStore<T>, Cleanable {
|
||||
|
||||
@Override
|
||||
public boolean supportedPersistence() {
|
||||
// 由于Current的缓存数据会更新到Parent上,
|
||||
// 所以只要任意一边支持持久化, 那么该缓存库就支持持久化
|
||||
return current.supportedPersistence() || parent.supportedPersistence();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportedList() {
|
||||
return false;
|
||||
// 只有两边都支持List, 该缓存库才会支持持久化
|
||||
return current.supportedList() && parent.supportedList();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user