mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2026-06-24 03:46:43 +00:00
Reintroduce pipelining support.
This commit is contained in:
@@ -34,6 +34,7 @@ import lombok.NonNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
import redis.clients.jedis.Jedis;
|
||||
import redis.clients.jedis.Pipeline;
|
||||
import redis.clients.jedis.exceptions.JedisConnectionException;
|
||||
import redis.clients.jedis.exceptions.JedisException;
|
||||
|
||||
@@ -198,6 +199,12 @@ public final class UUIDTranslator {
|
||||
jedis.hset("uuid-cache", uuid.toString(), RedisBungee.getGson().toJson(uuidToNameMap.get(uuid)));
|
||||
}
|
||||
|
||||
public final void persistInfo(String name, UUID uuid, Pipeline jedis) {
|
||||
addToMaps(name, uuid);
|
||||
jedis.hset("uuid-cache", name.toLowerCase(), RedisBungee.getGson().toJson(uuidToNameMap.get(uuid)));
|
||||
jedis.hset("uuid-cache", uuid.toString(), RedisBungee.getGson().toJson(uuidToNameMap.get(uuid)));
|
||||
}
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
private class CachedUUIDEntry {
|
||||
|
||||
Reference in New Issue
Block a user