public Future<Long> bitcount(K key, long start, long end) {
   CommandArgs<K, V> args = new CommandArgs<K, V>(codec);
   args.addKey(key).add(start).add(end);
   return dispatch(BITCOUNT, new IntegerOutput<K, V>(codec), args);
 }
 public Future<Long> zunionstore(K destination, ZStoreArgs storeArgs, K... keys) {
   CommandArgs<K, V> args = new CommandArgs<K, V>(codec);
   args.addKey(destination).add(keys.length).addKeys(keys);
   storeArgs.build(args);
   return dispatch(ZUNIONSTORE, new IntegerOutput<K, V>(codec), args);
 }
 public Future<List<ScoredValue<V>>> zrevrangeWithScores(K key, long start, long stop) {
   CommandArgs<K, V> args = new CommandArgs<K, V>(codec);
   args.addKey(key).add(start).add(stop).add(WITHSCORES);
   return dispatch(ZREVRANGE, new ScoredValueListOutput<K, V>(codec), args);
 }
 public Future<List<ScoredValue<V>>> zrevrangebyscoreWithScores(
     K key, String max, String min, long offset, long count) {
   CommandArgs<K, V> args = new CommandArgs<K, V>(codec);
   args.addKey(key).add(max).add(min).add(WITHSCORES).add(LIMIT).add(offset).add(count);
   return dispatch(ZREVRANGEBYSCORE, new ScoredValueListOutput<K, V>(codec), args);
 }
 public Future<List<ScoredValue<V>>> zrangebyscoreWithScores(K key, String min, String max) {
   CommandArgs<K, V> args = new CommandArgs<K, V>(codec);
   args.addKey(key).add(min).add(max).add(WITHSCORES);
   return dispatch(ZRANGEBYSCORE, new ScoredValueListOutput<K, V>(codec), args);
 }
 public Future<List<V>> zrangebyscore(K key, String min, String max, long offset, long count) {
   CommandArgs<K, V> args = new CommandArgs<K, V>(codec);
   args.addKey(key).add(min).add(max).add(LIMIT).add(offset).add(count);
   return dispatch(ZRANGEBYSCORE, new ValueListOutput<K, V>(codec), args);
 }
 public Future<Long> linsert(K key, boolean before, V pivot, V value) {
   CommandArgs<K, V> args = new CommandArgs<K, V>(codec);
   args.addKey(key).add(before ? BEFORE : AFTER).addValue(pivot).addValue(value);
   return dispatch(LINSERT, new IntegerOutput<K, V>(codec), args);
 }
 public Future<V> brpoplpush(long timeout, K source, K destination) {
   CommandArgs<K, V> args = new CommandArgs<K, V>(codec);
   args.addKey(source).addKey(destination).add(timeout);
   return dispatch(BRPOPLPUSH, new ValueOutput<K, V>(codec), args);
 }
Esempio n. 9
0
 public CommandArgs<K, V> addKeys(K... keys) {
   for (K key : keys) {
     addKey(key);
   }
   return this;
 }