Exemplo n.º 1
0
 public List<Object> getAll(int except) {
   List<Object> all = new ArrayList<Object>();
   flush();
   while (pipelinedCommands > except) {
     all.add(protocol.read(inputStream));
     pipelinedCommands--;
   }
   return all;
 }
Exemplo n.º 2
0
 protected String getStatusCodeReply() {
   flush();
   pipelinedCommands--;
   final byte[] resp = (byte[]) protocol.read(inputStream);
   if (null == resp) {
     return null;
   } else {
     return SafeEncoder.encode(resp);
   }
 }
Exemplo n.º 3
0
 public List<Object> getAll(int except) {
   List<Object> all = new ArrayList<Object>();
   flush();
   while (pipelinedCommands > except) {
     try {
       all.add(Protocol.read(inputStream));
     } catch (JedisDataException e) {
       all.add(e);
     }
     pipelinedCommands--;
   }
   return all;
 }
Exemplo n.º 4
0
 public Object getOne() {
   flush();
   pipelinedCommands--;
   return protocol.read(inputStream);
 }
Exemplo n.º 5
0
 @SuppressWarnings("unchecked")
 public List<Object> getObjectMultiBulkReply() {
   flush();
   pipelinedCommands--;
   return (List<Object>) protocol.read(inputStream);
 }
Exemplo n.º 6
0
 public Long getIntegerReply() {
   flush();
   pipelinedCommands--;
   return (Long) protocol.read(inputStream);
 }
Exemplo n.º 7
0
 public byte[] getBinaryBulkReply() {
   flush();
   pipelinedCommands--;
   return (byte[]) protocol.read(inputStream);
 }
Exemplo n.º 8
0
 public void flushAsync(Collection<Response<?>> responses) {
   flush();
   asyncResponses.addAll(responses);
   startResponsePump();
 }
Exemplo n.º 9
0
 public Object getOne() {
   waitForAsyncReadsToComplete();
   flush();
   pipelinedCommands--;
   return Protocol.read(inputStream);
 }
Exemplo n.º 10
0
 @SuppressWarnings("deprecation")
 public Double getDoubleReply() {
   flush();
   pipelinedCommands--;
   return Double.valueOf(new String((byte[]) Protocol.read(inputStream)));
 }