mirror of
				https://github.com/LamGC/ContentGrabbingJi.git
				synced 2025-10-31 00:26:56 +00:00 
			
		
		
		
	[Change] 重命名类名;
This commit is contained in:
		| @ -43,15 +43,15 @@ public class CQProcess { | |||||||
|  |  | ||||||
|     private final static Hashtable<String, File> imageCache = new Hashtable<>(); |     private final static Hashtable<String, File> imageCache = new Hashtable<>(); | ||||||
|  |  | ||||||
|     private final static JsonRedisCacheDatabase illustInfoCache = new JsonRedisCacheDatabase(redisServerUri, "illustInfo", gson); |     private final static JsonRedisCacheStore illustInfoCache = new JsonRedisCacheStore(redisServerUri, "illustInfo", gson); | ||||||
|  |  | ||||||
|     private final static JsonRedisCacheDatabase illustPreLoadDataCache = new JsonRedisCacheDatabase(redisServerUri, "illustPreLoadData", gson); |     private final static JsonRedisCacheStore illustPreLoadDataCache = new JsonRedisCacheStore(redisServerUri, "illustPreLoadData", gson); | ||||||
|  |  | ||||||
|     private final static JsonRedisCacheDatabase searchBodyCache = new JsonRedisCacheDatabase(redisServerUri, "searchBody", gson); |     private final static JsonRedisCacheStore searchBodyCache = new JsonRedisCacheStore(redisServerUri, "searchBody", gson); | ||||||
|  |  | ||||||
|     private final static CacheStore<List<String>> pagesCache = new LocalHashCacheStore<>(); |     private final static CacheStore<List<String>> pagesCache = new LocalHashCacheStore<>(); | ||||||
|  |  | ||||||
|     private final static JsonRedisCacheDatabase rankingCache = new JsonRedisCacheDatabase(redisServerUri, "ranking", gson); |     private final static JsonRedisCacheStore rankingCache = new JsonRedisCacheStore(redisServerUri, "ranking", gson); | ||||||
|  |  | ||||||
|     private final static EventExecutor imageCacheExecutor = new EventExecutor(new ThreadPoolExecutor( |     private final static EventExecutor imageCacheExecutor = new EventExecutor(new ThreadPoolExecutor( | ||||||
|             1, |             1, | ||||||
|  | |||||||
| @ -5,11 +5,11 @@ import com.google.gson.JsonElement; | |||||||
| 
 | 
 | ||||||
| import java.net.URI; | import java.net.URI; | ||||||
| 
 | 
 | ||||||
| public class JsonRedisCacheDatabase extends RedisPoolCacheStore<JsonElement> { | public class JsonRedisCacheStore extends RedisPoolCacheStore<JsonElement> { | ||||||
| 
 | 
 | ||||||
|     private final Gson gson; |     private final Gson gson; | ||||||
| 
 | 
 | ||||||
|     public JsonRedisCacheDatabase(URI redisServerUri, String prefix, Gson gson) { |     public JsonRedisCacheStore(URI redisServerUri, String prefix, Gson gson) { | ||||||
|         super(redisServerUri, prefix); |         super(redisServerUri, prefix); | ||||||
|         this.gson = gson; |         this.gson = gson; | ||||||
|     } |     } | ||||||
| @ -9,13 +9,13 @@ import redis.clients.jedis.exceptions.JedisConnectionException; | |||||||
| import java.net.URI; | import java.net.URI; | ||||||
| import java.util.Date; | import java.util.Date; | ||||||
| 
 | 
 | ||||||
| public abstract class RedisCacheDatabase<T> implements CacheStore<T> { | public abstract class RedisCacheStore<T> implements CacheStore<T> { | ||||||
| 
 | 
 | ||||||
|     private final Jedis jedis; |     private final Jedis jedis; | ||||||
|     private final Logger log; |     private final Logger log; | ||||||
|     private final String keyPrefix; |     private final String keyPrefix; | ||||||
| 
 | 
 | ||||||
|     public RedisCacheDatabase(URI redisServerUri, String prefix) { |     public RedisCacheStore(URI redisServerUri, String prefix) { | ||||||
|         this(redisServerUri, null, prefix); |         this(redisServerUri, null, prefix); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| @ -25,7 +25,7 @@ public abstract class RedisCacheDatabase<T> implements CacheStore<T> { | |||||||
|      * @param password 登录密码(如果有) |      * @param password 登录密码(如果有) | ||||||
|      * @throws JedisConnectionException 当连接失败时抛出 |      * @throws JedisConnectionException 当连接失败时抛出 | ||||||
|      */ |      */ | ||||||
|     public RedisCacheDatabase(URI redisServerUri, String password, String prefix) throws JedisConnectionException { |     public RedisCacheStore(URI redisServerUri, String password, String prefix) throws JedisConnectionException { | ||||||
|         this.jedis = new Jedis(redisServerUri.getHost(), redisServerUri.getPort() <= 0 ? 6379 : redisServerUri.getPort()); |         this.jedis = new Jedis(redisServerUri.getHost(), redisServerUri.getPort() <= 0 ? 6379 : redisServerUri.getPort()); | ||||||
|         log = LoggerFactory.getLogger("RedisCacheDatabase@" + Integer.toHexString(jedis.hashCode())); |         log = LoggerFactory.getLogger("RedisCacheDatabase@" + Integer.toHexString(jedis.hashCode())); | ||||||
|         log.info("Redis数据库连接状态: {}", jedis.ping()); |         log.info("Redis数据库连接状态: {}", jedis.ping()); | ||||||
		Reference in New Issue
	
	Block a user