mirror of
				https://github.com/LamGC/ContentGrabbingJi.git
				synced 2025-11-04 02:26:57 +00:00 
			
		
		
		
	[Update] HotDataCacheStore, Cleanable 更新Javadoc;
This commit is contained in:
		@ -1,10 +1,13 @@
 | 
				
			|||||||
package net.lamgc.cgj.bot.cache;
 | 
					package net.lamgc.cgj.bot.cache;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 可清理接口, 实现该接口代表该类拥有清理动作.
 | 
					 * 可清理接口, 实现该接口代表该类具有清理动作.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
public interface Cleanable {
 | 
					public interface Cleanable {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 该方法需要CacheStore完成对过期Entry的清除.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    void clean() throws Exception;
 | 
					    void clean() throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -133,6 +133,10 @@ public class HotDataCacheStore<T> implements CacheStore<T>, Cleanable {
 | 
				
			|||||||
        return current.supportedList() && parent.supportedList();
 | 
					        return current.supportedList() && parent.supportedList();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 检查并清理已过期的Entry.
 | 
				
			||||||
 | 
					     * <p>该方法仅清理Current缓存库, 不会对上游缓存库造成影响.</p>
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void clean() {
 | 
					    public void clean() {
 | 
				
			||||||
        for(String key : this.current.keys()) {
 | 
					        for(String key : this.current.keys()) {
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user