[Change] HotDataCacheStore 调整'supportedList'的条件, HotDataCacheStore将支持使用ListCacheStore;

[Change] AutoSender 将AutoSender的messageSender增加final属性;
This commit is contained in:
LamGC 2020-06-01 16:01:17 +08:00
parent ee02072b2d
commit 4c03a0f7d9
2 changed files with 5 additions and 2 deletions

View File

@ -9,7 +9,7 @@ import java.util.Objects;
*/
public abstract class AutoSender {
private MessageSender messageSender;
private final MessageSender messageSender;
/**
* 构造一个自动发送器

View File

@ -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