List of usage examples for org.springframework.data.redis.connection RedisConnection sort
@Nullable Long sort(byte[] key, SortParameters params, byte[] storeKey);
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Sort the elements for {@code key} and store result in {@code storeKey}. * <p>/*from w ww .ja va 2s . c om*/ * See http://redis.io/commands/sort * * @param key key * @param params params * @param storeKey storeKey * @return Long */ public static Long sort(byte[] key, SortParameters params, byte[] storeKey) { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.sort(key, params, storeKey); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Sort the elements for {@code key} and store result in {@code storeKey}. * <p>/*from w w w . j av a2s .c o m*/ * See http://redis.io/commands/sort * * @param key key * @param params params * @param storeKey storeKey * @return Long */ public Long sort(byte[] key, SortParameters params, byte[] storeKey) { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.sort(key, params, storeKey); } }); }