v2.5
This commit is contained in:
parent
99060abcbb
commit
29b252565f
|
@ -13,7 +13,7 @@ import java.util.Map;
|
|||
public class RedisCacheSyncTimer {
|
||||
|
||||
private static final String LOCK_KEY = "sync_lock";
|
||||
private static final int LOCK_EXPIRE_SECONDS = 600;
|
||||
private static final int LOCK_EXPIRE_SECONDS = 300;
|
||||
private final Map<Plugin, PluginInfo> pluginInfos = new HashMap<>();
|
||||
|
||||
private BukkitTask task;
|
||||
|
@ -53,7 +53,7 @@ public class RedisCacheSyncTimer {
|
|||
}
|
||||
if (data != null) {
|
||||
String finalData = data;
|
||||
synchronizer.sync(finalData);
|
||||
synchronizer.sync(k, finalData);
|
||||
if (k2 == null) {
|
||||
jedis.del(k);
|
||||
} else {
|
||||
|
@ -65,7 +65,7 @@ public class RedisCacheSyncTimer {
|
|||
}
|
||||
}
|
||||
}
|
||||
}.runTaskTimerAsynchronously(AuLib.inst(), 0L, 10L * 20 * 60L);
|
||||
}.runTaskTimerAsynchronously(AuLib.inst(), 60L, 5 * 60 * 20L);
|
||||
}
|
||||
|
||||
public void registerSynchronizer(Plugin plugin, IJedisGetter jedisGetter, Pair<String, String> key, RedisCacheSynchronizer synchronizer) {
|
||||
|
|
|
@ -3,6 +3,6 @@ package com.io.yutian.aulib.redis;
|
|||
@FunctionalInterface
|
||||
public interface RedisCacheSynchronizer {
|
||||
|
||||
void sync(String data);
|
||||
void sync(String key, String data);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: AuLib
|
||||
main: com.io.yutian.aulib.AuLib
|
||||
version: 2.4
|
||||
version: 2.5
|
||||
api-version: 1.18
|
||||
author: SuperYuTian
|
Loading…
Reference in New Issue
Block a user