/** * Constructs a new <code>DefaultBoundZSetOperations</code> instance. * * @param key * @param operations */ DefaultBoundZSetOperations(K key, RedisOperations<K, V> operations) { super(key, operations); this.ops = operations.opsForZSet(); }
public void setValue(Object value) { if (value instanceof RedisOperations) { super.setValue(((RedisOperations) value).opsForZSet()); } else { throw new IllegalArgumentException("Editor supports only conversion of type " + RedisOperations.class); } } }
/** * Constructs a new <code>DefaultBoundZSetOperations</code> instance. * * @param key * @param operations */ DefaultBoundZSetOperations(K key, RedisOperations<K, V> operations) { super(key, operations); this.ops = operations.opsForZSet(); }
/** * Constructs a new <code>DefaultBoundZSetOperations</code> instance. * * @param key * @param operations */ DefaultBoundZSetOperations(K key, RedisOperations<K, V> operations) { super(key, operations); this.ops = operations.opsForZSet(); }
public void setValue(Object value) { if (value instanceof RedisOperations) { super.setValue(((RedisOperations) value).opsForZSet()); } else { throw new IllegalArgumentException("Editor supports only conversion of type " + RedisOperations.class); } } }
@Override public void addToSetWithScore(String key, String taskId, long score) { ops.opsForZSet().add(key, taskId, score); }
@Override public void removeFromSet(String key, String taskId) { ops.opsForZSet().remove(key, taskId); }
@Override public Optional<String> firstByScore(String key, long minScore, long maxScore) { return ops.opsForZSet() .rangeByScore(key, minScore, maxScore, 0, 1) .stream() .findFirst(); } }
public void setValue(Object value) { if (value instanceof RedisOperations) { super.setValue(((RedisOperations) value).opsForZSet()); } else { throw new IllegalArgumentException("Editor supports only conversion of type " + RedisOperations.class); } } }