@Override public Set<Tuple> zRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count) { Assert.notNull(key, "Key must not be null!"); if (offset > Integer.MAX_VALUE || count > Integer.MAX_VALUE) { throw new IllegalArgumentException("Count/Offset cannot exceed Integer.MAX_VALUE!"); } try { return JedisConverters.toTupleSet(connection.getCluster().zrangeByScoreWithScores(key, min, max, Long.valueOf(offset).intValue(), Long.valueOf(count).intValue())); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count) { Assert.notNull(key, "Key must not be null!"); if (offset > Integer.MAX_VALUE || count > Integer.MAX_VALUE) { throw new IllegalArgumentException("Count/Offset cannot exceed Integer.MAX_VALUE!"); } try { return JedisConverters.toTupleSet(connection.getCluster().zrevrangeByScoreWithScores(key, max, min, Long.valueOf(offset).intValue(), Long.valueOf(count).intValue())); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max) { Assert.notNull(key, "Key must not be null!"); try { return JedisConverters.toTupleSet(connection.getCluster().zrevrangeByScoreWithScores(key, max, min)); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRevRangeWithScores(byte[] key, long start, long end) { Assert.notNull(key, "Key must not be null!"); try { return JedisConverters.toTupleSet(connection.getCluster().zrevrangeWithScores(key, start, end)); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRangeWithScores(byte[] key, long start, long end) { Assert.notNull(key, "Key must not be null!"); try { return JedisConverters.toTupleSet(connection.getCluster().zrangeWithScores(key, start, end)); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRangeByScoreWithScores(byte[] key, double min, double max) { Assert.notNull(key, "Key must not be null!"); try { return JedisConverters.toTupleSet(connection.getCluster().zrangeByScoreWithScores(key, min, max)); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRangeByScoreWithScores(byte[] key, Range range, Limit limit) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range cannot be null for ZRANGEBYSCOREWITHSCORES."); byte[] min = JedisConverters.boundaryToBytesForZRange(range.getMin(), JedisConverters.NEGATIVE_INFINITY_BYTES); byte[] max = JedisConverters.boundaryToBytesForZRange(range.getMax(), JedisConverters.POSITIVE_INFINITY_BYTES); try { if (limit.isUnlimited()) { return JedisConverters.toTupleSet(connection.getCluster().zrangeByScoreWithScores(key, min, max)); } return JedisConverters.toTupleSet( connection.getCluster().zrangeByScoreWithScores(key, min, max, limit.getOffset(), limit.getCount())); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRevRangeByScoreWithScores(byte[] key, Range range, Limit limit) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range cannot be null for ZREVRANGEBYSCOREWITHSCORES."); byte[] min = JedisConverters.boundaryToBytesForZRange(range.getMin(), JedisConverters.NEGATIVE_INFINITY_BYTES); byte[] max = JedisConverters.boundaryToBytesForZRange(range.getMax(), JedisConverters.POSITIVE_INFINITY_BYTES); try { if (limit.isUnlimited()) { return JedisConverters.toTupleSet(connection.getCluster().zrevrangeByScoreWithScores(key, max, min)); } return JedisConverters.toTupleSet( connection.getCluster().zrevrangeByScoreWithScores(key, max, min, limit.getOffset(), limit.getCount())); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRangeWithScores(byte[] key, long start, long end) { Assert.notNull(key, "Key must not be null!"); try { if (isPipelined()) { pipeline(connection.newJedisResult(connection.getRequiredPipeline().zrangeWithScores(key, start, end), JedisConverters.tupleSetToTupleSet())); return null; } if (isQueueing()) { transaction(connection.newJedisResult(connection.getRequiredTransaction().zrangeWithScores(key, start, end), JedisConverters.tupleSetToTupleSet())); return null; } return JedisConverters.toTupleSet(connection.getJedis().zrangeWithScores(key, start, end)); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRevRangeWithScores(byte[] key, long start, long end) { Assert.notNull(key, "Key must not be null!"); try { if (isPipelined()) { pipeline(connection.newJedisResult(connection.getRequiredPipeline().zrevrangeWithScores(key, start, end), JedisConverters.tupleSetToTupleSet())); return null; } if (isQueueing()) { transaction(connection.newJedisResult(connection.getRequiredTransaction().zrevrangeWithScores(key, start, end), JedisConverters.tupleSetToTupleSet())); return null; } return JedisConverters.toTupleSet(connection.getJedis().zrevrangeWithScores(key, start, end)); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
return JedisConverters.toTupleSet( connection.getJedis().zrevrangeByScoreWithScores(key, max, min, limit.getOffset(), limit.getCount())); return JedisConverters.toTupleSet(connection.getJedis().zrevrangeByScoreWithScores(key, max, min)); } catch (Exception ex) { throw convertJedisAccessException(ex);
return JedisConverters.toTupleSet( connection.getJedis().zrangeByScoreWithScores(key, min, max, limit.getOffset(), limit.getCount())); return JedisConverters.toTupleSet(connection.getJedis().zrangeByScoreWithScores(key, min, max)); } catch (Exception ex) { throw convertJedisAccessException(ex);
@Override public Set<Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count) { Assert.notNull(key, "Key must not be null!"); if (offset > Integer.MAX_VALUE || count > Integer.MAX_VALUE) { throw new IllegalArgumentException("Count/Offset cannot exceed Integer.MAX_VALUE!"); } try { return JedisConverters.toTupleSet(connection.getCluster().zrevrangeByScoreWithScores(key, max, min, Long.valueOf(offset).intValue(), Long.valueOf(count).intValue())); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count) { Assert.notNull(key, "Key must not be null!"); if (offset > Integer.MAX_VALUE || count > Integer.MAX_VALUE) { throw new IllegalArgumentException("Count/Offset cannot exceed Integer.MAX_VALUE!"); } try { return JedisConverters.toTupleSet(connection.getCluster().zrangeByScoreWithScores(key, min, max, Long.valueOf(offset).intValue(), Long.valueOf(count).intValue())); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count) { Assert.notNull(key, "Key must not be null!"); if (offset > Integer.MAX_VALUE || count > Integer.MAX_VALUE) { throw new IllegalArgumentException("Count/Offset cannot exceed Integer.MAX_VALUE!"); } try { return JedisConverters.toTupleSet(connection.getCluster().zrevrangeByScoreWithScores(key, max, min, Long.valueOf(offset).intValue(), Long.valueOf(count).intValue())); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRangeWithScores(byte[] key, long start, long end) { Assert.notNull(key, "Key must not be null!"); try { return JedisConverters.toTupleSet(connection.getCluster().zrangeWithScores(key, start, end)); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRangeByScoreWithScores(byte[] key, double min, double max) { Assert.notNull(key, "Key must not be null!"); try { return JedisConverters.toTupleSet(connection.getCluster().zrangeByScoreWithScores(key, min, max)); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRevRangeWithScores(byte[] key, long start, long end) { Assert.notNull(key, "Key must not be null!"); try { return JedisConverters.toTupleSet(connection.getCluster().zrevrangeWithScores(key, start, end)); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max) { Assert.notNull(key, "Key must not be null!"); try { return JedisConverters.toTupleSet(connection.getCluster().zrevrangeByScoreWithScores(key, max, min)); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Set<Tuple> zRangeByScoreWithScores(byte[] key, double min, double max) { Assert.notNull(key, "Key must not be null!"); try { return JedisConverters.toTupleSet(connection.getCluster().zrangeByScoreWithScores(key, min, max)); } catch (Exception ex) { throw convertJedisAccessException(ex); } }