Package redis

Examples of redis.Command


   * @param member1
   * @return IntegerReply
   */
  public Promise<IntegerReply> sismember(Object key0, Object member1) {
    if (version < SISMEMBER_VERSION) return new Promise<>(new RedisException("Server does not support SISMEMBER"));
    return execute(IntegerReply.class, new Command(SISMEMBER_BYTES, key0, member1));
  }
View Full Code Here


   * @param key0
   * @return MultiBulkReply
   */
  public Promise<MultiBulkReply> smembers(Object key0) {
    if (version < SMEMBERS_VERSION) return new Promise<>(new RedisException("Server does not support SMEMBERS"));
    return execute(MultiBulkReply.class, new Command(SMEMBERS_BYTES, key0));
  }
View Full Code Here

   * @param member2
   * @return IntegerReply
   */
  public Promise<IntegerReply> smove(Object source0, Object destination1, Object member2) {
    if (version < SMOVE_VERSION) return new Promise<>(new RedisException("Server does not support SMOVE"));
    return execute(IntegerReply.class, new Command(SMOVE_BYTES, source0, destination1, member2));
  }
View Full Code Here

   * @param key0
   * @return BulkReply
   */
  public Promise<BulkReply> spop(Object key0) {
    if (version < SPOP_VERSION) return new Promise<>(new RedisException("Server does not support SPOP"));
    return execute(BulkReply.class, new Command(SPOP_BYTES, key0));
  }
View Full Code Here

   * @param count1
   * @return Reply
   */
  public Promise<Reply> srandmember(Object key0, Object count1) {
    if (version < SRANDMEMBER_VERSION) return new Promise<>(new RedisException("Server does not support SRANDMEMBER"));
    return execute(Reply.class, new Command(SRANDMEMBER_BYTES, key0, count1));
  }
View Full Code Here

  }

  // Varargs version to simplify commands with optional or multiple arguments
  public Promise<Reply> srandmember_(Object... arguments) {
    if (version < SRANDMEMBER_VERSION) return new Promise<>(new RedisException("Server does not support SRANDMEMBER"));
    return execute(Reply.class, new Command(SRANDMEMBER_BYTES, arguments));
  }
View Full Code Here

  public Promise<IntegerReply> srem(Object key0, Object[] member1) {
    if (version < SREM_VERSION) return new Promise<>(new RedisException("Server does not support SREM"));
    List<Object> list = new ArrayList<>();
    list.add(key0);
    Collections.addAll(list, member1);
    return execute(IntegerReply.class, new Command(SREM_BYTES, list.toArray(new Object[list.size()])));
  }
View Full Code Here

  }

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

   */
  public Promise<MultiBulkReply> sunion(Object[] key0) {
    if (version < SUNION_VERSION) return new Promise<>(new RedisException("Server does not support SUNION"));
    List<Object> list = new ArrayList<>();
    Collections.addAll(list, key0);
    return execute(MultiBulkReply.class, new Command(SUNION_BYTES, list.toArray(new Object[list.size()])));
  }
View Full Code Here

  }

  // Varargs version to simplify commands with optional or multiple arguments
  public Promise<MultiBulkReply> sunion_(Object... arguments) {
    if (version < SUNION_VERSION) return new Promise<>(new RedisException("Server does not support SUNION"));
    return execute(MultiBulkReply.class, new Command(SUNION_BYTES, arguments));
  }
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.