Package redis

Examples of redis.Command


   * @param value1
   * @return IntegerReply
   */
  public Promise<IntegerReply> lpushx(Object key0, Object value1) {
    if (version < LPUSHX_VERSION) return new Promise<>(new RedisException("Server does not support LPUSHX"));
    return execute(IntegerReply.class, new Command(LPUSHX_BYTES, key0, value1));
  }
View Full Code Here


   * @param stop2
   * @return MultiBulkReply
   */
  public Promise<MultiBulkReply> lrange(Object key0, Object start1, Object stop2) {
    if (version < LRANGE_VERSION) return new Promise<>(new RedisException("Server does not support LRANGE"));
    return execute(MultiBulkReply.class, new Command(LRANGE_BYTES, key0, start1, stop2));
  }
View Full Code Here

   * @param value2
   * @return IntegerReply
   */
  public Promise<IntegerReply> lrem(Object key0, Object count1, Object value2) {
    if (version < LREM_VERSION) return new Promise<>(new RedisException("Server does not support LREM"));
    return execute(IntegerReply.class, new Command(LREM_BYTES, key0, count1, value2));
  }
View Full Code Here

   * @param value2
   * @return StatusReply
   */
  public Promise<StatusReply> lset(Object key0, Object index1, Object value2) {
    if (version < LSET_VERSION) return new Promise<>(new RedisException("Server does not support LSET"));
    return execute(StatusReply.class, new Command(LSET_BYTES, key0, index1, value2));
  }
View Full Code Here

   * @param stop2
   * @return StatusReply
   */
  public Promise<StatusReply> ltrim(Object key0, Object start1, Object stop2) {
    if (version < LTRIM_VERSION) return new Promise<>(new RedisException("Server does not support LTRIM"));
    return execute(StatusReply.class, new Command(LTRIM_BYTES, key0, start1, stop2));
  }
View Full Code Here

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

   * @param destination1
   * @return BulkReply
   */
  public Promise<BulkReply> rpoplpush(Object source0, Object destination1) {
    if (version < RPOPLPUSH_VERSION) return new Promise<>(new RedisException("Server does not support RPOPLPUSH"));
    return execute(BulkReply.class, new Command(RPOPLPUSH_BYTES, source0, destination1));
  }
View Full Code Here

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

  }

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

   * @param value1
   * @return IntegerReply
   */
  public Promise<IntegerReply> rpushx(Object key0, Object value1) {
    if (version < RPUSHX_VERSION) return new Promise<>(new RedisException("Server does not support RPUSHX"));
    return execute(IntegerReply.class, new Command(RPUSHX_BYTES, key0, value1));
  }
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.