This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import redis.clients.jedis.commands.ProtocolCommand; | |
import redis.clients.jedis.util.SafeEncoder; | |
public enum CustomCommand implements ProtocolCommand { | |
CFEXISTS("CF.EXISTS"), | |
CFDEL("CF.DEL"); | |
private final byte[] raw; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void hset(final byte[] key, final byte[] field, final byte[] value) { | |
sendCommand(HSET, key, field, value); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void hset(final String key, final String field, final String value) { | |
hset(SafeEncoder.encode(key), SafeEncoder.encode(field), SafeEncoder.encode(value)); | |
} |