redis tests - hashes

master
Alex 2022-03-26 20:17:33 +01:00
parent 9da7c4cd82
commit f3a3489551
2 changed files with 6 additions and 0 deletions

View File

@ -119,6 +119,10 @@ public class PostLoginListener implements Listener {
ProxySystem.getInstance().getRedisManager().getRedisHashCommands() ProxySystem.getInstance().getRedisManager().getRedisHashCommands()
.hset("player", proxiedPlayer.getUniqueId().toString(), "online"); .hset("player", proxiedPlayer.getUniqueId().toString(), "online");
ProxySystem.getInstance().getRedisManager().getRedisHashCommands()
.hset("player", proxiedPlayer.getUniqueId().toString(),
"car", "bmw", "year", "2004");
MessageUnpacker unpacker = MessagePack.newDefaultUnpacker(packer.toByteArray()); MessageUnpacker unpacker = MessagePack.newDefaultUnpacker(packer.toByteArray());
String playerName = unpacker.unpackString(); String playerName = unpacker.unpackString();

View File

@ -10,5 +10,7 @@ public interface RedisHashCommands extends Commands {
Boolean hset(String key, String field, String value); Boolean hset(String key, String field, String value);
Long hset(String key, String field, String... value);
//Mono<String> hmset(Key key, Map<Key, Value> map); //Mono<String> hmset(Key key, Map<Key, Value> map);
} }