Package org.jredis

Examples of org.jredis.Sort


    return Collections.emptyList();
  }

  @Override
  public List<byte[]> sort(byte[] key, SortParameters params) {
    Sort sort = jredis.sort(JredisUtils.decode(key));
    JredisUtils.applySortingParams(sort, params, null);
    try {
      return sort.exec();
    } catch (Exception ex) {
      throw convertJredisAccessException(ex);
    }
  }
View Full Code Here


    }
  }

  @Override
  public Long sort(byte[] key, SortParameters params, byte[] storeKey) {
    Sort sort = jredis.sort(JredisUtils.decode(key));
    JredisUtils.applySortingParams(sort, params, null);
    try {
      return Support.unpackValue(sort.exec());
    } catch (Exception ex) {
      throw convertJredisAccessException(ex);
    }
  }
View Full Code Here

    byte[] keybytes = null;
    if((keybytes = getKeyBytes(key)) == null)
      throw new IllegalArgumentException ("invalid key => ["+key+"]");

    final JRedisFutureSupport client = this;
    Sort sortQuery = new SortSupport (key, keybytes) {
    //  @Override
      protected Future<List<byte[]>> execAsynchSort(byte[] keyBytes, byte[] sortSpecBytes) {
        return new FutureByteArrayList(client.queueRequest(Command.SORT, keyBytes, sortSpecBytes));
      }
      protected List<byte[]> execSort(byte[] keyBytes, byte[] sortSpecBytes) {
View Full Code Here

    byte[] keybytes = null;
    if((keybytes = JRedisSupport.getKeyBytes(key)) == null)
      throw new IllegalArgumentException ("invalid key => ["+key+"]");
   
    final JRedisFutureSupport client = this;
    Sort sortQuery = new SortSupport (keybytes) {

        @Override
      protected Future<List<byte[]>> execAsyncSort(byte[]... fullSortCmd) {
        return new FutureByteArrayList(client.queueRequest(Command.SORT, fullSortCmd));
      }
View Full Code Here

    if((keybytes = getKeyBytes(key)) == null)
      throw new IllegalArgumentException ("invalid key => ["+key+"]");

    final JRedisSupport client = this;
//    Sort sortQuery = new SortSupport (key, keybytes) {
    Sort sortQuery = new SortSupport (keybytes) {
      @Override
      protected List<byte[]> execSort(byte[]... fullSortCmd)
      throws IllegalStateException, RedisException {
       
        List<byte[]> multiBulkData= null;
View Full Code Here

    byte[] keybytes = null;
    if((keybytes = getKeyBytes(key)) == null)
      throw new IllegalArgumentException ("invalid key => ["+key+"]");

    final JRedisSupport client = this;
    Sort sortQuery = new SortSupport (key, keybytes) {
    //  @Override
      protected List<byte[]> execSort(byte[] keyBytes, byte[] sortSpecBytes)
      throws IllegalStateException, RedisException {
       
        List<byte[]> multiBulkData= null;
View Full Code Here

  public List<Object> closePipeline() {
    return Collections.emptyList();
  }

  public List<byte[]> sort(byte[] key, SortParameters params) {
    Sort sort = jredis.sort(key);
    JredisUtils.applySortingParams(sort, params, null);
    try {
      return sort.exec();
    } catch (Exception ex) {
      throw convertJredisAccessException(ex);
    }
  }
View Full Code Here

      throw convertJredisAccessException(ex);
    }
  }

  public Long sort(byte[] key, SortParameters params, byte[] storeKey) {
    Sort sort = jredis.sort(key);
    JredisUtils.applySortingParams(sort, params, storeKey);
    try {
      return Support.unpackValue(sort.exec());
    } catch (Exception ex) {
      throw convertJredisAccessException(ex);
    }
  }
View Full Code Here

TOP

Related Classes of org.jredis.Sort

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.