All Downloads are FREE. Search and download functionalities are using the official Maven repository.

redis.clients.jedis.commands.BinaryJedisClusterCommands Maven / Gradle / Ivy

package redis.clients.jedis.commands;

import redis.clients.jedis.*;
import redis.clients.jedis.params.*;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface BinaryJedisClusterCommands {
  String set(byte[] key, byte[] value);

  String set(byte[] key, byte[] value, SetParams params);

  byte[] get(byte[] key);

  byte[] getDel(byte[] key);

  byte[] getEx(byte[] key, GetExParams params);

  Boolean exists(byte[] key);

  Long persist(byte[] key);

  String type(byte[] key);

  byte[] dump(byte[] key);

  /**
   * @deprecated Use {@link BinaryJedisClusterCommands#restore(byte[], long, byte[])}.
   */
  @Deprecated
  default String restore(byte[] key, int ttl, byte[] serializedValue) {
    return restore(key, (long) ttl, serializedValue);
  }

  String restore(byte[] key, long ttl, byte[] serializedValue);

  String restore(byte[] key, long ttl, byte[] serializedValue, RestoreParams params);

  Long expire(byte[] key, int seconds);

  Long pexpire(byte[] key, long milliseconds);

  Long expireAt(byte[] key, long unixTime);

  Long pexpireAt(byte[] key, long millisecondsTimestamp);

  Long ttl(byte[] key);

  Long pttl(byte[] key);

  Long touch(byte[] key);

  Boolean setbit(byte[] key, long offset, boolean value);

  Boolean setbit(byte[] key, long offset, byte[] value);

  Boolean getbit(byte[] key, long offset);

  Long setrange(byte[] key, long offset, byte[] value);

  byte[] getrange(byte[] key, long startOffset, long endOffset);

  byte[] getSet(byte[] key, byte[] value);

  Long setnx(byte[] key, byte[] value);

  /**
   * @deprecated Use {@link BinaryJedisClusterCommands#setex(byte[], long, byte[])}.
   */
  @Deprecated
  default String setex(byte[] key, int seconds, byte[] value) {
    return setex(key, (long) seconds, value);
  }

  String setex(byte[] key, long seconds, byte[] value);

  String psetex(byte[] key, long milliseconds, byte[] value);

  Long decrBy(byte[] key, long decrement);

  Long decr(byte[] key);

  Long incrBy(byte[] key, long increment);

  Double incrByFloat(byte[] key, double increment);

  Long incr(byte[] key);

  Long append(byte[] key, byte[] value);

  byte[] substr(byte[] key, int start, int end);

  Long hset(byte[] key, byte[] field, byte[] value);

  Long hset(byte[] key, Map hash);

  byte[] hget(byte[] key, byte[] field);

  Long hsetnx(byte[] key, byte[] field, byte[] value);

  String hmset(byte[] key, Map hash);

  List hmget(byte[] key, byte[]... fields);

  Long hincrBy(byte[] key, byte[] field, long value);

  Double hincrByFloat(byte[] key, byte[] field, double value);

  Boolean hexists(byte[] key, byte[] field);

  Long hdel(byte[] key, byte[]... field);

  Long hlen(byte[] key);

  Set hkeys(byte[] key);

  List hvals(byte[] key);

  Map hgetAll(byte[] key);

  byte[] hrandfield(byte[] key);

  List hrandfield(byte[] key, long count);

  Map hrandfieldWithValues(byte[] key, long count);

  Long rpush(byte[] key, byte[]... args);

  Long lpush(byte[] key, byte[]... args);

  Long llen(byte[] key);

  List lrange(byte[] key, long start, long stop);

  String ltrim(byte[] key, long start, long stop);

  byte[] lindex(byte[] key, long index);

  String lset(byte[] key, long index, byte[] value);

  Long lrem(byte[] key, long count, byte[] value);

  byte[] lpop(byte[] key);

  List lpop(byte[] key, int count);

  Long lpos(byte[] key, byte[] element);

  Long lpos(byte[] key, byte[] element, LPosParams params);

  List lpos(byte[] key, byte[] element, LPosParams params, long count);

  byte[] rpop(byte[] key);

  List rpop(byte[] key, int count);

  Long sadd(byte[] key, byte[]... member);

  Set smembers(byte[] key);

  Long srem(byte[] key, byte[]... member);

  byte[] spop(byte[] key);

  Set spop(byte[] key, long count);

  Long scard(byte[] key);

  Boolean sismember(byte[] key, byte[] member);

  List smismember(byte[] key, byte[]... members);

  byte[] srandmember(byte[] key);

  List srandmember(byte[] key, int count);

  Long strlen(byte[] key);

  Long zadd(byte[] key, double score, byte[] member);

  Long zadd(byte[] key, double score, byte[] member, ZAddParams params);

  Long zadd(byte[] key, Map scoreMembers);

  Long zadd(byte[] key, Map scoreMembers, ZAddParams params);

  Double zaddIncr(byte[] key, double score, byte[] member, ZAddParams params);

  Set zrange(byte[] key, long start, long stop);

  Long zrem(byte[] key, byte[]... members);

  Double zincrby(byte[] key, double increment, byte[] member);

  Double zincrby(byte[] key, double increment, byte[] member, ZIncrByParams params);

  Long zrank(byte[] key, byte[] member);

  Long zrevrank(byte[] key, byte[] member);

  Set zrevrange(byte[] key, long start, long stop);

  Set zrangeWithScores(byte[] key, long start, long stop);

  Set zrevrangeWithScores(byte[] key, long start, long stop);

  byte[] zrandmember(byte[] key);

  Set zrandmember(byte[] key, long count);

  Set zrandmemberWithScores(byte[] key, long count);

  Long zcard(byte[] key);

  Double zscore(byte[] key, byte[] member);

  List zmscore(byte[] key, byte[]... members);

  Tuple zpopmax(byte[] key);

  Set zpopmax(byte[] key, int count);

  Tuple zpopmin(byte[] key);

  Set zpopmin(byte[] key, int count);

  List sort(byte[] key);

  List sort(byte[] key, SortingParams sortingParameters);

  Long zcount(byte[] key, double min, double max);

  Long zcount(byte[] key, byte[] min, byte[] max);

  Set zrangeByScore(byte[] key, double min, double max);

  Set zrangeByScore(byte[] key, byte[] min, byte[] max);

  Set zrevrangeByScore(byte[] key, double max, double min);

  Set zrangeByScore(byte[] key, double min, double max, int offset, int count);

  Set zrevrangeByScore(byte[] key, byte[] max, byte[] min);

  Set zrangeByScore(byte[] key, byte[] min, byte[] max, int offset, int count);

  Set zrevrangeByScore(byte[] key, double max, double min, int offset, int count);

  Set zrangeByScoreWithScores(byte[] key, double min, double max);

  Set zrevrangeByScoreWithScores(byte[] key, double max, double min);

  Set zrangeByScoreWithScores(byte[] key, double min, double max, int offset, int count);

  Set zrevrangeByScore(byte[] key, byte[] max, byte[] min, int offset, int count);

  Set zrangeByScoreWithScores(byte[] key, byte[] min, byte[] max);

  Set zrevrangeByScoreWithScores(byte[] key, byte[] max, byte[] min);

  Set zrangeByScoreWithScores(byte[] key, byte[] min, byte[] max, int offset, int count);

  Set zrevrangeByScoreWithScores(byte[] key, double max, double min, int offset, int count);

  Set zrevrangeByScoreWithScores(byte[] key, byte[] max, byte[] min, int offset, int count);

  Long zremrangeByRank(byte[] key, long start, long stop);

  Long zremrangeByScore(byte[] key, double min, double max);

  Long zremrangeByScore(byte[] key, byte[] min, byte[] max);

  Long zlexcount(byte[] key, byte[] min, byte[] max);

  Set zrangeByLex(byte[] key, byte[] min, byte[] max);

  Set zrangeByLex(byte[] key, byte[] min, byte[] max, int offset, int count);

  Set zrevrangeByLex(byte[] key, byte[] max, byte[] min);

  Set zrevrangeByLex(byte[] key, byte[] max, byte[] min, int offset, int count);

  Long zremrangeByLex(byte[] key, byte[] min, byte[] max);

  Long linsert(byte[] key, ListPosition where, byte[] pivot, byte[] value);

  Long lpushx(byte[] key, byte[]... arg);

  Long rpushx(byte[] key, byte[]... arg);

  Long del(byte[] key);

  Long unlink(byte[] key);

  byte[] echo(byte[] arg);

  Long bitcount(byte[] key);

  Long bitcount(byte[] key, long start, long end);

  Long pfadd(byte[] key, byte[]... elements);

  long pfcount(byte[] key);

  // Geo Commands

  Long geoadd(byte[] key, double longitude, double latitude, byte[] member);

  Long geoadd(byte[] key, Map memberCoordinateMap);

  Long geoadd(byte[] key, GeoAddParams params, Map memberCoordinateMap);

  Double geodist(byte[] key, byte[] member1, byte[] member2);

  Double geodist(byte[] key, byte[] member1, byte[] member2, GeoUnit unit);

  List geohash(byte[] key, byte[]... members);

  List geopos(byte[] key, byte[]... members);

  List georadius(byte[] key, double longitude, double latitude, double radius, GeoUnit unit);

  List georadiusReadonly(byte[] key, double longitude, double latitude,
      double radius, GeoUnit unit);

  List georadius(byte[] key, double longitude, double latitude, double radius,
      GeoUnit unit, GeoRadiusParam param);

  List georadiusReadonly(byte[] key, double longitude, double latitude,
      double radius, GeoUnit unit, GeoRadiusParam param);

  List georadiusByMember(byte[] key, byte[] member, double radius, GeoUnit unit);

  List georadiusByMemberReadonly(byte[] key, byte[] member, double radius, GeoUnit unit);

  List georadiusByMember(byte[] key, byte[] member, double radius, GeoUnit unit,
      GeoRadiusParam param);

  List georadiusByMemberReadonly(byte[] key, byte[] member, double radius,
      GeoUnit unit, GeoRadiusParam param);

  ScanResult> hscan(byte[] key, byte[] cursor);

  ScanResult> hscan(byte[] key, byte[] cursor, ScanParams params);

  ScanResult sscan(byte[] key, byte[] cursor);

  ScanResult sscan(byte[] key, byte[] cursor, ScanParams params);

  ScanResult zscan(byte[] key, byte[] cursor);

  ScanResult zscan(byte[] key, byte[] cursor, ScanParams params);

  /**
   * Executes BITFIELD Redis command
   * @param key
   * @param arguments
   */
  List bitfield(byte[] key, byte[]... arguments);

  List bitfieldReadonly(byte[] key, byte[]... arguments);

  /**
   * Used for HSTRLEN Redis command
   * @param key
   * @param field
   * @return
   */
  Long hstrlen(byte[] key, byte[] field);

  byte[] xadd(byte[] key, byte[] id, Map hash, long maxLen, boolean approximateLength);

  byte[] xadd(byte[] key, Map hash, XAddParams params);

  Long xlen(byte[] key);

  List xrange(byte[] key, byte[] start, byte[] end);

  /**
   * @deprecated Use {@link BinaryJedisClusterCommands#xrange(byte[], byte[], byte[], int)}.
   */
  @Deprecated
  List xrange(byte[] key, byte[] start, byte[] end, long count);

  List xrange(byte[] key, byte[] start, byte[] end, int count);

  List xrevrange(byte[] key, byte[] end, byte[] start);

  List xrevrange(byte[] key, byte[] end, byte[] start, int count);

  Long xack(byte[] key, byte[] group, byte[]... ids);

  String xgroupCreate(byte[] key, byte[] consumer, byte[] id, boolean makeStream);

  String xgroupSetID(byte[] key, byte[] consumer, byte[] id);

  Long xgroupDestroy(byte[] key, byte[] consumer);

  Long xgroupDelConsumer(byte[] key, byte[] consumer, byte[] consumerName);

  Long xdel(byte[] key, byte[]... ids);

  Long xtrim(byte[] key, long maxLen, boolean approximateLength);

  Long xtrim(byte[] key, XTrimParams params);

  Object xpending(final byte[] key, final byte[] groupname);

  List xpending(byte[] key, byte[] groupname, byte[] start, byte[] end, int count, byte[] consumername);

  List xpending(byte[] key, byte[] groupname, XPendingParams params);

  List xclaim(byte[] key, byte[] groupname, byte[] consumername, long minIdleTime, long newIdleTime, int retries, boolean force, byte[][] ids);

  List xclaim(byte[] key, byte[] group, byte[] consumername, long minIdleTime,
      XClaimParams params, byte[]... ids);

  List xclaimJustId(byte[] key, byte[] group, byte[] consumername, long minIdleTime,
      XClaimParams params, byte[]... ids);

  List xautoclaim(byte[] key, byte[] groupName, byte[] consumerName,
      long minIdleTime, byte[] start, XAutoClaimParams params);

  List xautoclaimJustId(byte[] key, byte[] groupName, byte[] consumerName,
      long minIdleTime, byte[] start, XAutoClaimParams params);

  Long waitReplicas(byte[] key, int replicas, long timeout);

  Long memoryUsage(byte[] key);

  Long memoryUsage(byte[] key, int samples);
}