Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main/java/redis/clients/jedis/Protocol.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.List;
import java.util.Locale;

import redis.clients.jedis.args.Rawable;
import redis.clients.jedis.commands.ProtocolCommand;
import redis.clients.jedis.exceptions.*;
import redis.clients.jedis.util.RedisInputStream;
Expand Down Expand Up @@ -275,7 +276,7 @@ public byte[] getRaw() {
}
}

public static enum Keyword {
public static enum Keyword implements Rawable {
AGGREGATE, ALPHA, ASC, BY, DESC, GET, LIMIT, MESSAGE, NO, NOSORT, PMESSAGE, PSUBSCRIBE,
PUNSUBSCRIBE, OK, ONE, QUEUED, SET, STORE, SUBSCRIBE, UNSUBSCRIBE, WEIGHTS, WITHSCORES,
RESETSTAT, REWRITE, RESET, FLUSH, EXISTS, LOAD, KILL, LEN, REFCOUNT, ENCODING, IDLETIME,
Expand All @@ -294,6 +295,7 @@ public static enum Keyword {
raw = SafeEncoder.encode(this.name().toLowerCase(Locale.ENGLISH));
}

@Override
public byte[] getRaw() {
return raw;
}
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/redis/clients/jedis/args/Rawable.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package redis.clients.jedis.args;

public interface Rawable {

byte[] getRaw();
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package redis.clients.jedis.commands;

public interface ProtocolCommand {

byte[] getRaw();
import redis.clients.jedis.args.Rawable;

public interface ProtocolCommand extends Rawable {
}