Skip to content

Loading…

pipeline get doesn't return byte[] #238

Closed
wants to merge 1 commit into from

3 participants

@pankajmi

pipeline is not supporting byte[] return as response, so added a method that return byte[] response, without changing the current get

@xetorthio
Owner

Why not changing the current get?
I don't think it is a good idea to make the API bigger and more complex.
It was a mistake not to return bytes in the first place and jedis 2.1.0 won't be backward compatible with 2.0.0

@samhendley
Collaborator

Mooted, use the get() method.

@samhendley samhendley closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 15, 2011
  1. @pankajmi
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/main/java/redis/clients/jedis/Pipeline.java
View
5 src/main/java/redis/clients/jedis/Pipeline.java
@@ -158,6 +158,11 @@ public void sync() {
client.get(key);
return getResponse(BuilderFactory.STRING);
}
+
+ public Response<byte[]> getBytes(byte[] key) {
+ client.get(key);
+ return getResponse(BuilderFactory.BYTE_ARRAY);
+ }
public Response<Boolean> getbit(String key, long offset) {
client.getbit(key, offset);
Something went wrong with that request. Please try again.