mirror of
				https://github.com/LamGC/ContentGrabbingJi.git
				synced 2025-11-04 02:26:57 +00:00 
			
		
		
		
	[Change] HotDataCacheStore 调整'supportedList'的条件, HotDataCacheStore将支持使用ListCacheStore;
[Change] AutoSender 将AutoSender的messageSender增加final属性;
This commit is contained in:
		@ -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
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user