Package redis

Examples of redis.Command


  }

  // Varargs version to simplify commands with optional or multiple arguments
  public Promise<MultiBulkReply> zrevrangebyscore_(Object... arguments) {
    if (version < ZREVRANGEBYSCORE_VERSION) return new Promise<>(new RedisException("Server does not support ZREVRANGEBYSCORE"));
    return execute(MultiBulkReply.class, new Command(ZREVRANGEBYSCORE_BYTES, arguments));
  }
View Full Code Here


   * @param member1
   * @return Reply
   */
  public Promise<Reply> zrevrank(Object key0, Object member1) {
    if (version < ZREVRANK_VERSION) return new Promise<>(new RedisException("Server does not support ZREVRANK"));
    return execute(Reply.class, new Command(ZREVRANK_BYTES, key0, member1));
  }
View Full Code Here

   * @param member1
   * @return BulkReply
   */
  public Promise<BulkReply> zscore(Object key0, Object member1) {
    if (version < ZSCORE_VERSION) return new Promise<>(new RedisException("Server does not support ZSCORE"));
    return execute(BulkReply.class, new Command(ZSCORE_BYTES, key0, member1));
  }
View Full Code Here

    if (version < ZUNIONSTORE_VERSION) return new Promise<>(new RedisException("Server does not support ZUNIONSTORE"));
    List<Object> list = new ArrayList<>();
    list.add(destination0);
    list.add(numkeys1);
    Collections.addAll(list, key2);
    return execute(IntegerReply.class, new Command(ZUNIONSTORE_BYTES, list.toArray(new Object[list.size()])));
  }
View Full Code Here

  }

  // Varargs version to simplify commands with optional or multiple arguments
  public Promise<IntegerReply> zunionstore_(Object... arguments) {
    if (version < ZUNIONSTORE_VERSION) return new Promise<>(new RedisException("Server does not support ZUNIONSTORE"));
    return execute(IntegerReply.class, new Command(ZUNIONSTORE_BYTES, arguments));
  }
View Full Code Here

    cb.connect(new InetSocketAddress(hostname, port)).addListener(new ChannelFutureListener() {
      @Override
      public void operationComplete(ChannelFuture channelFuture) throws Exception {
        if (channelFuture.isSuccess()) {
          redisClient.init(channelFuture.getChannel(), queue, executor);
          redisClient.execute(BulkReply.class, new Command("INFO")).onSuccess(new Block<BulkReply>() {
            @Override
            public void apply(BulkReply bulkReply) {
              redisClient.parseInfo(bulkReply);
              redisClientBasePromise.set(redisClient);
            }
View Full Code Here

   * @param subscriptions
   */
  public Promise<Void> subscribe(Object... subscriptions) {
    subscribed();
    Promise<Void> result = new Promise<>();
    channel.write(new Command(SUBSCRIBE, subscriptions)).addListener(wrapSubscribe(result));
    return result;
  }
View Full Code Here

   * @param subscriptions
   */
  public Promise<Void> psubscribe(Object... subscriptions) {
    subscribed();
    Promise<Void> result = new Promise<>();
    channel.write(new Command(PSUBSCRIBE, subscriptions)).addListener(wrapSubscribe(result));
    return result;
  }
View Full Code Here

   * @param subscriptions
   */
  public Promise<Void> unsubscribe(Object... subscriptions) {
    subscribed();
    Promise<Void> result = new Promise<>();
    channel.write(new Command(UNSUBSCRIBE, subscriptions)).addListener(wrapSubscribe(result));
    return result;
  }
View Full Code Here

   * @param subscriptions
   */
  public Promise<Void> punsubscribe(Object... subscriptions) {
    subscribed();
    Promise<Void> result = new Promise<>();
    channel.write(new Command(PUNSUBSCRIBE, subscriptions)).addListener(wrapSubscribe(result));
    return result;
  }
View Full Code Here

TOP

Related Classes of redis.Command

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.