Package org.jredis.protocol

Examples of org.jredis.protocol.MultiBulkResponse


    byte[] fromBytes = Convert.toBytes(from);
    byte[] toBytes = Convert.toBytes(to);

    List<byte[]> multiBulkData= null;
    try {
      MultiBulkResponse MultiBulkResponse = (MultiBulkResponse) this.serviceRequest(Command.ZREVRANGE, keybytes, fromBytes, toBytes);
      multiBulkData = MultiBulkResponse.getMultiBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a MultiBulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return multiBulkData;
View Full Code Here


    byte[] fromBytes = Convert.toBytes(from);
    byte[] toBytes = Convert.toBytes(to);

    List<ZSetEntry> list= null;
    try {
      MultiBulkResponse multiBulkResponse = (MultiBulkResponse) this.serviceRequest(Command.ZRANGE$OPTS, keybytes, fromBytes, toBytes, Command.Option.WITHSCORES.bytes);
      List<byte[]> bulkData = multiBulkResponse.getMultiBulkData();
      if(null != bulkData){
        list = new ArrayList<ZSetEntry>(bulkData.size()/2);
        for(int i=0; i<bulkData.size(); i+=2){
          list.add(new ZSetEntryImpl(bulkData.get(i), bulkData.get(i+1)));
        }
View Full Code Here

    byte[] fromBytes = Convert.toBytes(from);
    byte[] toBytes = Convert.toBytes(to);

    List<ZSetEntry> list= null;
    try {
      MultiBulkResponse multiBulkResponse = (MultiBulkResponse) this.serviceRequest(Command.ZREVRANGE$OPTS, keybytes, fromBytes, toBytes, Command.Option.WITHSCORES.bytes);
      List<byte[]> bulkData = multiBulkResponse.getMultiBulkData();
      if(null != bulkData){
        list = new ArrayList<ZSetEntry>(bulkData.size()/2);
        for(int i=0; i<bulkData.size(); i+=2){
          list.add(new ZSetEntryImpl(bulkData.get(i), bulkData.get(i+1)));
        }
View Full Code Here

      protected List<byte[]> execSort(byte[]... fullSortCmd)
      throws IllegalStateException, RedisException {
       
        List<byte[]> multiBulkData= null;
        try {
          MultiBulkResponse multiBulkResponse = (MultiBulkResponse) client.serviceRequest(Command.SORT, fullSortCmd);
          multiBulkData = multiBulkResponse.getMultiBulkData();
        }
        catch (ClassCastException e){
          throw new ProviderException("Expecting a MultiBulkResponse here => " + e.getLocalizedMessage(), e);
        }
        return multiBulkData;
View Full Code Here

      keybytes[i++] = keydata;
    }
   
    List<byte[]> multiBulkData= null;
    try {
      MultiBulkResponse MultiBulkResponse = (MultiBulkResponse) this.serviceRequest(Command.SINTER, keybytes);
      multiBulkData = MultiBulkResponse.getMultiBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a MultiBulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return multiBulkData;
View Full Code Here

      keybytes[i++] = keydata;
    }
   
    List<byte[]> multiBulkData= null;
    try {
      MultiBulkResponse MultiBulkResponse = (MultiBulkResponse) this.serviceRequest(Command.SUNION, keybytes);
      multiBulkData = MultiBulkResponse.getMultiBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a MultiBulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return multiBulkData;
View Full Code Here

      keybytes[i++] = keydata;
    }
   
    List<byte[]> multiBulkData= null;
    try {
      MultiBulkResponse MultiBulkResponse = (MultiBulkResponse) this.serviceRequest(Command.SDIFF, keybytes);
      multiBulkData = MultiBulkResponse.getMultiBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a MultiBulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return multiBulkData;
View Full Code Here

      keybytes[i++] = keydata;
    }
   
    List<byte[]> multiBulkData= null;
    try {
      MultiBulkResponse MultiBulkResponse = (MultiBulkResponse) this.serviceRequest(Command.MGET, keybytes);
      multiBulkData = MultiBulkResponse.getMultiBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a MultiBulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return multiBulkData;
View Full Code Here

    if((keydata = getKeyBytes(key)) == null)
      throw new RedisException (Command.KEYS, "ERR Invalid key.");

    List<byte[]> multiBulkData= null;
    try {
      MultiBulkResponse MultiBulkResponse = (MultiBulkResponse) this.serviceRequest(Command.SMEMBERS, keydata);
      multiBulkData = MultiBulkResponse.getMultiBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a MultiBulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return multiBulkData;
View Full Code Here

    byte[] fromBytes = Convert.toBytes(from);
    byte[] toBytes = Convert.toBytes(to);

    List<byte[]> multiBulkData= null;
    try {
      MultiBulkResponse MultiBulkResponse = (MultiBulkResponse) this.serviceRequest(Command.LRANGE, keybytes, fromBytes, toBytes);
      multiBulkData = MultiBulkResponse.getMultiBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a MultiBulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return multiBulkData;
View Full Code Here

TOP

Related Classes of org.jredis.protocol.MultiBulkResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.