Class UnifiedJedis

java.lang.Object
redis.clients.jedis.UnifiedJedis
All Implemented Interfaces:
AutoCloseable, BloomFilterCommands, CountMinSketchCommands, CuckooFilterCommands, RedisBloomCommands, TDigestSketchCommands, TopKFilterCommands, BitBinaryCommands, BitCommands, FunctionBinaryCommands, FunctionCommands, GeoBinaryCommands, GeoCommands, HashBinaryCommands, HashCommands, HyperLogLogBinaryCommands, HyperLogLogCommands, JedisBinaryCommands, JedisCommands, KeyBinaryCommands, KeyCommands, ListBinaryCommands, ListCommands, RedisModuleCommands, SampleBinaryKeyedCommands, SampleKeyedCommands, ScriptingKeyBinaryCommands, ScriptingKeyCommands, SetBinaryCommands, SetCommands, SortedSetBinaryCommands, SortedSetCommands, StreamBinaryCommands, StreamCommands, StringBinaryCommands, StringCommands, RedisGraphCommands, RedisJsonCommands, RediSearchCommands, RedisTimeSeriesCommands
Direct Known Subclasses:
JedisCluster, JedisPooled, JedisSentineled, JedisSharding

  • Field Details

  • Constructor Details

  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • executeCommand

      public final <T> T executeCommand(CommandObject<T> commandObject)
    • broadcastCommand

      public final <T> T broadcastCommand(CommandObject<T> commandObject)
    • checkAndBroadcastCommand

      private <T> T checkAndBroadcastCommand(CommandObject<T> commandObject)
    • setBroadcastAndRoundRobinConfig

      public void setBroadcastAndRoundRobinConfig(JedisBroadcastAndRoundRobinConfig config)
    • ping

      public String ping()
    • flushDB

      public String flushDB()
    • flushAll

      public String flushAll()
    • configSet

      public String configSet(String parameter, String value)
    • exists

      public boolean exists(String key)
      Description copied from interface: KeyCommands
      Exists Command Test if the specified key exist.

      Time complexity: O(1)

      Specified by:
      exists in interface KeyCommands
      Parameters:
      key -
      Returns:
      true if the key exists, false otherwise
    • exists

      public long exists(String... keys)
      Description copied from interface: KeyCommands
      Exists Command Test if the specified keys exist.

      Time complexity: O(N)

      Specified by:
      exists in interface KeyCommands
      Parameters:
      keys -
      Returns:
      The number of keys that exist from those specified as keys.
    • persist

      public long persist(String key)
      Description copied from interface: KeyCommands
      Persist Command Undo a expire at turning the expire key into a normal key.

      Time complexity: O(1)

      Specified by:
      persist in interface KeyCommands
      Parameters:
      key -
      Returns:
      1 if the key is now persist. 0 otherwise (only happens when key not set)
    • type

      public String type(String key)
      Description copied from interface: KeyCommands
      Type Command Return the type of the value stored at key in form of a string. The type can be one of "none", "string", "list", "set". "none" is returned if the key does not exist.

      Time complexity: O(1)

      Specified by:
      type in interface KeyCommands
      Parameters:
      key -
      Returns:
      "none" if the key does not exist, "string" if the key contains a String value, "list" if the key contains a List value, "set" if the key contains a Set value, "zset" if the key contains a Sorted Set value, "hash" if the key contains a Hash value
    • exists

      public boolean exists(byte[] key)
      Specified by:
      exists in interface KeyBinaryCommands
    • exists

      public long exists(byte[]... keys)
      Specified by:
      exists in interface KeyBinaryCommands
    • persist

      public long persist(byte[] key)
      Specified by:
      persist in interface KeyBinaryCommands
    • type

      public String type(byte[] key)
      Specified by:
      type in interface KeyBinaryCommands
    • dump

      public byte[] dump(String key)
      Description copied from interface: KeyCommands
      Dump Command Serialize the value stored at key in a Redis-specific format and return it to the user.

      Time complexity: O(1) to access the key and additional O(N*M) to serialize it where N is the number of Redis objects composing the value and M their average size.

      Specified by:
      dump in interface KeyCommands
      Parameters:
      key -
      Returns:
      The serialized value
    • restore

      public String restore(String key, long ttl, byte[] serializedValue)
      Description copied from interface: KeyCommands
      Restore Command Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained via DUMP).

      Time complexity: O(1) to access the key and additional O(N*M) to serialize it where N is the number of Redis objects composing the value and M their average size.

      Specified by:
      restore in interface KeyCommands
      Parameters:
      key -
      ttl - If ttl is 0 the key is created without any expire, otherwise the specified expire time (in milliseconds) is set.
      serializedValue -
      Returns:
      OK
    • restore

      public String restore(String key, long ttl, byte[] serializedValue, RestoreParams params)
      Description copied from interface: KeyCommands
      Restore Command Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained via DUMP).

      Time complexity: O(1) to access the key and additional O(N*M) to serialize it where N is the number of Redis objects composing the value and M their average size.

      Specified by:
      restore in interface KeyCommands
      Parameters:
      key -
      ttl - If ttl is 0 the key is created without any expire, otherwise the specified expire time (in milliseconds) is set.
      serializedValue -
      params - RestoreParams
      Returns:
      OK
    • dump

      public byte[] dump(byte[] key)
      Specified by:
      dump in interface KeyBinaryCommands
    • restore

      public String restore(byte[] key, long ttl, byte[] serializedValue)
      Specified by:
      restore in interface KeyBinaryCommands
    • restore

      public String restore(byte[] key, long ttl, byte[] serializedValue, RestoreParams params)
      Specified by:
      restore in interface KeyBinaryCommands
    • expire

      public long expire(String key, long seconds)
      Description copied from interface: KeyCommands
      Expire Command Set a timeout on the specified key. After the timeout the key will be automatically deleted by the server. A key with an associated timeout is said to be volatile in Redis terminology.

      Volatile keys are stored on disk like the other keys, the timeout is persistent too like all the other aspects of the dataset. Saving a dataset containing expires and stopping the server does not stop the flow of time as Redis stores on disk the time when the key will no longer be available as Unix time, and not the remaining seconds.

      Since Redis 2.1.3 you can update the value of the timeout of a key already having an expire set. It is also possible to undo the expire at all turning the key into a normal key using the PERSIST command.

      Time complexity: O(1)

      Specified by:
      expire in interface KeyCommands
      Parameters:
      key -
      seconds - time to expire
      Returns:
      1 if the timeout was set, 0 otherwise. Since the key already has an associated timeout (this may happen only in Redis versions < 2.1.3, Redis >= 2.1.3 will happily update the timeout), or the key does not exist.
    • expire

      public long expire(String key, long seconds, ExpiryOption expiryOption)
      Description copied from interface: KeyCommands
      Similar to EXPIRE but with optional expiry setting.
      Specified by:
      expire in interface KeyCommands
      Parameters:
      key -
      seconds - time to expire
      expiryOption - can be NX, XX, GT or LT
      Returns:
      1 if the timeout was set, 0 otherwise. Since the key already has an associated timeout (this may happen only in Redis versions < 2.1.3, Redis >= 2.1.3 will happily update the timeout), or the key does not exist.
      See Also:
    • pexpire

      public long pexpire(String key, long milliseconds)
      Description copied from interface: KeyCommands
      PExpire Command This command works exactly like EXPIRE but the time to live of the key is specified in milliseconds instead of seconds.

      Time complexity: O(1)

      Specified by:
      pexpire in interface KeyCommands
      Parameters:
      key -
      milliseconds - time to expire
      Returns:
      1 if the timeout was set, 0 otherwise. e.g. key doesn't exist, or operation skipped due to the provided arguments.
    • pexpire

      public long pexpire(String key, long milliseconds, ExpiryOption expiryOption)
      Description copied from interface: KeyCommands
      Similar to EXPIRE but with optional expiry setting.
      Specified by:
      pexpire in interface KeyCommands
      Parameters:
      key -
      milliseconds - time to expire
      expiryOption - can be NX, XX, GT or LT
      Returns:
      1 if the timeout was set, 0 otherwise. e.g. key doesn't exist, or operation skipped due to the provided arguments.
      See Also:
    • expireTime

      public long expireTime(String key)
      Description copied from interface: KeyCommands
      ExpireTime Command Returns the absolute Unix timestamp (since January 1, 1970) in seconds at which the given key will expire.

      The command returns -1 if the key exists but has no associated expiration time, and -2 if the key does not exist.

      Time complexity: O(1)

      Specified by:
      expireTime in interface KeyCommands
      Parameters:
      key -
      Returns:
      Expiration Unix timestamp in seconds, or a negative value in order to signal an error: -1 if the key exists but has no associated expiration time, and -2 if the key does not exist.
    • pexpireTime

      public long pexpireTime(String key)
      Description copied from interface: KeyCommands
      PExpireTime Command Similar to EXPIRETIME but returns the absolute Unix expiration timestamp in milliseconds instead of seconds.

      Time complexity: O(1)

      Specified by:
      pexpireTime in interface KeyCommands
      Parameters:
      key -
      Returns:
      Expiration Unix timestamp in milliseconds, or a negative value in order to signal an error: -1 if the key exists but has no associated expiration time, and -2 if the key does not exist.
      See Also:
    • expireAt

      public long expireAt(String key, long unixTime)
      Description copied from interface: KeyCommands
      ExpireAt Command EXPIREAT works exactly like EXPIRE but instead to get the number of seconds representing the Time To Live of the key as a second argument (that is a relative way of specifying the TTL), it takes an absolute one in the form of a UNIX timestamp (Number of seconds elapsed since 1 Gen 1970).

      EXPIREAT was introduced in order to implement the Append Only File persistence mode so that EXPIRE commands are automatically translated into EXPIREAT commands for the append only file. Of course EXPIREAT can also used by programmers that need a way to simply specify that a given key should expire at a given time in the future.

      Time complexity: O(1)

      Specified by:
      expireAt in interface KeyCommands
      Parameters:
      key -
      unixTime - time to expire
      Returns:
      1 if the timeout was set, 0 otherwise. e.g. key doesn't exist, or operation skipped due to the provided arguments.
    • expireAt

      public long expireAt(String key, long unixTime, ExpiryOption expiryOption)
      Description copied from interface: KeyCommands
      ExpireAt Command Similar to EXPIREAT but with ExpiryOption.
      Specified by:
      expireAt in interface KeyCommands
      Parameters:
      key -
      unixTime - time to expire
      expiryOption - can be NX, XX, GT or LT
      Returns:
      1 if the timeout was set, 0 otherwise. e.g. key doesn't exist, or operation skipped due to the provided arguments.
      See Also:
    • pexpireAt

      public long pexpireAt(String key, long millisecondsTimestamp)
      Description copied from interface: KeyCommands
      PExpireAt Command This command works exactly like EXPIREAT but Unix time at which the key will expire is specified in milliseconds instead of seconds.

      Time complexity: O(1)

      Specified by:
      pexpireAt in interface KeyCommands
      Parameters:
      key -
      millisecondsTimestamp - time to expire
      Returns:
      1 if the timeout was set, 0 otherwise. e.g. key doesn't exist, or operation skipped due to the provided arguments.
    • pexpireAt

      public long pexpireAt(String key, long millisecondsTimestamp, ExpiryOption expiryOption)
      Description copied from interface: KeyCommands
      ExpireAt Command Similar to PEXPIREAT but with ExpiryOption.
      Specified by:
      pexpireAt in interface KeyCommands
      Parameters:
      key -
      millisecondsTimestamp - time to expire
      expiryOption - can be NX, XX, GT or LT
      Returns:
      1 if the timeout was set, 0 otherwise. e.g. key doesn't exist, or operation skipped due to the provided arguments.
      See Also:
    • expire

      public long expire(byte[] key, long seconds)
      Specified by:
      expire in interface KeyBinaryCommands
    • expire

      public long expire(byte[] key, long seconds, ExpiryOption expiryOption)
      Specified by:
      expire in interface KeyBinaryCommands
    • pexpire

      public long pexpire(byte[] key, long milliseconds)
      Specified by:
      pexpire in interface KeyBinaryCommands
    • pexpire

      public long pexpire(byte[] key, long milliseconds, ExpiryOption expiryOption)
      Specified by:
      pexpire in interface KeyBinaryCommands
    • expireTime

      public long expireTime(byte[] key)
      Specified by:
      expireTime in interface KeyBinaryCommands
    • pexpireTime

      public long pexpireTime(byte[] key)
      Specified by:
      pexpireTime in interface KeyBinaryCommands
    • expireAt

      public long expireAt(byte[] key, long unixTime)
      Specified by:
      expireAt in interface KeyBinaryCommands
    • expireAt

      public long expireAt(byte[] key, long unixTime, ExpiryOption expiryOption)
      Specified by:
      expireAt in interface KeyBinaryCommands
    • pexpireAt

      public long pexpireAt(byte[] key, long millisecondsTimestamp)
      Specified by:
      pexpireAt in interface KeyBinaryCommands
    • pexpireAt

      public long pexpireAt(byte[] key, long millisecondsTimestamp, ExpiryOption expiryOption)
      Specified by:
      pexpireAt in interface KeyBinaryCommands
    • ttl

      public long ttl(String key)
      Description copied from interface: KeyCommands
      TTL Command The TTL command returns the remaining time to live in seconds of a key that has an EXPIRE set. This introspection capability allows a Redis connection to check how many seconds a given key will continue to be part of the dataset.

      Time complexity: O(1)

      Specified by:
      ttl in interface KeyCommands
      Parameters:
      key -
      Returns:
      TTL in seconds, or a negative value in order to signal an error
    • pttl

      public long pttl(String key)
      Description copied from interface: KeyCommands
      PTTL Command The PTTL command returns the remaining time to live in milliseconds of a key that has an EXPIRE set.

      Time complexity: O(1)

      Specified by:
      pttl in interface KeyCommands
      Parameters:
      key -
      Returns:
      TTL in milliseconds, or a negative value in order to signal an error
    • touch

      public long touch(String key)
      Description copied from interface: KeyCommands
      Touch Command Alters the last access time of a key. A key is ignored if it does not exist.

      Time complexity: O(N) where N is the number of keys that will be touched.

      Specified by:
      touch in interface KeyCommands
      Parameters:
      key -
      Returns:
      The number of keys that were touched
    • touch

      public long touch(String... keys)
      Description copied from interface: KeyCommands
      Touch Command Alters the last access time of a key(s). A key is ignored if it does not exist.

      Time complexity: O(N) where N is the number of keys that will be touched.

      Specified by:
      touch in interface KeyCommands
      Parameters:
      keys -
      Returns:
      The number of keys that were touched
    • ttl

      public long ttl(byte[] key)
      Specified by:
      ttl in interface KeyBinaryCommands
    • pttl

      public long pttl(byte[] key)
      Specified by:
      pttl in interface KeyBinaryCommands
    • touch

      public long touch(byte[] key)
      Specified by:
      touch in interface KeyBinaryCommands
    • touch

      public long touch(byte[]... keys)
      Specified by:
      touch in interface KeyBinaryCommands
    • sort

      public List<String> sort(String key)
      Description copied from interface: KeyCommands
      Sort Command Sort a Set or a List.

      Sort the elements contained in the List, Set, or Sorted Set values at key. By default, sorting is numeric with elements being compared as double precision floating point numbers. This is the simplest form of SORT.

      Specified by:
      sort in interface KeyCommands
      Parameters:
      key -
      Returns:
      Assuming the Set/List at key contains a list of numbers, the return value will be the list of numbers ordered from the smallest to the biggest number.
      See Also:
    • sort

      public List<String> sort(String key, SortingParams sortingParams)
      Description copied from interface: KeyCommands
      Sort a Set or a List accordingly to the specified parameters.

      examples:

      Given are the following sets and key/values:

       x = [1, 2, 3]
       y = [a, b, c]
      
       k1 = z
       k2 = y
       k3 = x
      
       w1 = 9
       w2 = 8
       w3 = 7
       
      Sort Order:
       sort(x) or sort(x, sp.asc())
       -> [1, 2, 3]
      
       sort(x, sp.desc())
       -> [3, 2, 1]
      
       sort(y)
       -> [c, a, b]
      
       sort(y, sp.alpha())
       -> [a, b, c]
      
       sort(y, sp.alpha().desc())
       -> [c, a, b]
       
      Limit (e.g. for Pagination):
       sort(x, sp.limit(0, 2))
       -> [1, 2]
      
       sort(y, sp.alpha().desc().limit(1, 2))
       -> [b, a]
       
      Sorting by external keys:
       sort(x, sb.by(w*))
       -> [3, 2, 1]
      
       sort(x, sb.by(w*).desc())
       -> [1, 2, 3]
       
      Getting external keys:
       sort(x, sp.by(w*).get(k*))
       -> [x, y, z]
      
       sort(x, sp.by(w*).get(#).get(k*))
       -> [3, x, 2, y, 1, z]
       
      Specified by:
      sort in interface KeyCommands
      Parameters:
      key -
      sortingParams - SortingParams
      Returns:
      A list of sorted elements
    • sort

      public long sort(String key, String dstkey)
      Description copied from interface: KeyCommands
      Similar to SORT but store the result in dstkey.
      Specified by:
      sort in interface KeyCommands
      Parameters:
      key -
      dstkey -
      Returns:
      The number of elements stored at dstkey.
      See Also:
    • sort

      public long sort(String key, SortingParams sortingParams, String dstkey)
      Description copied from interface: KeyCommands
      Similar to SORT but store the result in dstkey.
      Specified by:
      sort in interface KeyCommands
      Parameters:
      key -
      sortingParams - SortingParams
      dstkey -
      Returns:
      The number of elements stored at dstkey
      See Also:
    • sortReadonly

      public List<String> sortReadonly(String key, SortingParams sortingParams)
      Description copied from interface: KeyCommands
      Read-only variant of the SORT command. It is exactly like the original SORT but refuses the STORE option and can safely be used in read-only replicas.
      Specified by:
      sortReadonly in interface KeyCommands
      Parameters:
      key - the key to sort
      sortingParams - SortingParams
      Returns:
      list of sorted elements.
    • sort

      public List<byte[]> sort(byte[] key)
      Specified by:
      sort in interface KeyBinaryCommands
    • sort

      public List<byte[]> sort(byte[] key, SortingParams sortingParams)
      Specified by:
      sort in interface KeyBinaryCommands
    • sort

      public long sort(byte[] key, byte[] dstkey)
      Specified by:
      sort in interface KeyBinaryCommands
    • sortReadonly

      public List<byte[]> sortReadonly(byte[] key, SortingParams sortingParams)
      Specified by:
      sortReadonly in interface KeyBinaryCommands
    • sort

      public long sort(byte[] key, SortingParams sortingParams, byte[] dstkey)
      Specified by:
      sort in interface KeyBinaryCommands
    • del

      public long del(String key)
      Description copied from interface: KeyCommands
      Del Command Remove the specified key. If a given key does not exist, no operation is performed.

      Time complexity: O(1)

      Specified by:
      del in interface KeyCommands
      Parameters:
      key -
      Returns:
      1 if the key was removed, 0 if the key does not exist
    • del

      public long del(String... keys)
      Description copied from interface: KeyCommands
      Remove the specified keys. If a given key does not exist, no operation is performed.

      Time complexity: O(N)

      Specified by:
      del in interface KeyCommands
      Parameters:
      keys -
      Returns:
      An integer greater than 0 if one or more keys were removed, 0 if none of the specified keys existed
    • unlink

      public long unlink(String key)
      Description copied from interface: KeyCommands
      Unlink Command This command is very similar to DEL: it removes the specified key. Just like DEL a key is ignored if it does not exist. However, the command performs the actual memory reclaiming in a different thread, so it is not blocking, while DEL is. This is where the command name comes from: the command just unlinks the keys from the keyspace. The actual removal will happen later asynchronously.

      Time complexity: O(1) for each key removed regardless of its size. Then the command does O(N) work in a different thread in order to reclaim memory, where N is the number of allocations the deleted objects where composed of.

      Specified by:
      unlink in interface KeyCommands
      Parameters:
      key -
      Returns:
      The number of keys that were unlinked
    • unlink

      public long unlink(String... keys)
      Description copied from interface: KeyCommands
      Similar to SORT but can be used with multiple keys.
      Specified by:
      unlink in interface KeyCommands
      Parameters:
      keys -
      Returns:
      The number of keys that were unlinked
      See Also:
    • del

      public long del(byte[] key)
      Specified by:
      del in interface KeyBinaryCommands
    • del

      public long del(byte[]... keys)
      Specified by:
      del in interface KeyBinaryCommands
    • unlink

      public long unlink(byte[] key)
      Specified by:
      unlink in interface KeyBinaryCommands
    • unlink

      public long unlink(byte[]... keys)
      Specified by:
      unlink in interface KeyBinaryCommands
    • memoryUsage

      public Long memoryUsage(String key)
      Description copied from interface: KeyCommands
      Memory Usage Command Report the number of bytes that a key and its value require to be stored in RAM.

      Time complexity: O(1)

      Specified by:
      memoryUsage in interface KeyCommands
      Parameters:
      key -
      Returns:
      The memory usage in bytes
    • memoryUsage

      public Long memoryUsage(String key, int samples)
      Description copied from interface: KeyCommands
      Memory Usage Command Report the number of bytes that a key and its value require to be stored in RAM.

      Time complexity: O(1)

      Specified by:
      memoryUsage in interface KeyCommands
      Parameters:
      key -
      samples - the number of sampled nested values. By default, this option is set to 5. To sample the all the nested values, use 0.
      Returns:
      The memory usage in bytes
    • memoryUsage

      public Long memoryUsage(byte[] key)
      Specified by:
      memoryUsage in interface KeyBinaryCommands
    • memoryUsage

      public Long memoryUsage(byte[] key, int samples)
      Specified by:
      memoryUsage in interface KeyBinaryCommands
    • copy

      public boolean copy(String srcKey, String dstKey, boolean replace)
      Description copied from interface: KeyCommands
      Copy Command Copy the value stored at the source key to the destination key.
      Specified by:
      copy in interface KeyCommands
      Parameters:
      srcKey - the source key.
      dstKey - the destination key.
      replace - removes the destination key before copying the value to it, in order to avoid error.
      Returns:
      true if source was copied, false otherwise
    • rename

      public String rename(String oldkey, String newkey)
      Description copied from interface: KeyCommands
      Rename Command Atomically renames the key oldkey to newkey. If the source and destination name are the same an error is returned. If newkey already exists it is overwritten.

      Time complexity: O(1)

      Specified by:
      rename in interface KeyCommands
      Parameters:
      oldkey -
      newkey -
      Returns:
      OK
    • renamenx

      public long renamenx(String oldkey, String newkey)
      Description copied from interface: KeyCommands
      RenameNX Command Rename oldkey into newkey but fails if the destination key newkey already exists.

      Time complexity: O(1)

      Specified by:
      renamenx in interface KeyCommands
      Parameters:
      oldkey -
      newkey -
      Returns:
      1 if the key was renamed, 0 if the target key already exist
    • copy

      public boolean copy(byte[] srcKey, byte[] dstKey, boolean replace)
      Specified by:
      copy in interface KeyBinaryCommands
    • rename

      public String rename(byte[] oldkey, byte[] newkey)
      Specified by:
      rename in interface KeyBinaryCommands
    • renamenx

      public long renamenx(byte[] oldkey, byte[] newkey)
      Specified by:
      renamenx in interface KeyBinaryCommands
    • dbSize

      public long dbSize()
    • keys

      public Set<String> keys(String pattern)
      Description copied from interface: KeyCommands
      Keys Command Returns all the keys matching the glob-style pattern as space separated strings. For example if you have in the database the keys "foo" and "foobar" the command "KEYS foo*" will return "foo foobar".

      Note that while the time complexity for this operation is O(n) the constant times are pretty low. For example Redis running on an entry level laptop can scan a 1 million keys database in 40 milliseconds. Still it's better to consider this one of the slow commands that may ruin the DB performance if not used with care.

      In other words this command is intended only for debugging and special operations like creating a script to change the DB schema. Don't use it in your normal code. Use Redis Sets in order to group together a subset of objects.

      Glob style patterns examples:

      • h?llo will match hello hallo hhllo
      • h*llo will match hllo heeeello
      • h[ae]llo will match hello and hallo, but not hillo

      Use \ to escape special chars if you want to match them verbatim.

      Time complexity: O(n) (with n being the number of keys in the DB, and assuming keys and pattern of limited length)

      Specified by:
      keys in interface KeyCommands
      Parameters:
      pattern -
      Returns:
      List of keys matching the pattern.
    • scan

      public ScanResult<String> scan(String cursor)
      Specified by:
      scan in interface KeyCommands
    • scan

      public ScanResult<String> scan(String cursor, ScanParams params)
      Specified by:
      scan in interface KeyCommands
    • scan

      public ScanResult<String> scan(String cursor, ScanParams params, String type)
      Specified by:
      scan in interface KeyCommands
    • scanIteration

      public ScanIteration scanIteration(int batchCount, String match)
      Parameters:
      batchCount - COUNT for each batch execution
      match - pattern
      Returns:
      scan iteration
    • scanIteration

      public ScanIteration scanIteration(int batchCount, String match, String type)
      Parameters:
      batchCount - COUNT for each batch execution
      match - pattern
      type - key type
      Returns:
      scan iteration
    • keys

      public Set<byte[]> keys(byte[] pattern)
      Specified by:
      keys in interface KeyBinaryCommands
    • scan

      public ScanResult<byte[]> scan(byte[] cursor)
      Specified by:
      scan in interface KeyBinaryCommands
    • scan

      public ScanResult<byte[]> scan(byte[] cursor, ScanParams params)
      Specified by:
      scan in interface KeyBinaryCommands
    • scan

      public ScanResult<byte[]> scan(byte[] cursor, ScanParams params, byte[] type)
      Specified by:
      scan in interface KeyBinaryCommands
    • randomKey

      public String randomKey()
      Description copied from interface: KeyCommands
      RandomKey Command Return a randomly selected key from the currently selected DB.

      Time complexity: O(1)

      Specified by:
      randomKey in interface KeyCommands
      Returns:
      The random key, or nil when the database is empty
    • randomBinaryKey

      public byte[] randomBinaryKey()
      Specified by:
      randomBinaryKey in interface KeyBinaryCommands
    • set

      public String set(String key, String value)
      Description copied from interface: StringCommands
      Set Command Set the string value as value of the key. The string can't be longer than 1073741824 bytes (1 GB).

      Time complexity: O(1)

      Specified by:
      set in interface StringCommands
      Parameters:
      key -
      value -
      Returns:
      OK
    • set

      public String set(String key, String value, SetParams params)
      Description copied from interface: StringCommands
      Set Command Set the string value as value of the key. Can be used with optional params.

      Time complexity: O(1)

      Specified by:
      set in interface StringCommands
      Parameters:
      key -
      value -
      params - SetParams
      Returns:
      simple-string-reply OK if SET was executed correctly, or null if the SET operation was not performed because the user specified the NX or XX option but the condition was not met.
    • get

      public String get(String key)
      Description copied from interface: StringCommands
      Get Command Get the value of the specified key. If the key does not exist the special value 'nil' is returned. If the value stored at key is not a string an error is returned because GET can only handle string values.

      Time complexity: O(1)

      Specified by:
      get in interface StringCommands
      Parameters:
      key -
      Returns:
      The value stored in key
    • setGet

      public String setGet(String key, String value, SetParams params)
      Description copied from interface: StringCommands
      WARNING: SetParams.get() MUST NOT be used with this method.
      Specified by:
      setGet in interface StringCommands
    • getDel

      public String getDel(String key)
      Description copied from interface: StringCommands
      GetDel Command Get the value of key and delete the key. This command is similar to GET, except for the fact that it also deletes the key on success (if and only if the key's value type is a string).

      Time complexity: O(1)

      Specified by:
      getDel in interface StringCommands
      Parameters:
      key -
      Returns:
      The value stored in key
    • getEx

      public String getEx(String key, GetExParams params)
      Description copied from interface: StringCommands
      GetEx Command Get the value of key and optionally set its expiration. GETEX is similar to GET, but is a write command with additional options: EX seconds -- Set the specified expire time, in seconds. PX milliseconds -- Set the specified expire time, in milliseconds. EXAT timestamp-seconds -- Set the specified Unix time at which the key will expire, in seconds. PXAT timestamp-milliseconds -- Set the specified Unix time at which the key will expire, in milliseconds. PERSIST -- Remove the time to live associated with the key.

      Time complexity: O(1)

      Specified by:
      getEx in interface StringCommands
      Parameters:
      key -
      params - GetExParams
      Returns:
      The value stored in key
    • set

      public String set(byte[] key, byte[] value)
      Specified by:
      set in interface StringBinaryCommands
    • set

      public String set(byte[] key, byte[] value, SetParams params)
      Specified by:
      set in interface StringBinaryCommands
    • get

      public byte[] get(byte[] key)
      Specified by:
      get in interface StringBinaryCommands
    • setGet

      public byte[] setGet(byte[] key, byte[] value, SetParams params)
      Description copied from interface: StringBinaryCommands
      WARNING: SetParams.get() MUST NOT be used with this method.
      Specified by:
      setGet in interface StringBinaryCommands
    • getDel

      public byte[] getDel(byte[] key)
      Specified by:
      getDel in interface StringBinaryCommands
    • getEx

      public byte[] getEx(byte[] key, GetExParams params)
      Specified by:
      getEx in interface StringBinaryCommands
    • setbit

      public boolean setbit(String key, long offset, boolean value)
      Description copied from interface: BitCommands
      SetBit Command Sets or clears the bit at offset in the string value stored at key.

      Time complexity: O(1)

      Specified by:
      setbit in interface BitCommands
      Parameters:
      key -
      offset -
      value -
      Returns:
      The original bit value stored at offset
    • getbit

      public boolean getbit(String key, long offset)
      Description copied from interface: BitCommands
      GetBit Command Returns the bit value at offset in the string value stored at key.

      Time complexity: O(1)

      Specified by:
      getbit in interface BitCommands
      Parameters:
      key -
      offset -
      Returns:
      The bit value stored at offset
    • setrange

      public long setrange(String key, long offset, String value)
      Description copied from interface: StringCommands
      SetRange Command GETRANGE overwrite part of the string stored at key, starting at the specified offset, for the entire length of value. If the offset is larger than the current length of the string at key, the string is padded with zero-bytes to make offset fit. Non-existing keys are considered as empty strings, so this command will make sure it holds a string large enough to be able to set value at offset.

      Time complexity: O(1)

      Specified by:
      setrange in interface StringCommands
      Parameters:
      key -
      offset -
      value -
      Returns:
      The length of the string after it was modified by the command
    • getrange

      public String getrange(String key, long startOffset, long endOffset)
      Description copied from interface: StringCommands
      GetRange Command Return the substring of the string value stored at key, determined by the offsets start and end (both are inclusive). Negative offsets can be used in order to provide an offset starting from the end of the string. So -1 means the last character, -2 the penultimate and so forth.

      Time complexity: O(N) where N is the length of the returned string

      Specified by:
      getrange in interface StringCommands
      Parameters:
      key -
      startOffset -
      endOffset -
      Returns:
      The substring
    • setbit

      public boolean setbit(byte[] key, long offset, boolean value)
      Specified by:
      setbit in interface BitBinaryCommands
    • getbit

      public boolean getbit(byte[] key, long offset)
      Specified by:
      getbit in interface BitBinaryCommands
    • setrange

      public long setrange(byte[] key, long offset, byte[] value)
      Specified by:
      setrange in interface StringBinaryCommands
    • getrange

      public byte[] getrange(byte[] key, long startOffset, long endOffset)
      Specified by:
      getrange in interface StringBinaryCommands
    • getSet

      public String getSet(String key, String value)
      Description copied from interface: StringCommands
      GetSet Command GETSET is an atomic set this value and return the old value command. Set key to the string value and return the old value stored at key. The string can't be longer than 1073741824 byte (1 GB).

      Time complexity: O(1)

      Specified by:
      getSet in interface StringCommands
      Parameters:
      key -
      value -
      Returns:
      The old value that was stored in key
    • setnx

      public long setnx(String key, String value)
      Description copied from interface: StringCommands
      SetNE Command SETNX works exactly like SET with the only difference that if the key already exists no operation is performed. SETNX actually means "SET if Not Exists".

      Time complexity: O(1)

      Specified by:
      setnx in interface StringCommands
      Parameters:
      key -
      value -
      Returns:
      1 if the key was set, 0 otherwise
    • setex

      public String setex(String key, long seconds, String value)
      Description copied from interface: StringCommands
      SetEx Command The command is exactly equivalent to the following group of commands: SET + EXPIRE. The operation is atomic.

      Time complexity: O(1)

      Specified by:
      setex in interface StringCommands
      Parameters:
      key -
      seconds -
      value -
      Returns:
      OK
    • psetex

      public String psetex(String key, long milliseconds, String value)
      Description copied from interface: StringCommands
      PSetEx Command PSETEX works exactly like SETEX with the sole difference that the expire time is specified in milliseconds instead of seconds.

      Time complexity: O(1)

      Specified by:
      psetex in interface StringCommands
      Parameters:
      key -
      milliseconds -
      value -
      Returns:
      OK
    • getSet

      public byte[] getSet(byte[] key, byte[] value)
      Specified by:
      getSet in interface StringBinaryCommands
    • setnx

      public long setnx(byte[] key, byte[] value)
      Specified by:
      setnx in interface StringBinaryCommands
    • setex

      public String setex(byte[] key, long seconds, byte[] value)
      Specified by:
      setex in interface StringBinaryCommands
    • psetex

      public String psetex(byte[] key, long milliseconds, byte[] value)
      Specified by:
      psetex in interface StringBinaryCommands
    • incr

      public long incr(String key)
      Description copied from interface: StringCommands
      Incr Command Increment the number stored at key by one. If the key does not exist or contains a value of a wrong type, set the key to the value of "0" before to perform the increment operation.

      INCR commands are limited to 64 bit signed integers.

      Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64 bit signed integer, incremented, and then converted back as a string.

      Time complexity: O(1)

      Specified by:
      incr in interface StringCommands
      Parameters:
      key - the key to increment
      Returns:
      The value of the key after the increment
    • incrBy

      public long incrBy(String key, long increment)
      Description copied from interface: StringCommands
      IncrBy Command INCRBY work just like INCR but instead to increment by 1 the increment is integer.

      INCR commands are limited to 64 bit signed integers.

      Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64 bit signed integer, incremented, and then converted back as a string.

      Time complexity: O(1)

      Specified by:
      incrBy in interface StringCommands
      Parameters:
      key - the key to increment
      increment - the value to increment by
      Returns:
      The value of the key after the increment
    • incrByFloat

      public double incrByFloat(String key, double increment)
      Description copied from interface: StringCommands
      IncrByFloat Command INCRBYFLOAT work just like StringCommands.incrBy(String, long) INCRBY} but increments by floats instead of integers.

      INCRBYFLOAT commands are limited to double precision floating point values.

      Note: this is actually a string operation, that is, in Redis there are not "double" types. Simply the string stored at the key is parsed as a base double precision floating point value, incremented, and then converted back as a string. There is no DECRYBYFLOAT but providing a negative value will work as expected.

      Time complexity: O(1)

      Specified by:
      incrByFloat in interface StringCommands
      Parameters:
      key - the key to increment
      increment - the value to increment by
      Returns:
      The value of the key after the increment
    • decr

      public long decr(String key)
      Description copied from interface: StringCommands
      Decr Command Decrement the number stored at key by one. If the key does not exist or contains a value of a wrong type, set the key to the value of "0" before to perform the decrement operation.

      DECR commands are limited to 64 bit signed integers.

      Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64 bit signed integer, incremented, and then converted back as a string.

      Time complexity: O(1)

      Specified by:
      decr in interface StringCommands
      Parameters:
      key - the key to decrement
      Returns:
      The value of the key after the decrement
    • decrBy

      public long decrBy(String key, long decrement)
      Description copied from interface: StringCommands
      DecrBy Command DECRBY work just like DECR but instead to decrement by 1 the decrement is integer.

      DECRBY commands are limited to 64 bit signed integers.

      Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64 bit signed integer, incremented, and then converted back as a string.

      Time complexity: O(1)

      Specified by:
      decrBy in interface StringCommands
      Parameters:
      key - the key to decrement
      decrement - the value to decrement by
      Returns:
      The value of the key after the decrement
    • incr

      public long incr(byte[] key)
      Specified by:
      incr in interface StringBinaryCommands
    • incrBy

      public long incrBy(byte[] key, long increment)
      Specified by:
      incrBy in interface StringBinaryCommands
    • incrByFloat

      public double incrByFloat(byte[] key, double increment)
      Specified by:
      incrByFloat in interface StringBinaryCommands
    • decr

      public long decr(byte[] key)
      Specified by:
      decr in interface StringBinaryCommands
    • decrBy

      public long decrBy(byte[] key, long decrement)
      Specified by:
      decrBy in interface StringBinaryCommands
    • mget

      public List<String> mget(String... keys)
      Description copied from interface: StringCommands
      MGet Command Get the values of all the specified keys. If one or more keys don't exist or is not of type String, a 'nil' value is returned instead of the value of the specified key, but the operation never fails.

      Time complexity: O(1) for every key

      Specified by:
      mget in interface StringCommands
      Parameters:
      keys -
      Returns:
      Multi bulk reply
    • mset

      public String mset(String... keysvalues)
      Description copied from interface: StringCommands
      MSet Command Set the the respective keys to the respective values. MSET will replace old values with new values, while MSETNX will not perform any operation at all even if just a single key already exists.

      Because of this semantic MSETNX can be used in order to set different keys representing different fields of an unique logic object in a way that ensures that either all the fields or none at all are set.

      Both MSET and MSETNX are atomic operations. This means that for instance if the keys A and B are modified, another connection talking to Redis can either see the changes to both A and B at once, or no modification at all.

      Specified by:
      mset in interface StringCommands
      Parameters:
      keysvalues - pairs of keys and their values e.g mset("foo", "foovalue", "bar", "barvalue")
      Returns:
      OK
    • msetnx

      public long msetnx(String... keysvalues)
      Description copied from interface: StringCommands
      MSetNX Command Set the respective keys to the respective values. MSET will replace old values with new values, while MSETNX will not perform any operation at all even if just a single key already exists.

      Because of this semantic MSETNX can be used in order to set different keys representing different fields of an unique logic object in a way that ensures that either all the fields or none at all are set.

      Both MSET and MSETNX are atomic operations. This means that for instance if the keys A and B are modified, another connection talking to Redis can either see the changes to both A and B at once, or no modification at all.

      Specified by:
      msetnx in interface StringCommands
      Parameters:
      keysvalues - pairs of keys and their values e.g msetnx("foo", "foovalue", "bar", "barvalue")
      Returns:
      1 if the all the keys were set, 0 if no key was set (at least one key already existed)
    • mget

      public List<byte[]> mget(byte[]... keys)
      Specified by:
      mget in interface StringBinaryCommands
    • mset

      public String mset(byte[]... keysvalues)
      Specified by:
      mset in interface StringBinaryCommands
    • msetnx

      public long msetnx(byte[]... keysvalues)
      Specified by:
      msetnx in interface StringBinaryCommands
    • append

      public long append(String key, String value)
      Description copied from interface: StringCommands
      Append Command If the key already exists and is a string, this command appends the provided value at the end of the string. If the key does not exist it is created and set as an empty string, so APPEND will be very similar to SET in this special case.

      Time complexity: O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by Redis will double the free space available on every reallocation.

      Specified by:
      append in interface StringCommands
      Parameters:
      key - the key to append to
      value - the value to append
      Returns:
      The total length of the string after the append operation.
    • substr

      public String substr(String key, int start, int end)
      Description copied from interface: StringCommands
      SubStr Command Return a subset of the string from offset start to offset end (both offsets are inclusive). Negative offsets can be used in order to provide an offset starting from the end of the string. So -1 means the last char, -2 the penultimate and so forth.

      The function handles out of range requests without raising an error, but just limiting the resulting range to the actual length of the string.

      Time complexity: O(start+n) (with start being the start index and n the total length of the requested range). Note that the lookup part of this command is O(1) so for small strings this is actually an O(1) command.

      Specified by:
      substr in interface StringCommands
      Parameters:
      key -
      start -
      end -
      Returns:
      The substring
    • strlen

      public long strlen(String key)
      Description copied from interface: StringCommands
      StrLen Command Return the length of the string value stored at key.
      Specified by:
      strlen in interface StringCommands
      Parameters:
      key -
      Returns:
      The length of the string at key, or 0 when key does not exist
    • append

      public long append(byte[] key, byte[] value)
      Specified by:
      append in interface StringBinaryCommands
    • substr

      public byte[] substr(byte[] key, int start, int end)
      Specified by:
      substr in interface StringBinaryCommands
    • strlen

      public long strlen(byte[] key)
      Specified by:
      strlen in interface StringBinaryCommands
    • bitcount

      public long bitcount(String key)
      Description copied from interface: BitCommands
      Bitcount Command Count the number of set bits (population counting) in a string.
      Specified by:
      bitcount in interface BitCommands
      Parameters:
      key -
      Returns:
      The number of bits set to 1
    • bitcount

      public long bitcount(String key, long start, long end)
      Description copied from interface: BitCommands
      Bitcount Command Count the number of set bits (population counting) in a string only in an interval start and end.

      Like for the GETRANGE command start and end can contain negative values in order to index bytes starting from the end of the string, where -1 is the last byte, -2 is the penultimate, and so forth.

      Specified by:
      bitcount in interface BitCommands
      Parameters:
      key -
      start - byte start index
      end - byte end index
      Returns:
      The number of bits set to 1
    • bitcount

      public long bitcount(String key, long start, long end, BitCountOption option)
      Specified by:
      bitcount in interface BitCommands
      Parameters:
      key -
      start - byte start index
      end - byte end index
      option - indicate BYTE or BIT
      Returns:
      The number of bits set to 1
      See Also:
    • bitpos

      public long bitpos(String key, boolean value)
      Description copied from interface: BitCommands
      Bitpos Command Return the position of the first bit set to 1 or 0 in a string.
      Specified by:
      bitpos in interface BitCommands
      Parameters:
      key -
      value - the bit value
      Returns:
      The position of the first bit set to 1 or 0 according to the request
    • bitpos

      public long bitpos(String key, boolean value, BitPosParams params)
      Description copied from interface: BitCommands
      Bitpos Command Return the position of the first bit set to 1 or 0 in a string.
      Specified by:
      bitpos in interface BitCommands
      Parameters:
      key -
      value - the bit value
      params - BitPosParams
      Returns:
      The position of the first bit set to 1 or 0 according to the request
    • bitcount

      public long bitcount(byte[] key)
      Specified by:
      bitcount in interface BitBinaryCommands
    • bitcount

      public long bitcount(byte[] key, long start, long end)
      Specified by:
      bitcount in interface BitBinaryCommands
    • bitcount

      public long bitcount(byte[] key, long start, long end, BitCountOption option)
      Specified by:
      bitcount in interface BitBinaryCommands
    • bitpos

      public long bitpos(byte[] key, boolean value)
      Specified by:
      bitpos in interface BitBinaryCommands
    • bitpos

      public long bitpos(byte[] key, boolean value, BitPosParams params)
      Specified by:
      bitpos in interface BitBinaryCommands
    • bitfield

      public List<Long> bitfield(String key, String... arguments)
      Description copied from interface: BitCommands
      Bitfield Command The command treats a Redis string as an array of bits, and is capable of addressing specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset.
      Specified by:
      bitfield in interface BitCommands
      Parameters:
      key -
      arguments - may be used with optional arguments
      Returns:
      A List of results
    • bitfieldReadonly

      public List<Long> bitfieldReadonly(String key, String... arguments)
      Description copied from interface: BitCommands
      The readonly version of BITFIELD
      Specified by:
      bitfieldReadonly in interface BitCommands
    • bitfield

      public List<Long> bitfield(byte[] key, byte[]... arguments)
      Specified by:
      bitfield in interface BitBinaryCommands
    • bitfieldReadonly

      public List<Long> bitfieldReadonly(byte[] key, byte[]... arguments)
      Specified by:
      bitfieldReadonly in interface BitBinaryCommands
    • bitop

      public long bitop(BitOP op, String destKey, String... srcKeys)
      Description copied from interface: BitCommands
      Bitop Command Perform a bitwise operation between multiple keys (containing string values) and store the result in the destKey.
      Specified by:
      bitop in interface BitCommands
      Parameters:
      op - can be AND, OR, XOR or NOT
      destKey -
      srcKeys -
      Returns:
      The size of the string stored in the destKey
    • bitop

      public long bitop(BitOP op, byte[] destKey, byte[]... srcKeys)
      Specified by:
      bitop in interface BitBinaryCommands
    • strAlgoLCSKeys

      public LCSMatchResult strAlgoLCSKeys(String keyA, String keyB, StrAlgoLCSParams params)
      Description copied from interface: StringCommands
      Calculate the longest common subsequence of keyA and keyB.
      Specified by:
      strAlgoLCSKeys in interface StringCommands
      Parameters:
      keyA -
      keyB -
      params -
      Returns:
      According to StrAlgoLCSParams to decide to return content to fill LCSMatchResult.
    • strAlgoLCSKeys

      public LCSMatchResult strAlgoLCSKeys(byte[] keyA, byte[] keyB, StrAlgoLCSParams params)
      Specified by:
      strAlgoLCSKeys in interface StringBinaryCommands
    • lcs

      public LCSMatchResult lcs(String keyA, String keyB, LCSParams params)
      Description copied from interface: StringCommands
      Calculate the longest common subsequence of keyA and keyB.
      Specified by:
      lcs in interface StringCommands
      Parameters:
      keyA -
      keyB -
      params -
      Returns:
      According to LCSParams to decide to return content to fill LCSMatchResult.
    • lcs

      public LCSMatchResult lcs(byte[] keyA, byte[] keyB, LCSParams params)
      Description copied from interface: StringBinaryCommands
      Calculate the longest common subsequence of keyA and keyB.
      Specified by:
      lcs in interface StringBinaryCommands
      Parameters:
      keyA -
      keyB -
      params -
      Returns:
      According to LCSParams to decide to return content to fill LCSMatchResult.
    • rpush

      public long rpush(String key, String... string)
      Description copied from interface: ListCommands
      Add the string value to the head (LPUSH) or tail (RPUSH) of the list stored at key. If the key does not exist an empty list is created just before the append operation. If the key exists but is not a List an error is returned.

      Time complexity: O(1)

      Specified by:
      rpush in interface ListCommands
      Parameters:
      key -
      string - data to push
      Returns:
      The number of elements inside the list after the push operation
    • lpush

      public long lpush(String key, String... string)
      Description copied from interface: ListCommands
      Add the string value to the head (LPUSH) or tail (RPUSH) of the list stored at key. If the key does not exist an empty list is created just before the append operation. If the key exists but is not a List an error is returned.

      Time complexity: O(1)

      Specified by:
      lpush in interface ListCommands
      Parameters:
      key -
      string - data to push
      Returns:
      The number of elements inside the list after the push operation
    • llen

      public long llen(String key)
      Description copied from interface: ListCommands
      Return the length of the list stored at the specified key. If the key does not exist zero is returned (the same behaviour as for empty lists). If the value stored at key is not a list an error is returned.

      Time complexity: O(1)

      Specified by:
      llen in interface ListCommands
      Parameters:
      key -
      Returns:
      The length of the list
    • lrange

      public List<String> lrange(String key, long start, long stop)
      Description copied from interface: ListCommands
      Return the specified elements of the list stored at the specified key. Start and end are zero-based indexes. 0 is the first element of the list (the list head), 1 the next element and so on.

      For example LRANGE foobar 0 2 will return the first three elements of the list.

      start and end can also be negative numbers indicating offsets from the end of the list. For example -1 is the last element of the list, -2 the penultimate element and so on.

      Consistency with range functions in various programming languages

      Note that if you have a list of numbers from 0 to 100, LRANGE 0 10 will return 11 elements, that is, rightmost item is included. This may or may not be consistent with behavior of range-related functions in your programming language of choice (think Ruby's Range.new, Array#slice or Python's range() function).

      LRANGE behavior is consistent with one of Tcl.

      Out-of-range indexes

      Indexes out of range will not produce an error: if start is over the end of the list, or start > end, an empty list is returned. If end is over the end of the list Redis will threat it just like the last element of the list.

      Time complexity: O(start+n) (with n being the length of the range and start being the start offset)

      Specified by:
      lrange in interface ListCommands
      Parameters:
      key -
      start -
      stop -
      Returns:
      A list of elements in the specified range
    • ltrim

      public String ltrim(String key, long start, long stop)
      Description copied from interface: ListCommands
      Trim an existing list so that it will contain only the specified range of elements specified. Start and end are zero-based indexes. 0 is the first element of the list (the list head), 1 the next element and so on.

      For example LTRIM foobar 0 2 will modify the list stored at foobar key so that only the first three elements of the list will remain.

      start and end can also be negative numbers indicating offsets from the end of the list. For example -1 is the last element of the list, -2 the penultimate element and so on.

      Indexes out of range will not produce an error: if start is over the end of the list, or start > end, an empty list is left as value. If end over the end of the list Redis will threat it just like the last element of the list.

      Hint: the obvious use of LTRIM is together with LPUSH/RPUSH. For example:

      lpush("mylist", "someelement"); ltrim("mylist", 0, 99); *

      The above two commands will push elements in the list taking care that the list will not grow without limits. This is very useful when using Redis to store logs for example. It is important to note that when used in this way LTRIM is an O(1) operation because in the average case just one element is removed from the tail of the list.

      Time complexity: O(n) (with n being len of list - len of range)

      Specified by:
      ltrim in interface ListCommands
      Parameters:
      key -
      start -
      stop -
      Returns:
      OK
    • lindex

      public String lindex(String key, long index)
      Description copied from interface: ListCommands
      Returns the element at index in the list stored at key. 0 is the first element, 1 the second and so on. Negative indexes are supported, for example -1 is the last element, -2 the penultimate and so on.

      If the value stored at key is not of list type an error is returned. If the index is out of range a 'nil' reply is returned.

      Note that even if the average time complexity is O(n) asking for the first or the last element of the list is O(1).

      Time complexity: O(n) (with n being the length of the list)

      Specified by:
      lindex in interface ListCommands
      Parameters:
      key -
      index -
      Returns:
      The requested element
    • rpush

      public long rpush(byte[] key, byte[]... args)
      Specified by:
      rpush in interface ListBinaryCommands
    • lpush

      public long lpush(byte[] key, byte[]... args)
      Specified by:
      lpush in interface ListBinaryCommands
    • llen

      public long llen(byte[] key)
      Specified by:
      llen in interface ListBinaryCommands
    • lrange

      public List<byte[]> lrange(byte[] key, long start, long stop)
      Specified by:
      lrange in interface ListBinaryCommands
    • ltrim

      public String ltrim(byte[] key, long start, long stop)
      Specified by:
      ltrim in interface ListBinaryCommands
    • lindex

      public byte[] lindex(byte[] key, long index)
      Specified by:
      lindex in interface ListBinaryCommands
    • lset

      public String lset(String key, long index, String value)
      Description copied from interface: ListCommands
      Set a new value as the element at index position of the List at key.

      Out of range indexes will generate an error.

      Similarly to other list commands accepting indexes, the index can be negative to access elements starting from the end of the list. So -1 is the last element, -2 is the penultimate, and so forth.

      Time Complexity O(N) when N being the length of the list. For the first or last elements of the list is O(1)

      Specified by:
      lset in interface ListCommands
      Parameters:
      key -
      index -
      value -
      Returns:
      OK
    • lrem

      public long lrem(String key, long count, String value)
      Description copied from interface: ListCommands
      Remove the first count occurrences of the value element from the list. If count is zero all the elements are removed. If count is negative elements are removed from tail to head, instead to go from head to tail that is the normal behaviour. So for example LREM with count -2 and hello as value to remove against the list (a,b,c,hello,x,hello,hello) will leave the list (a,b,c,hello,x). The number of removed elements is returned as an integer, see below for more information about the returned value. Note that non existing keys are considered like empty lists by LREM, so LREM against non existing keys will always return 0.

      Time complexity: O(N) (with N being the length of the list)

      Specified by:
      lrem in interface ListCommands
      Parameters:
      key -
      count -
      value -
      Returns:
      The number of removed elements if the operation succeeded
    • lpop

      public String lpop(String key)
      Description copied from interface: ListCommands
      Atomically return and remove the first (LPOP) or last (RPOP) element of the list. For example if the list contains the elements "a","b","c" LPOP will return "a" and the list will become "b","c".

      If the key does not exist or the list is already empty the special value 'nil' is returned.

      Specified by:
      lpop in interface ListCommands
      Parameters:
      key -
      Returns:
      The popped element
    • lpop

      public List<String> lpop(String key, int count)
      Description copied from interface: ListCommands
      Atomically return and remove the first (LPOP) or last (RPOP) element of the list. For example if the list contains the elements "a","b","c" LPOP will return "a" and the list will become "b","c".
      Specified by:
      lpop in interface ListCommands
      Parameters:
      key -
      count -
      Returns:
      A list of popped elements, or 'nil' when key does not exist
    • lset

      public String lset(byte[] key, long index, byte[] value)
      Specified by:
      lset in interface ListBinaryCommands
    • lrem

      public long lrem(byte[] key, long count, byte[] value)
      Specified by:
      lrem in interface ListBinaryCommands
    • lpop

      public byte[] lpop(byte[] key)
      Specified by:
      lpop in interface ListBinaryCommands
    • lpop

      public List<byte[]> lpop(byte[] key, int count)
      Specified by:
      lpop in interface ListBinaryCommands
    • lpos

      public Long lpos(String key, String element)
      Description copied from interface: ListCommands
      Returns the index of the first matching element inside a redis list. If the element is found, its index (the zero-based position in the list) is returned. Otherwise, if no match is found, 'nil' is returned.

      Time complexity: O(N) where N is the number of elements in the list

      Specified by:
      lpos in interface ListCommands
      Parameters:
      key -
      element -
      Returns:
      The index of first matching element in the list. Value will be 'nil' when the element is not present in the list
    • lpos

      public Long lpos(String key, String element, LPosParams params)
      Description copied from interface: ListCommands
      In case there are multiple matches Rank option specifies the "rank" of the element to return. A rank of 1 returns the first match, 2 to return the second match, and so forth. If list `foo` has elements ("a","b","c","1","2","3","c","c"), The function call to get the index of second occurrence of "c" will be as follows lpos("foo","c", LPosParams.lPosParams().rank(2)).

      Maxlen option compares the element provided only with a given maximum number of list items. A value of 1000 will make sure that the command performs only 1000 comparisons. The comparison is made for the first part or the last part depending on the fact we use a positive or negative rank. Following is how we could use the Maxlen option lpos("foo", "b", LPosParams.lPosParams().rank(1).maxlen(2)).

      Specified by:
      lpos in interface ListCommands
      Parameters:
      key -
      element -
      params - LPosParams
      Returns:
      The integer representing the matching element, or 'nil' if there is no match
    • lpos

      public List<Long> lpos(String key, String element, LPosParams params, long count)
      Description copied from interface: ListCommands
      Returns the index of matching elements inside a Redis list. If the element is found, its index (the zero-based position in the list) is returned. Otherwise, if no match is found, nil is returned.

      Time complexity: O(N) where N is the number of elements in the list

      Specified by:
      lpos in interface ListCommands
      Parameters:
      key -
      element -
      params - LPosParams
      count -
      Returns:
      A list containing position of the matching elements inside the list
    • lpos

      public Long lpos(byte[] key, byte[] element)
      Specified by:
      lpos in interface ListBinaryCommands
    • lpos

      public Long lpos(byte[] key, byte[] element, LPosParams params)
      Specified by:
      lpos in interface ListBinaryCommands
    • lpos

      public List<Long> lpos(byte[] key, byte[] element, LPosParams params, long count)
      Specified by:
      lpos in interface ListBinaryCommands
    • rpop

      public String rpop(String key)
      Description copied from interface: ListCommands
      Atomically return and remove the first (LPOP) or last (RPOP) element of the list. For example if the list contains the elements "a","b","c" LPOP will return "a" and the list will become "b","c".
      Specified by:
      rpop in interface ListCommands
      Parameters:
      key -
      Returns:
      The popped element
    • rpop

      public List<String> rpop(String key, int count)
      Description copied from interface: ListCommands
      Atomically return and remove the first (LPOP) or last (RPOP) element of the list. For example if the list contains the elements "a","b","c" LPOP will return "a" and the list will become "b","c".
      Specified by:
      rpop in interface ListCommands
      Parameters:
      key -
      count - return up to count elements
      Returns:
      A list of count popped elements, or 'nil' when key does not exist.
    • rpop

      public byte[] rpop(byte[] key)
      Specified by:
      rpop in interface ListBinaryCommands
    • rpop

      public List<byte[]> rpop(byte[] key, int count)
      Specified by:
      rpop in interface ListBinaryCommands
    • linsert

      public long linsert(String key, ListPosition where, String pivot, String value)
      Description copied from interface: ListCommands
      Inserts element in the list stored at key either before or after the reference value pivot.

      When key does not exist, it is considered an empty list and no operation is performed.

      Specified by:
      linsert in interface ListCommands
      Parameters:
      key -
      where - can be BEFORE or AFTER
      pivot - reference value
      value - the value
      Returns:
      The length of the list after the insert operation, or -1 when the value pivot was not found
    • lpushx

      public long lpushx(String key, String... strings)
      Description copied from interface: ListCommands
      Inserts specified values at the head of the list stored at key. In contrary to LPUSH, no operation will be performed when key does not yet exist.
      Specified by:
      lpushx in interface ListCommands
      Parameters:
      key -
      strings - the strings to push
      Returns:
      The length of the list after the push operation
    • rpushx

      public long rpushx(String key, String... strings)
      Description copied from interface: ListCommands
      Inserts specified values at the tail of the list stored at key. In contrary to RPUSH, no operation will be performed when key does not yet exist.
      Specified by:
      rpushx in interface ListCommands
      Parameters:
      key -
      strings - the strings to push
      Returns:
      The length of the list after the push operation
    • linsert

      public long linsert(byte[] key, ListPosition where, byte[] pivot, byte[] value)
      Specified by:
      linsert in interface ListBinaryCommands
    • lpushx

      public long lpushx(byte[] key, byte[]... args)
      Specified by:
      lpushx in interface ListBinaryCommands
    • rpushx

      public long rpushx(byte[] key, byte[]... args)
      Specified by:
      rpushx in interface ListBinaryCommands
    • blpop

      public List<String> blpop(int timeout, String key)
      Specified by:
      blpop in interface ListCommands
      See Also:
    • blpop

      public KeyedListElement blpop(double timeout, String key)
      Specified by:
      blpop in interface ListCommands
      See Also:
    • brpop

      public List<String> brpop(int timeout, String key)
      Specified by:
      brpop in interface ListCommands
      See Also:
    • brpop

      public KeyedListElement brpop(double timeout, String key)
      Specified by:
      brpop in interface ListCommands
      See Also:
    • blpop

      public List<String> blpop(int timeout, String... keys)
      Description copied from interface: ListCommands
      The blocking version of ListCommands.lpop(String) LPOP} because it blocks the connection when there are no elements to pop from any of the given lists. An element is popped from the head of the first list that is non-empty, with the given keys being checked in the order that they are given.
      Specified by:
      blpop in interface ListCommands
      Parameters:
      timeout - the timeout argument is interpreted as a double value specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.
      keys -
    • blpop

      public KeyedListElement blpop(double timeout, String... keys)
      Description copied from interface: ListCommands
      The blocking version of ListCommands.lpop(String) LPOP} because it blocks the connection when there are no elements to pop from any of the given lists. An element is popped from the head of the first list that is non-empty, with the given keys being checked in the order that they are given.
      Specified by:
      blpop in interface ListCommands
      Parameters:
      timeout - the timeout argument is interpreted as a double value specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.
      keys -
    • brpop

      public List<String> brpop(int timeout, String... keys)
      Description copied from interface: ListCommands
      The blocking version of ListCommands.rpop(String) RPOP} because it blocks the connection when there are no elements to pop from any of the given lists. An element is popped from the tail of the first list that is non-empty, with the given keys being checked in the order that they are given.
      Specified by:
      brpop in interface ListCommands
      Parameters:
      timeout - the timeout argument is interpreted as a double value specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.
      keys -
    • brpop

      public KeyedListElement brpop(double timeout, String... keys)
      Description copied from interface: ListCommands
      The blocking version of ListCommands.rpop(String) RPOP} because it blocks the connection when there are no elements to pop from any of the given lists. An element is popped from the tail of the first list that is non-empty, with the given keys being checked in the order that they are given.
      Specified by:
      brpop in interface ListCommands
      Parameters:
      timeout - the timeout argument is interpreted as a double value specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.
      keys -
    • blpop

      public List<byte[]> blpop(int timeout, byte[]... keys)
      Specified by:
      blpop in interface ListBinaryCommands
    • blpop

      public List<byte[]> blpop(double timeout, byte[]... keys)
      Specified by:
      blpop in interface ListBinaryCommands
    • brpop

      public List<byte[]> brpop(int timeout, byte[]... keys)
      Specified by:
      brpop in interface ListBinaryCommands
    • brpop

      public List<byte[]> brpop(double timeout, byte[]... keys)
      Specified by:
      brpop in interface ListBinaryCommands
    • rpoplpush

      public String rpoplpush(String srckey, String dstkey)
      Description copied from interface: ListCommands
      Atomically return and remove the last (tail) element of the srckey list, and push the element as the first (head) element of the dstkey list. For example if the source list contains the elements "a","b","c" and the destination list contains the elements "foo","bar" after an RPOPLPUSH command the content of the two lists will be "a","b" and "c","foo","bar".

      If the key does not exist or the list is already empty the special value 'nil' is returned. If the srckey and dstkey are the same the operation is equivalent to removing the last element from the list and pushing it as first element of the list, so it's a "list rotation" command.

      Time complexity: O(1)

      Specified by:
      rpoplpush in interface ListCommands
      Parameters:
      srckey -
      dstkey -
      Returns:
      Bulk reply
    • brpoplpush

      public String brpoplpush(String source, String destination, int timeout)
      Description copied from interface: ListCommands
      The blocking variant of ListCommands.rpoplpush(String, String). When source is empty, Redis will block the connection until another client pushes to it or until timeout is reached. A timeout of zero can be used to block indefinitely.

      Time complexity: O(1)

      Specified by:
      brpoplpush in interface ListCommands
      Parameters:
      source -
      destination -
      timeout - the timeout argument is interpreted as a double value specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.
      Returns:
      The element being popped from source and pushed to destination
    • rpoplpush

      public byte[] rpoplpush(byte[] srckey, byte[] dstkey)
      Specified by:
      rpoplpush in interface ListBinaryCommands
    • brpoplpush

      public byte[] brpoplpush(byte[] source, byte[] destination, int timeout)
      Specified by:
      brpoplpush in interface ListBinaryCommands
    • lmove

      public String lmove(String srcKey, String dstKey, ListDirection from, ListDirection to)
      Description copied from interface: ListCommands
      Pop an element from a list, push it to another list and return it
      Specified by:
      lmove in interface ListCommands
      Parameters:
      srcKey -
      dstKey -
      from - can be LEFT or RIGHT
      to - can be LEFT or RIGHT
      Returns:
      The element being popped and pushed
    • blmove

      public String blmove(String srcKey, String dstKey, ListDirection from, ListDirection to, double timeout)
      Description copied from interface: ListCommands
      Pop an element from a list, push it to another list and return it; or block until one is available
      Specified by:
      blmove in interface ListCommands
      Parameters:
      srcKey -
      dstKey -
      from - can be LEFT or RIGHT
      to - can be LEFT or RIGHT
      timeout - the timeout argument is interpreted as a double value specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.
      Returns:
      The element being popped and pushed
    • lmove

      public byte[] lmove(byte[] srcKey, byte[] dstKey, ListDirection from, ListDirection to)
      Specified by:
      lmove in interface ListBinaryCommands
    • blmove

      public byte[] blmove(byte[] srcKey, byte[] dstKey, ListDirection from, ListDirection to, double timeout)
      Specified by:
      blmove in interface ListBinaryCommands
    • lmpop

      public KeyValue<String,List<String>> lmpop(ListDirection direction, String... keys)
      Specified by:
      lmpop in interface ListCommands
    • lmpop

      public KeyValue<String,List<String>> lmpop(ListDirection direction, int count, String... keys)
      Specified by:
      lmpop in interface ListCommands
    • blmpop

      public KeyValue<String,List<String>> blmpop(long timeout, ListDirection direction, String... keys)
      Specified by:
      blmpop in interface ListCommands
    • blmpop

      public KeyValue<String,List<String>> blmpop(long timeout, ListDirection direction, int count, String... keys)
      Specified by:
      blmpop in interface ListCommands
    • lmpop

      public KeyValue<byte[],List<byte[]>> lmpop(ListDirection direction, byte[]... keys)
      Specified by:
      lmpop in interface ListBinaryCommands
    • lmpop

      public KeyValue<byte[],List<byte[]>> lmpop(ListDirection direction, int count, byte[]... keys)
      Specified by:
      lmpop in interface ListBinaryCommands
    • blmpop

      public KeyValue<byte[],List<byte[]>> blmpop(long timeout, ListDirection direction, byte[]... keys)
      Specified by:
      blmpop in interface ListBinaryCommands
    • blmpop

      public KeyValue<byte[],List<byte[]>> blmpop(long timeout, ListDirection direction, int count, byte[]... keys)
      Specified by:
      blmpop in interface ListBinaryCommands
    • hset

      public long hset(String key, String field, String value)
      Specified by:
      hset in interface HashCommands
    • hset

      public long hset(String key, Map<String,String> hash)
      Specified by:
      hset in interface HashCommands
    • hget

      public String hget(String key, String field)
      Specified by:
      hget in interface HashCommands
    • hsetnx

      public long hsetnx(String key, String field, String value)
      Specified by:
      hsetnx in interface HashCommands
    • hmset

      public String hmset(String key, Map<String,String> hash)
      Specified by:
      hmset in interface HashCommands
    • hmget

      public List<String> hmget(String key, String... fields)
      Specified by:
      hmget in interface HashCommands
    • hset

      public long hset(byte[] key, byte[] field, byte[] value)
      Specified by:
      hset in interface HashBinaryCommands
    • hset

      public long hset(byte[] key, Map<byte[],byte[]> hash)
      Specified by:
      hset in interface HashBinaryCommands
    • hget

      public byte[] hget(byte[] key, byte[] field)
      Specified by:
      hget in interface HashBinaryCommands
    • hsetnx

      public long hsetnx(byte[] key, byte[] field, byte[] value)
      Specified by:
      hsetnx in interface HashBinaryCommands
    • hmset

      public String hmset(byte[] key, Map<byte[],byte[]> hash)
      Specified by:
      hmset in interface HashBinaryCommands
    • hmget

      public List<byte[]> hmget(byte[] key, byte[]... fields)
      Specified by:
      hmget in interface HashBinaryCommands
    • hincrBy

      public long hincrBy(String key, String field, long value)
      Specified by:
      hincrBy in interface HashCommands
    • hincrByFloat

      public double hincrByFloat(String key, String field, double value)
      Specified by:
      hincrByFloat in interface HashCommands
    • hexists

      public boolean hexists(String key, String field)
      Specified by:
      hexists in interface HashCommands
    • hdel

      public long hdel(String key, String... field)
      Specified by:
      hdel in interface HashCommands
    • hlen

      public long hlen(String key)
      Specified by:
      hlen in interface HashCommands
    • hincrBy

      public long hincrBy(byte[] key, byte[] field, long value)
      Specified by:
      hincrBy in interface HashBinaryCommands
    • hincrByFloat

      public double hincrByFloat(byte[] key, byte[] field, double value)
      Specified by:
      hincrByFloat in interface HashBinaryCommands
    • hexists

      public boolean hexists(byte[] key, byte[] field)
      Specified by:
      hexists in interface HashBinaryCommands
    • hdel

      public long hdel(byte[] key, byte[]... field)
      Specified by:
      hdel in interface HashBinaryCommands
    • hlen

      public long hlen(byte[] key)
      Specified by:
      hlen in interface HashBinaryCommands
    • hkeys

      public Set<String> hkeys(String key)
      Specified by:
      hkeys in interface HashCommands
    • hvals

      public List<String> hvals(String key)
      Specified by:
      hvals in interface HashCommands
    • hgetAll

      public Map<String,String> hgetAll(String key)
      Specified by:
      hgetAll in interface HashCommands
    • hkeys

      public Set<byte[]> hkeys(byte[] key)
      Specified by:
      hkeys in interface HashBinaryCommands
    • hvals

      public List<byte[]> hvals(byte[] key)
      Specified by:
      hvals in interface HashBinaryCommands
    • hgetAll

      public Map<byte[],byte[]> hgetAll(byte[] key)
      Specified by:
      hgetAll in interface HashBinaryCommands
    • hrandfield

      public String hrandfield(String key)
      Specified by:
      hrandfield in interface HashCommands
    • hrandfield

      public List<String> hrandfield(String key, long count)
      Specified by:
      hrandfield in interface HashCommands
    • hrandfieldWithValues

      public Map<String,String> hrandfieldWithValues(String key, long count)
      Specified by:
      hrandfieldWithValues in interface HashCommands
    • hscan

      public ScanResult<Map.Entry<String,String>> hscan(String key, String cursor, ScanParams params)
      Specified by:
      hscan in interface HashCommands
    • hstrlen

      public long hstrlen(String key, String field)
      Specified by:
      hstrlen in interface HashCommands
    • hrandfield

      public byte[] hrandfield(byte[] key)
      Specified by:
      hrandfield in interface HashBinaryCommands
    • hrandfield

      public List<byte[]> hrandfield(byte[] key, long count)
      Specified by:
      hrandfield in interface HashBinaryCommands
    • hrandfieldWithValues

      public Map<byte[],byte[]> hrandfieldWithValues(byte[] key, long count)
      Specified by:
      hrandfieldWithValues in interface HashBinaryCommands
    • hscan

      public ScanResult<Map.Entry<byte[],byte[]>> hscan(byte[] key, byte[] cursor, ScanParams params)
      Specified by:
      hscan in interface HashBinaryCommands
    • hstrlen

      public long hstrlen(byte[] key, byte[] field)
      Specified by:
      hstrlen in interface HashBinaryCommands
    • sadd

      public long sadd(String key, String... members)
      Description copied from interface: SetCommands
      Add the specified member to the set value stored at key. If member is already a member of the set no operation is performed. If key does not exist a new set with the specified member as sole member is created. If the key exists but does not hold a set value an error is returned.

      Time complexity O(1)

      Specified by:
      sadd in interface SetCommands
      Parameters:
      key -
      members -
      Returns:
      The number of elements that were added to the set, not including all the elements already present in the set
    • smembers

      public Set<String> smembers(String key)
      Description copied from interface: SetCommands
      Return all the members (elements) of the set value stored at key. This is just syntax glue for SINTER.

      Time complexity O(N)

      Specified by:
      smembers in interface SetCommands
      Parameters:
      key -
      Returns:
      All elements of the set
    • srem

      public long srem(String key, String... members)
      Description copied from interface: SetCommands
      Remove the specified member from the set value stored at key. If member was not a member of the set no operation is performed. If key does not hold a set value an error is returned.

      Time complexity O(1)

      Specified by:
      srem in interface SetCommands
      Parameters:
      key -
      members -
      Returns:
      The number of members that were removed from the set, not including non-existing members
    • spop

      public String spop(String key)
      Description copied from interface: SetCommands
      Remove a random element from a Set returning it as return value. If the Set is empty or the key does not exist, a nil object is returned.

      The SetCommands.srandmember(String) command does a similar work but the returned element is not removed from the Set.

      Time complexity O(1)

      Specified by:
      spop in interface SetCommands
      Parameters:
      key -
      Returns:
      The removed member, or nil when key does not exist
    • spop

      public Set<String> spop(String key, long count)
      Description copied from interface: SetCommands
      By default, the command SetCommands.spop(String) pops a single member from the set. In this command, the reply will consist of up to count members, depending on the set's cardinality.

      The SetCommands.srandmember(String) command does a similar work but the returned element is not removed from the Set.

      Time complexity O(N), where N is the value of the passed count

      Specified by:
      spop in interface SetCommands
      Parameters:
      key -
      count -
      Returns:
      The removed members
    • scard

      public long scard(String key)
      Description copied from interface: SetCommands
      Return the set cardinality (number of elements). If the key does not exist 0 is returned, like for empty sets.
      Specified by:
      scard in interface SetCommands
      Parameters:
      key -
      Returns:
      The cardinality (number of elements) of the set
    • sismember

      public boolean sismember(String key, String member)
      Description copied from interface: SetCommands
      Return true if member is a member of the set stored at key, otherwise false is returned.

      Time complexity O(1)

      Specified by:
      sismember in interface SetCommands
      Parameters:
      key -
      member -
      Returns:
      true if the element is a member of the set, false otherwise
    • smismember

      public List<Boolean> smismember(String key, String... members)
      Description copied from interface: SetCommands
      Returns whether each member is a member of the set stored at key.

      Time complexity O(N) where N is the number of elements being checked for membership

      Specified by:
      smismember in interface SetCommands
      Parameters:
      key -
      members -
      Returns:
      List representing the membership of the given elements, in the same order as they are requested
    • sadd

      public long sadd(byte[] key, byte[]... members)
      Specified by:
      sadd in interface SetBinaryCommands
    • smembers

      public Set<byte[]> smembers(byte[] key)
      Specified by:
      smembers in interface SetBinaryCommands
    • srem

      public long srem(byte[] key, byte[]... members)
      Specified by:
      srem in interface SetBinaryCommands
    • spop

      public byte[] spop(byte[] key)
      Specified by:
      spop in interface SetBinaryCommands
    • spop

      public Set<byte[]> spop(byte[] key, long count)
      Specified by:
      spop in interface SetBinaryCommands
    • scard

      public long scard(byte[] key)
      Specified by:
      scard in interface SetBinaryCommands
    • sismember

      public boolean sismember(byte[] key, byte[] member)
      Specified by:
      sismember in interface SetBinaryCommands
    • smismember

      public List<Boolean> smismember(byte[] key, byte[]... members)
      Specified by:
      smismember in interface SetBinaryCommands
    • srandmember

      public String srandmember(String key)
      Description copied from interface: SetCommands
      Return a random element from a Set, without removing the element. If the Set is empty or the key does not exist, a nil object is returned.

      The SPOP command does a similar work but the returned element is popped (removed) from the Set.

      Time complexity O(1)

      Specified by:
      srandmember in interface SetCommands
      Parameters:
      key -
      Returns:
      The randomly selected element
    • srandmember

      public List<String> srandmember(String key, int count)
      Description copied from interface: SetCommands
      Return a random elements from a Set, without removing the elements. If the Set is empty or the key does not exist, an empty list is returned.

      The SPOP command does a similar work but the returned element is popped (removed) from the Set.

      Time complexity O(1)

      Specified by:
      srandmember in interface SetCommands
      Parameters:
      key -
      count - if positive, return an array of distinct elements. If negative the behavior changes and the command is allowed to return the same element multiple times
      Returns:
      A list of randomly selected elements
    • sscan

      public ScanResult<String> sscan(String key, String cursor, ScanParams params)
      Specified by:
      sscan in interface SetCommands
    • srandmember

      public byte[] srandmember(byte[] key)
      Specified by:
      srandmember in interface SetBinaryCommands
    • srandmember

      public List<byte[]> srandmember(byte[] key, int count)
      Specified by:
      srandmember in interface SetBinaryCommands
    • sscan

      public ScanResult<byte[]> sscan(byte[] key, byte[] cursor, ScanParams params)
      Specified by:
      sscan in interface SetBinaryCommands
    • sdiff

      public Set<String> sdiff(String... keys)
      Description copied from interface: SetCommands
      Return the difference between the Sets stored at keys

      Example:

       key1 = [x, a, b, c]
       key2 = [c]
       key3 = [a, d]
       SDIFF key1,key2,key3 => [x, b]
       
      Non existing keys are considered like empty sets.

      Time complexity O(N) with N being the total number of elements of all the sets

      Specified by:
      sdiff in interface SetCommands
      Parameters:
      keys - group of sets
      Returns:
      The members of a set resulting from the difference between the sets
    • sdiffstore

      public long sdiffstore(String dstkey, String... keys)
      Description copied from interface: SetCommands
      This command works exactly like SDIFF but instead of being returned the resulting set is stored in dstkey.
      Specified by:
      sdiffstore in interface SetCommands
      Parameters:
      dstkey -
      keys - group of sets
      Returns:
      The number of elements in the resulting set
    • sinter

      public Set<String> sinter(String... keys)
      Description copied from interface: SetCommands
      Return the members of a set resulting from the intersection of all the sets hold at the specified keys. Like in LRANGE the result is sent to the connection as a multi-bulk reply (see the protocol specification for more information). If just a single key is specified, then this command produces the same result as SMEMBERS. Actually SMEMBERS is just syntax sugar for SINTER.

      Non existing keys are considered like empty sets, so if one of the keys is missing an empty set is returned (since the intersection with an empty set always is an empty set).

      Time complexity O(N*M) worst case where N is the cardinality of the smallest set and M the number of sets

      Specified by:
      sinter in interface SetCommands
      Parameters:
      keys - group of sets
      Returns:
      A set with members of the resulting set
    • sinterstore

      public long sinterstore(String dstkey, String... keys)
      Description copied from interface: SetCommands
      This command works exactly like SINTER but instead of being returned the resulting set is stored as dstkey.

      Time complexity O(N*M) worst case where N is the cardinality of the smallest set and M the number of sets

      Specified by:
      sinterstore in interface SetCommands
      Parameters:
      dstkey -
      keys - group of sets
      Returns:
      The number of elements in the resulting set
    • sintercard

      public long sintercard(String... keys)
      Description copied from interface: SetCommands
      This command works exactly like SINTER but instead of returning the result set, it returns just the cardinality of the result. LIMIT defaults to 0 and means unlimited

      Time complexity O(N*M) worst case where N is the cardinality of the smallest

      Specified by:
      sintercard in interface SetCommands
      Parameters:
      keys - group of sets
      Returns:
      The cardinality of the set which would result from the intersection of all the given sets
    • sintercard

      public long sintercard(int limit, String... keys)
      Description copied from interface: SetCommands
      This command works exactly like SINTER but instead of returning the result set, it returns just the cardinality of the result.

      Time complexity O(N*M) worst case where N is the cardinality of the smallest

      Specified by:
      sintercard in interface SetCommands
      Parameters:
      limit - If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinality.
      keys - group of sets
      Returns:
      The cardinality of the set which would result from the intersection of all the given sets
    • sunion

      public Set<String> sunion(String... keys)
      Description copied from interface: SetCommands
      Return the members of a set resulting from the union of all the sets hold at the specified keys. Like in LRANGE the result is sent to the connection as a multi-bulk reply (see the protocol specification for more information). If just a single key is specified, then this command produces the same result as SMEMBERS.

      Non existing keys are considered like empty sets.

      Time complexity O(N) where N is the total number of elements in all the provided sets

      Specified by:
      sunion in interface SetCommands
      Parameters:
      keys - group of sets
      Returns:
      A set with members of the resulting set
    • sunionstore

      public long sunionstore(String dstkey, String... keys)
      Description copied from interface: SetCommands
      This command works exactly like SUNION but instead of being returned the resulting set is stored as dstkey. Any existing value in dstkey will be over-written.

      Time complexity O(N) where N is the total number of elements in all the provided sets

      Specified by:
      sunionstore in interface SetCommands
      Parameters:
      dstkey -
      keys - group of sets
      Returns:
      The number of elements in the resulting set
    • smove

      public long smove(String srckey, String dstkey, String member)
      Description copied from interface: SetCommands
      Move the specified member from the set at srckey to the set at dstkey. This operation is atomic, in every given moment the element will appear to be in the source or destination set for accessing clients.

      If the source set does not exist or does not contain the specified element no operation is performed and zero is returned, otherwise the element is removed from the source set and added to the destination set. On success one is returned, even if the element was already present in the destination set.

      An error is raised if the source or destination keys contain a non Set value.

      Time complexity O(1)

      Specified by:
      smove in interface SetCommands
      Parameters:
      srckey -
      dstkey -
      member -
      Returns:
      1 if the element was moved, 0 if no operation was performed
    • sdiff

      public Set<byte[]> sdiff(byte[]... keys)
      Specified by:
      sdiff in interface SetBinaryCommands
    • sdiffstore

      public long sdiffstore(byte[] dstkey, byte[]... keys)
      Specified by:
      sdiffstore in interface SetBinaryCommands
    • sinter

      public Set<byte[]> sinter(byte[]... keys)
      Specified by:
      sinter in interface SetBinaryCommands
    • sinterstore

      public long sinterstore(byte[] dstkey, byte[]... keys)
      Specified by:
      sinterstore in interface SetBinaryCommands
    • sintercard

      public long sintercard(byte[]... keys)
      Description copied from interface: SetBinaryCommands
      This command works exactly like SINTER but instead of returning the result set, it returns just the cardinality of the result. LIMIT defaults to 0 and means unlimited

      Time complexity O(N*M) worst case where N is the cardinality of the smallest

      Specified by:
      sintercard in interface SetBinaryCommands
      Parameters:
      keys -
      Returns:
      The cardinality of the set which would result from the intersection of all the given sets
    • sintercard

      public long sintercard(int limit, byte[]... keys)
      Description copied from interface: SetBinaryCommands
      This command works exactly like SINTER but instead of returning the result set, it returns just the cardinality of the result.

      Time complexity O(N*M) worst case where N is the cardinality of the smallest

      Specified by:
      sintercard in interface SetBinaryCommands
      Parameters:
      limit - If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinality.
      keys -
      Returns:
      The cardinality of the set which would result from the intersection of all the given sets
    • sunion

      public Set<byte[]> sunion(byte[]... keys)
      Specified by:
      sunion in interface SetBinaryCommands
    • sunionstore

      public long sunionstore(byte[] dstkey, byte[]... keys)
      Specified by:
      sunionstore in interface SetBinaryCommands
    • smove

      public long smove(byte[] srckey, byte[] dstkey, byte[] member)
      Specified by:
      smove in interface SetBinaryCommands
    • zadd

      public long zadd(String key, double score, String member)
      Description copied from interface: SortedSetCommands
      Add the specified member having the specified score to the sorted set stored at key. If member is already a member of the sorted set the score is updated, and the element reinserted in the right position to ensure sorting. If key does not exist a new sorted set with the specified member as sole member is created. If the key exists but does not hold a sorted set value an error is returned.

      The score value can be the string representation of a double precision floating point number.

      Time complexity O(log(N)) with N being the number of elements in the sorted set

      Specified by:
      zadd in interface SortedSetCommands
      Parameters:
      key -
      score -
      member -
      Returns:
      1 if the new element was added, 0 if the element was already a member of the sorted set and the score was updated
    • zadd

      public long zadd(String key, double score, String member, ZAddParams params)
      Description copied from interface: SortedSetCommands
      Similar to ZADD but can be used with optional params.
      Specified by:
      zadd in interface SortedSetCommands
      Parameters:
      key -
      score -
      member -
      params - ZAddParams
      Returns:
      1 if the new element was added, 0 if the element was already a member of the sorted set and the score was updated
      See Also:
    • zadd

      public long zadd(String key, Map<String,Double> scoreMembers)
      Description copied from interface: SortedSetCommands
      Similar to ZADD but for multiple members.
      Specified by:
      zadd in interface SortedSetCommands
      Parameters:
      key -
      scoreMembers -
      Returns:
      The number of elements added to the sorted set (excluding score updates).
      See Also:
    • zadd

      public long zadd(String key, Map<String,Double> scoreMembers, ZAddParams params)
      Description copied from interface: SortedSetCommands
      Similar to ZADD but can be used with optional params, and fits for multiple members.
      Specified by:
      zadd in interface SortedSetCommands
      Parameters:
      key -
      scoreMembers -
      params - ZAddParams
      Returns:
      The number of elements added to the sorted set (excluding score updates).
      See Also:
    • zaddIncr

      public Double zaddIncr(String key, double score, String member, ZAddParams params)
      Description copied from interface: SortedSetCommands
      Increments the score of member in the sorted set stored at key by increment. If member does not exist in the sorted set, it is added with increment as its score (as if its previous score was 0.0). If key does not exist, a new sorted set with the specified member as its sole member is created.

      The score value should be the string representation of a numeric value, and accepts double precision floating point numbers. It is possible to provide a negative value to decrement the score.

      Time complexity O(log(N)) with N being the number of elements in the sorted set

      Specified by:
      zaddIncr in interface SortedSetCommands
      Parameters:
      key -
      score -
      member -
      params - ZAddParams
      Returns:
      1 if the new element was added, 0 if the element was already a member of the sorted set and the score was updated
    • zadd

      public long zadd(byte[] key, double score, byte[] member)
      Specified by:
      zadd in interface SortedSetBinaryCommands
    • zadd

      public long zadd(byte[] key, double score, byte[] member, ZAddParams params)
      Specified by:
      zadd in interface SortedSetBinaryCommands
    • zadd

      public long zadd(byte[] key, Map<byte[],Double> scoreMembers)
      Specified by:
      zadd in interface SortedSetBinaryCommands
    • zadd

      public long zadd(byte[] key, Map<byte[],Double> scoreMembers, ZAddParams params)
      Specified by:
      zadd in interface SortedSetBinaryCommands
    • zaddIncr

      public Double zaddIncr(byte[] key, double score, byte[] member, ZAddParams params)
      Specified by:
      zaddIncr in interface SortedSetBinaryCommands
    • zrem

      public long zrem(String key, String... members)
      Description copied from interface: SortedSetCommands
      Remove the specified member from the sorted set value stored at key. If member was not a member of the set no operation is performed. If key does not hold a set value an error is returned.

      Time complexity O(log(N)) with N being the number of elements in the sorted set

      Specified by:
      zrem in interface SortedSetCommands
      Parameters:
      key -
      members -
      Returns:
      1 if the new element was removed, 0 if the new element was not a member of the set
    • zincrby

      public double zincrby(String key, double increment, String member)
      Description copied from interface: SortedSetCommands
      If member already exists in the sorted set adds the increment to its score and updates the position of the element in the sorted set accordingly. If member does not already exist in the sorted set it is added with increment as score (that is, like if the previous score was virtually zero). If key does not exist a new sorted set with the specified member as sole member is created. If the key exists but does not hold a sorted set value an error is returned.

      The score value can be the string representation of a double precision floating point number. It's possible to provide a negative value to perform a decrement.

      For an introduction to sorted sets check the Introduction to Redis data types page.

      Time complexity O(log(N)) with N being the number of elements in the sorted set

      Specified by:
      zincrby in interface SortedSetCommands
      Parameters:
      key -
      increment -
      member -
      Returns:
      The new score
    • zincrby

      public Double zincrby(String key, double increment, String member, ZIncrByParams params)
      Description copied from interface: SortedSetCommands
      Similar to ZINCRBY but can be used with optionals params.
      Specified by:
      zincrby in interface SortedSetCommands
      Parameters:
      key -
      increment -
      member -
      params - ZIncrByParams
      Returns:
      The new score for key
      See Also:
    • zrank

      public Long zrank(String key, String member)
      Description copied from interface: SortedSetCommands
      Return the rank (or index) of member in the sorted set at key, with scores being ordered from low to high.

      When the given member does not exist in the sorted set, the special value 'nil' is returned. The returned rank (or index) of the member is 0-based for both commands.

      Time complexity O(log(N))

      Specified by:
      zrank in interface SortedSetCommands
      Parameters:
      key -
      member -
      Returns:
      The rank of the element as an integer reply if the element exists. A nil bulk reply if there is no such element
    • zrevrank

      public Long zrevrank(String key, String member)
      Description copied from interface: SortedSetCommands
      Return the rank (or index) of member in the sorted set at key, with scores being ordered from high to low.

      When the given member does not exist in the sorted set, the special value 'nil' is returned. The returned rank (or index) of the member is 0-based for both commands.

      Time complexity O(log(N))

      Specified by:
      zrevrank in interface SortedSetCommands
      Parameters:
      key -
      member -
      Returns:
      The rank of the element as an integer reply if the element exists. A nil bulk reply if there is no such element
    • zrankWithScore

      public KeyValue<Long,Double> zrankWithScore(String key, String member)
      Description copied from interface: SortedSetCommands
      Returns the rank and the score of member in the sorted set stored at key, with the scores ordered from low to high.
      Specified by:
      zrankWithScore in interface SortedSetCommands
      Parameters:
      key - the key
      member - the member
      Returns:
      the KeyValue contains rank and score.
    • zrevrankWithScore

      public KeyValue<Long,Double> zrevrankWithScore(String key, String member)
      Description copied from interface: SortedSetCommands
      Returns the rank and the score of member in the sorted set stored at key, with the scores ordered from high to low.
      Specified by:
      zrevrankWithScore in interface SortedSetCommands
      Parameters:
      key - the key
      member - the member
      Returns:
      the KeyValue contains rank and score.
    • zrem

      public long zrem(byte[] key, byte[]... members)
      Specified by:
      zrem in interface SortedSetBinaryCommands
    • zincrby

      public double zincrby(byte[] key, double increment, byte[] member)
      Specified by:
      zincrby in interface SortedSetBinaryCommands
    • zincrby

      public Double zincrby(byte[] key, double increment, byte[] member, ZIncrByParams params)
      Specified by:
      zincrby in interface SortedSetBinaryCommands
    • zrank

      public Long zrank(byte[] key, byte[] member)
      Specified by:
      zrank in interface SortedSetBinaryCommands
    • zrevrank

      public Long zrevrank(byte[] key, byte[] member)
      Specified by:
      zrevrank in interface SortedSetBinaryCommands
    • zrankWithScore

      public KeyValue<Long,Double> zrankWithScore(byte[] key, byte[] member)
      Specified by:
      zrankWithScore in interface SortedSetBinaryCommands
    • zrevrankWithScore

      public KeyValue<Long,Double> zrevrankWithScore(byte[] key, byte[] member)
      Specified by:
      zrevrankWithScore in interface SortedSetBinaryCommands
    • zrandmember

      public String zrandmember(String key)
      Description copied from interface: SortedSetCommands
      Return a random element from the sorted set value stored at key.

      Time complexity O(N) where N is the number of elements returned

      Specified by:
      zrandmember in interface SortedSetCommands
      Parameters:
      key -
      Returns:
      Random String from the set
    • zrandmember

      public List<String> zrandmember(String key, long count)
      Description copied from interface: SortedSetCommands
      Return an array of distinct elements. The array's length is either count or the sorted set's cardinality (ZCARD), whichever is lower.

      Time complexity O(N) where N is the number of elements returned

      Specified by:
      zrandmember in interface SortedSetCommands
      Parameters:
      key -
      count - choose up to count elements
      Returns:
      A list of distinct Strings from the set
    • zrandmemberWithScores

      public List<Tuple> zrandmemberWithScores(String key, long count)
      Description copied from interface: SortedSetCommands
      Similar to ZRANDMEMBER but the replay will include the scores with the result.
      Specified by:
      zrandmemberWithScores in interface SortedSetCommands
      Parameters:
      key -
      count - choose up to count elements
      Returns:
      A List of distinct Strings with their scores
      See Also:
    • zcard

      public long zcard(String key)
      Description copied from interface: SortedSetCommands
      Return the sorted set cardinality (number of elements). If the key does not exist 0 is returned, like for empty sorted sets.

      Time complexity O(1)

      Specified by:
      zcard in interface SortedSetCommands
      Parameters:
      key -
      Returns:
      The cardinality (number of elements) of the set as an integer
    • zscore

      public Double zscore(String key, String member)
      Description copied from interface: SortedSetCommands
      Return the score of the specified element of the sorted set at key. If the specified element does not exist in the sorted set, or the key does not exist at all, a special 'nil' value is returned.

      Time complexity O(1)

      Specified by:
      zscore in interface SortedSetCommands
      Parameters:
      key -
      member -
      Returns:
      The score
    • zmscore

      public List<Double> zmscore(String key, String... members)
      Description copied from interface: SortedSetCommands
      Return the scores associated with the specified members in the sorted set stored at key. For every member that does not exist in the sorted set, a nil value is returned.

      Time complexity O(N) where N is the number of members being requested

      Specified by:
      zmscore in interface SortedSetCommands
      Parameters:
      key -
      members -
      Returns:
      The scores
    • zrandmember

      public byte[] zrandmember(byte[] key)
      Specified by:
      zrandmember in interface SortedSetBinaryCommands
    • zrandmember

      public List<byte[]> zrandmember(byte[] key, long count)
      Specified by:
      zrandmember in interface SortedSetBinaryCommands
    • zrandmemberWithScores

      public List<Tuple> zrandmemberWithScores(byte[] key, long count)
      Specified by:
      zrandmemberWithScores in interface SortedSetBinaryCommands
    • zcard

      public long zcard(byte[] key)
      Specified by:
      zcard in interface SortedSetBinaryCommands
    • zscore

      public Double zscore(byte[] key, byte[] member)
      Specified by:
      zscore in interface SortedSetBinaryCommands
    • zmscore

      public List<Double> zmscore(byte[] key, byte[]... members)
      Specified by:
      zmscore in interface SortedSetBinaryCommands
    • zpopmax

      public Tuple zpopmax(String key)
      Description copied from interface: SortedSetCommands
      Remove and return the member with the highest score in the sorted set stored at key.

      Time complexity O(log(N)) with N being the number of elements in the sorted set

      Specified by:
      zpopmax in interface SortedSetCommands
      Parameters:
      key -
      Returns:
      The popped element and the score
    • zpopmax

      public List<Tuple> zpopmax(String key, int count)
      Description copied from interface: SortedSetCommands
      Remove and return up to count members with the highest scores in the sorted set stored at key.

      Time complexity O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.

      Specified by:
      zpopmax in interface SortedSetCommands
      Parameters:
      key -
      count - the number of elements to pop
      Returns:
      A List of popped elements and scores
    • zpopmin

      public Tuple zpopmin(String key)
      Description copied from interface: SortedSetCommands
      Remove and return the member with the lowest score in the sorted set stored at key.

      Time complexity O(log(N)) with N being the number of elements in the sorted set

      Specified by:
      zpopmin in interface SortedSetCommands
      Parameters:
      key -
      Returns:
      The popped element and the score
    • zpopmin

      public List<Tuple> zpopmin(String key, int count)
      Description copied from interface: SortedSetCommands
      Remove and return up to count members with the lowest scores in the sorted set stored at key.

      Time complexity O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.

      Specified by:
      zpopmin in interface SortedSetCommands
      Parameters:
      key -
      count - the number of elements to pop
      Returns:
      A List of popped elements and scores
    • zcount

      public long zcount(String key, double min, double max)
      Description copied from interface: SortedSetCommands
      Return the number of elements in the sorted set at key with a score between min and max.

      Time complexity O(log(N)) with N being the number of elements in the sorted set.

      Specified by:
      zcount in interface SortedSetCommands
      Parameters:
      key - the key to query
      min - minimum score
      max - maximum score
      Returns:
      The number of elements in the specified score range.
    • zcount

      public long zcount(String key, String min, String max)
      Description copied from interface: SortedSetCommands
      Similar to ZCOUNT but with exclusive range.
      Specified by:
      zcount in interface SortedSetCommands
      See Also:
    • zpopmax

      public Tuple zpopmax(byte[] key)
      Specified by:
      zpopmax in interface SortedSetBinaryCommands
    • zpopmax

      public List<Tuple> zpopmax(byte[] key, int count)
      Specified by:
      zpopmax in interface SortedSetBinaryCommands
    • zpopmin

      public Tuple zpopmin(byte[] key)
      Specified by:
      zpopmin in interface SortedSetBinaryCommands
    • zpopmin

      public List<Tuple> zpopmin(byte[] key, int count)
      Specified by:
      zpopmin in interface SortedSetBinaryCommands
    • zcount

      public long zcount(byte[] key, double min, double max)
      Specified by:
      zcount in interface SortedSetBinaryCommands
    • zcount

      public long zcount(byte[] key, byte[] min, byte[] max)
      Specified by:
      zcount in interface SortedSetBinaryCommands
    • zrange

      public List<String> zrange(String key, long start, long stop)
      Description copied from interface: SortedSetCommands
      Returns the specified range of elements in the sorted set stored at key.

      Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.

      Specified by:
      zrange in interface SortedSetCommands
      Parameters:
      key - the key to query
      start - the minimum index
      stop - the maximum index
      Returns:
      A List of Strings in the specified range
    • zrevrange

      public List<String> zrevrange(String key, long start, long stop)
      Description copied from interface: SortedSetCommands
      Returns the specified range of elements in the sorted set stored at key. The elements are considered to be ordered from the highest to the lowest score. Descending lexicographical order is used for elements with equal score.

      Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.

      Specified by:
      zrevrange in interface SortedSetCommands
      Parameters:
      key - the key to query
      start - the minimum index
      stop - the maximum index
      Returns:
      A List of Strings in the specified range
    • zrangeWithScores

      public List<Tuple> zrangeWithScores(String key, long start, long stop)
      Description copied from interface: SortedSetCommands
      Returns the specified range of elements in the sorted set stored at key with the scores.
      Specified by:
      zrangeWithScores in interface SortedSetCommands
      Parameters:
      key - the key to query
      start - the minimum index
      stop - the maximum index
      Returns:
      A List of Tuple in the specified range (elements names and their scores)
    • zrevrangeWithScores

      public List<Tuple> zrevrangeWithScores(String key, long start, long stop)
      Description copied from interface: SortedSetCommands
      Similar to ZREVRANGE but the reply will include the scores of the returned elements.
      Specified by:
      zrevrangeWithScores in interface SortedSetCommands
      Parameters:
      key - the key to query
      start - the minimum index
      stop - the maximum index
      Returns:
      A List of Tuple in the specified range (elements names and their scores)
      See Also:
    • zrange

      public List<String> zrange(String key, ZRangeParams zRangeParams)
      Description copied from interface: SortedSetCommands
      Similar to ZRANGE but can be used with additional params.
      Specified by:
      zrange in interface SortedSetCommands
      Parameters:
      key - the key to query
      zRangeParams - ZRangeParams
      Returns:
      A List of Strings in the specified range
      See Also:
    • zrangeWithScores

      public List<Tuple> zrangeWithScores(String key, ZRangeParams zRangeParams)
      Description copied from interface: SortedSetCommands
      Similar to ZRANGE but can be used with additional params.
      Specified by:
      zrangeWithScores in interface SortedSetCommands
      Parameters:
      key - the key to query
      zRangeParams - ZRangeParams
      Returns:
      A List of Tuple in the specified range (elements names and their scores)
      See Also:
    • zrangestore

      public long zrangestore(String dest, String src, ZRangeParams zRangeParams)
      Description copied from interface: SortedSetCommands
      Similar to ZRANGE but stores the result in dest.
      Specified by:
      zrangestore in interface SortedSetCommands
      Parameters:
      dest - the storing key
      src - the key to query
      zRangeParams - ZRangeParams
      Returns:
      The number of elements in the resulting sorted set
      See Also:
    • zrangeByScore

      public List<String> zrangeByScore(String key, double min, double max)
      Description copied from interface: SortedSetCommands
      Return all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max). The elements are considered to be ordered from low to high scores.

      Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.

      Specified by:
      zrangeByScore in interface SortedSetCommands
      Parameters:
      key - the key to query
      min - minimum score
      max - maximum score
      Returns:
      A List of elements in the specified score range
    • zrangeByScore

      public List<String> zrangeByScore(String key, String min, String max)
      Description copied from interface: SortedSetCommands
      Similar to ZRANGE but with exclusive range.
      Specified by:
      zrangeByScore in interface SortedSetCommands
      See Also:
    • zrevrangeByScore

      public List<String> zrevrangeByScore(String key, double max, double min)
      Description copied from interface: SortedSetCommands
      Return all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min). In contrary to the default ordering of sorted sets, for this command the elements are considered to be ordered from high to low scores.

      The elements having the same score are returned in reverse lexicographical order.

      Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.

      Specified by:
      zrevrangeByScore in interface SortedSetCommands
      Parameters:
      key - the key to query
      max - maximum score
      min - minimum score
      Returns:
      A List of elements in the specified score range
    • zrangeByScore

      public List<String> zrangeByScore(String key, double min, double max, int offset, int count)
      Description copied from interface: SortedSetCommands
      Similar to ZRANGE but with exclusive range.
      Specified by:
      zrangeByScore in interface SortedSetCommands
      Parameters:
      key - the key to query
      min - minimum score
      max - maximum score
      offset - the first index of the sub-range
      count - count of the sub-range. A negative count returns all elements from the offset
      Returns:
      A List of elements in the specified score range
      See Also:
    • zrevrangeByScore

      public List<String> zrevrangeByScore(String key, String max, String min)
      Description copied from interface: SortedSetCommands
      Similar to ZREVRANGE but with exclusive range.
      Specified by:
      zrevrangeByScore in interface SortedSetCommands
      See Also:
    • zrangeByScore

      public List<String> zrangeByScore(String key, String min, String max, int offset, int count)
      Description copied from interface: SortedSetCommands
      Similar to ZRANGE but with limit option,
      Specified by:
      zrangeByScore in interface SortedSetCommands
      Parameters:
      key - the key to query
      min - minimum score
      max - maximum score
      offset - the first index of the sub-range
      count - count of the sub-range. A negative count returns all elements from the offset
      Returns:
      A List of elements in the specified score range
      See Also:
    • zrevrangeByScore

      public List<String> zrevrangeByScore(String key, double max, double min, int offset, int count)
      Description copied from interface: SortedSetCommands
      Similar to ZRANGE but with limit option,
      Specified by:
      zrevrangeByScore in interface SortedSetCommands
      Parameters:
      key - the key to query
      max - maximum score
      min - minimum score
      offset - the first index of the sub-range
      count - count of the sub-range. A negative count returns all elements from the offset
      Returns:
      A List of elements in the specified score range
      See Also:
    • zrangeByScoreWithScores

      public List<Tuple> zrangeByScoreWithScores(String key, double min, double max)
      Description copied from interface: SortedSetCommands
      Similar to ZRANGE but return with scores.
      Specified by:
      zrangeByScoreWithScores in interface SortedSetCommands
      Parameters:
      key - the key to query
      min - minimum score
      max - maximum score
      Returns:
      A List of elements with scores in the specified score range
      See Also:
    • zrevrangeByScoreWithScores

      public List<Tuple> zrevrangeByScoreWithScores(String key, double max, double min)
      Description copied from interface: SortedSetCommands
      Similar to ZREVRANGE but return with scores.
      Specified by:
      zrevrangeByScoreWithScores in interface SortedSetCommands
      Parameters:
      key - the key to query
      max - maximum score
      min - minimum score
      Returns:
      A List of elements with scores in the specified score range
      See Also:
    • zrangeByScoreWithScores

      public List<Tuple> zrangeByScoreWithScores(String key, double min, double max, int offset, int count)
      Description copied from interface: SortedSetCommands
      Similar to ZRANGE but with limit option, and return with scores.
      Specified by:
      zrangeByScoreWithScores in interface SortedSetCommands
      Parameters:
      key - the key to query
      min - minimum score
      max - maximum score
      offset - the first index of the sub-range
      count - count of the sub-range. A negative count returns all elements from the offset
      Returns:
      A List of elements in the specified score range
      See Also:
    • zrevrangeByScore

      public List<String> zrevrangeByScore(String key, String max, String min, int offset, int count)
      Description copied from interface: SortedSetCommands
      Similar to ZREVRANGE but with limit option,
      Specified by:
      zrevrangeByScore in interface SortedSetCommands
      Parameters:
      key - the key to query
      max - maximum score
      min - minimum score
      offset - the first index of the sub-range
      count - count of the sub-range. A negative count returns all elements from the offset
      Returns:
      A List of elements in the specified score range
      See Also:
    • zrangeByScoreWithScores

      public List<Tuple> zrangeByScoreWithScores(String key, String min, String max)
      Description copied from interface: SortedSetCommands
      Similar to ZRANGE but with exclusive range, and return with scores.
      Specified by:
      zrangeByScoreWithScores in interface SortedSetCommands
      See Also:
    • zrevrangeByScoreWithScores

      public List<Tuple> zrevrangeByScoreWithScores(String key, String max, String min)
      Description copied from interface: SortedSetCommands
      Similar to ZREVRANGE but with exclusive range, and return with scores.
      Specified by:
      zrevrangeByScoreWithScores in interface SortedSetCommands
      See Also:
    • zrangeByScoreWithScores

      public List<Tuple> zrangeByScoreWithScores(String key, String min, String max, int offset, int count)
      Description copied from interface: SortedSetCommands
      Similar to ZRANGE but with exclusive range, with limit options and return with scores.
      Specified by:
      zrangeByScoreWithScores in interface SortedSetCommands
      Parameters:
      key - the key to query
      min - minimum score
      max - maximum score
      offset - the first index of the sub-range
      count - count of the sub-range. A negative count returns all elements from the offset
      Returns:
      A List of elements in the specified score range
      See Also:
    • zrevrangeByScoreWithScores

      public List<Tuple> zrevrangeByScoreWithScores(String key, double max, double min, int offset, int count)
      Description copied from interface: SortedSetCommands
      Similar to ZREVRANGE but with limit options and return with scores.
      Specified by:
      zrevrangeByScoreWithScores in interface SortedSetCommands
      Parameters:
      key - the key to query
      max - maximum score
      min - minimum score
      offset - the first index of the sub-range
      count - count of the sub-range. A negative count returns all elements from the offset
      Returns:
      A List of elements in the specified score range
      See Also:
    • zrevrangeByScoreWithScores

      public List<Tuple> zrevrangeByScoreWithScores(String key, String max, String min, int offset, int count)
      Description copied from interface: SortedSetCommands
      Similar to ZREVRANGE but with exclusive range, with limit options and return with scores.
      Specified by:
      zrevrangeByScoreWithScores in interface SortedSetCommands
      Parameters:
      key - the key to query
      max - maximum score
      min - minimum score
      offset - the first index of the sub-range
      count - count of the sub-range. A negative count returns all elements from the offset
      Returns:
      A List of elements in the specified score range
      See Also:
    • zrange

      public List<byte[]> zrange(byte[] key, long start, long stop)
      Specified by:
      zrange in interface SortedSetBinaryCommands
    • zrevrange

      public List<byte[]> zrevrange(byte[] key, long start, long stop)
      Specified by:
      zrevrange in interface SortedSetBinaryCommands
    • zrangeWithScores

      public List<Tuple> zrangeWithScores(byte[] key, long start, long stop)
      Specified by:
      zrangeWithScores in interface SortedSetBinaryCommands
    • zrevrangeWithScores

      public List<Tuple> zrevrangeWithScores(byte[] key, long start, long stop)
      Specified by:
      zrevrangeWithScores in interface SortedSetBinaryCommands
    • zrange

      public List<byte[]> zrange(byte[] key, ZRangeParams zRangeParams)
      Specified by:
      zrange in interface SortedSetBinaryCommands
    • zrangeWithScores

      public List<Tuple> zrangeWithScores(byte[] key, ZRangeParams zRangeParams)
      Specified by:
      zrangeWithScores in interface SortedSetBinaryCommands
    • zrangestore

      public long zrangestore(byte[] dest, byte[] src, ZRangeParams zRangeParams)
      Specified by:
      zrangestore in interface SortedSetBinaryCommands
    • zrangeByScore

      public List<byte[]> zrangeByScore(byte[] key, double min, double max)
      Specified by:
      zrangeByScore in interface SortedSetBinaryCommands
    • zrangeByScore

      public List<byte[]> zrangeByScore(byte[] key, byte[] min, byte[] max)
      Specified by:
      zrangeByScore in interface SortedSetBinaryCommands
    • zrevrangeByScore

      public List<byte[]> zrevrangeByScore(byte[] key, double max, double min)
      Specified by:
      zrevrangeByScore in interface SortedSetBinaryCommands
    • zrangeByScore

      public List<byte[]> zrangeByScore(byte[] key, double min, double max, int offset, int count)
      Specified by:
      zrangeByScore in interface SortedSetBinaryCommands
    • zrevrangeByScore

      public List<byte[]> zrevrangeByScore(byte[] key, byte[] max, byte[] min)
      Specified by:
      zrevrangeByScore in interface SortedSetBinaryCommands
    • zrangeByScore

      public List<byte[]> zrangeByScore(byte[] key, byte[] min, byte[] max, int offset, int count)
      Specified by:
      zrangeByScore in interface SortedSetBinaryCommands
    • zrevrangeByScore

      public List<byte[]> zrevrangeByScore(byte[] key, double max, double min, int offset, int count)
      Specified by:
      zrevrangeByScore in interface SortedSetBinaryCommands
    • zrangeByScoreWithScores

      public List<Tuple> zrangeByScoreWithScores(byte[] key, double min, double max)
      Specified by:
      zrangeByScoreWithScores in interface SortedSetBinaryCommands
    • zrevrangeByScoreWithScores

      public List<Tuple> zrevrangeByScoreWithScores(byte[] key, double max, double min)
      Specified by:
      zrevrangeByScoreWithScores in interface SortedSetBinaryCommands
    • zrangeByScoreWithScores

      public List<Tuple> zrangeByScoreWithScores(byte[] key, double min, double max, int offset, int count)
      Specified by:
      zrangeByScoreWithScores in interface SortedSetBinaryCommands
    • zrevrangeByScore

      public List<byte[]> zrevrangeByScore(byte[] key, byte[] max, byte[] min, int offset, int count)
      Specified by:
      zrevrangeByScore in interface SortedSetBinaryCommands
    • zrangeByScoreWithScores

      public List<Tuple> zrangeByScoreWithScores(byte[] key, byte[] min, byte[] max)
      Specified by:
      zrangeByScoreWithScores in interface SortedSetBinaryCommands
    • zrevrangeByScoreWithScores

      public List<Tuple> zrevrangeByScoreWithScores(byte[] key, byte[] max, byte[] min)
      Specified by:
      zrevrangeByScoreWithScores in interface SortedSetBinaryCommands
    • zrangeByScoreWithScores

      public List<Tuple> zrangeByScoreWithScores(byte[] key, byte[] min, byte[] max, int offset, int count)
      Specified by:
      zrangeByScoreWithScores in interface SortedSetBinaryCommands
    • zrevrangeByScoreWithScores

      public List<Tuple> zrevrangeByScoreWithScores(byte[] key, double max, double min, int offset, int count)
      Specified by:
      zrevrangeByScoreWithScores in interface SortedSetBinaryCommands
    • zrevrangeByScoreWithScores

      public List<Tuple> zrevrangeByScoreWithScores(byte[] key, byte[] max, byte[] min, int offset, int count)
      Specified by:
      zrevrangeByScoreWithScores in interface SortedSetBinaryCommands
    • zremrangeByRank

      public long zremrangeByRank(String key, long start, long stop)
      Description copied from interface: SortedSetCommands
      Remove all elements in the sorted set at key with rank between start and end. Start and end are 0-based with rank 0 being the element with the lowest score. Both start and end can be negative numbers, where they indicate offsets starting at the element with the highest rank. For example: -1 is the element with the highest score, -2 the element with the second highest score and so forth.

      Time complexity O(log(N))+O(M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.

      Specified by:
      zremrangeByRank in interface SortedSetCommands
      Parameters:
      key -
      start -
      stop -
      Returns:
      The number of elements removed
    • zremrangeByScore

      public long zremrangeByScore(String key, double min, double max)
      Description copied from interface: SortedSetCommands
      Remove all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max).

      Time complexity O(log(N))+O(M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.

      Specified by:
      zremrangeByScore in interface SortedSetCommands
      Parameters:
      key -
      min - minimum score to remove
      max - maximum score to remove
      Returns:
      The number of elements removed
    • zremrangeByScore

      public long zremrangeByScore(String key, String min, String max)
      Description copied from interface: SortedSetCommands
      Similar to ZREMRANGE but with limit option.
      Specified by:
      zremrangeByScore in interface SortedSetCommands
      See Also:
    • zremrangeByRank

      public long zremrangeByRank(byte[] key, long start, long stop)
      Specified by:
      zremrangeByRank in interface SortedSetBinaryCommands
    • zremrangeByScore

      public long zremrangeByScore(byte[] key, double min, double max)
      Specified by:
      zremrangeByScore in interface SortedSetBinaryCommands
    • zremrangeByScore

      public long zremrangeByScore(byte[] key, byte[] min, byte[] max)
      Specified by:
      zremrangeByScore in interface SortedSetBinaryCommands
    • zlexcount

      public long zlexcount(String key, String min, String max)
      Description copied from interface: SortedSetCommands
      Return the number of elements in the sorted set at key with a value between min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.

      Time complexity O(log(N)) with N being the number of elements in the sorted set.

      Specified by:
      zlexcount in interface SortedSetCommands
      Parameters:
      key -
      min - minimum value
      max - maximum value
      Returns:
      The number of elements in the specified score range
    • zrangeByLex

      public List<String> zrangeByLex(String key, String min, String max)
      Description copied from interface: SortedSetCommands
      Return all the elements in the sorted set at key with a value between min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.

      Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.

      Specified by:
      zrangeByLex in interface SortedSetCommands
      Parameters:
      key -
      min - minimum value
      max - maximum value
      Returns:
      A List of elements in the specified score range
    • zrangeByLex

      public List<String> zrangeByLex(String key, String min, String max, int offset, int count)
      Description copied from interface: SortedSetCommands
      Similar to ZRANGE but with limit option.
      Specified by:
      zrangeByLex in interface SortedSetCommands
      Parameters:
      key -
      min - minimum value
      max - maximum value
      offset - the first index of the sub-range
      count - count of the sub-range. A negative count returns all elements from the offset
      Returns:
      A List of elements in the specified score range
      See Also:
    • zrevrangeByLex

      public List<String> zrevrangeByLex(String key, String max, String min)
      Description copied from interface: SortedSetCommands
      Return all the elements in the sorted set at key with a value between max and min, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.

      Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.

      Specified by:
      zrevrangeByLex in interface SortedSetCommands
      Parameters:
      key -
      max - maximum value
      min - minimum value
      Returns:
      A List of elements in the specified score range
    • zrevrangeByLex

      public List<String> zrevrangeByLex(String key, String max, String min, int offset, int count)
      Description copied from interface: SortedSetCommands
      Similar to ZRANGE but with limit option.
      Specified by:
      zrevrangeByLex in interface SortedSetCommands
      Parameters:
      key -
      max - maximum value
      min - minimum value
      offset - the first index of the sub-range
      count - count of the sub-range. A negative count returns all elements from the offset
      Returns:
      A List of elements in the specified score range
      See Also:
    • zremrangeByLex

      public long zremrangeByLex(String key, String min, String max)
      Description copied from interface: SortedSetCommands
      Remove all elements in the sorted set stored at key between the lexicographical range specified by min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.

      Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.

      Specified by:
      zremrangeByLex in interface SortedSetCommands
      Parameters:
      key -
      min - minimum value to remove
      max - maximum value to remove
      Returns:
      The number of elements removed
    • zlexcount

      public long zlexcount(byte[] key, byte[] min, byte[] max)
      Specified by:
      zlexcount in interface SortedSetBinaryCommands
    • zrangeByLex

      public List<byte[]> zrangeByLex(byte[] key, byte[] min, byte[] max)
      Specified by:
      zrangeByLex in interface SortedSetBinaryCommands
    • zrangeByLex

      public List<byte[]> zrangeByLex(byte[] key, byte[] min, byte[] max, int offset, int count)
      Specified by:
      zrangeByLex in interface SortedSetBinaryCommands
    • zrevrangeByLex

      public List<byte[]> zrevrangeByLex(byte[] key, byte[] max, byte[] min)
      Specified by:
      zrevrangeByLex in interface SortedSetBinaryCommands
    • zrevrangeByLex

      public List<byte[]> zrevrangeByLex(byte[] key, byte[] max, byte[] min, int offset, int count)
      Specified by:
      zrevrangeByLex in interface SortedSetBinaryCommands
    • zremrangeByLex

      public long zremrangeByLex(byte[] key, byte[] min, byte[] max)
      Specified by:
      zremrangeByLex in interface SortedSetBinaryCommands
    • zscan

      public ScanResult<Tuple> zscan(String key, String cursor, ScanParams params)
      Specified by:
      zscan in interface SortedSetCommands
    • zscan

      public ScanResult<Tuple> zscan(byte[] key, byte[] cursor, ScanParams params)
      Specified by:
      zscan in interface SortedSetBinaryCommands
    • bzpopmax

      public KeyedZSetElement bzpopmax(double timeout, String... keys)
      Description copied from interface: SortedSetCommands
      The blocking version of ZPOPMAX
      Specified by:
      bzpopmax in interface SortedSetCommands
      Parameters:
      timeout - specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.
      keys -
    • bzpopmin

      public KeyedZSetElement bzpopmin(double timeout, String... keys)
      Description copied from interface: SortedSetCommands
      The blocking version of ZPOPMIN
      Specified by:
      bzpopmin in interface SortedSetCommands
      Parameters:
      timeout - specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.
      keys -
    • bzpopmax

      public List<byte[]> bzpopmax(double timeout, byte[]... keys)
      Specified by:
      bzpopmax in interface SortedSetBinaryCommands
    • bzpopmin

      public List<byte[]> bzpopmin(double timeout, byte[]... keys)
      Specified by:
      bzpopmin in interface SortedSetBinaryCommands
    • zdiff

      public Set<String> zdiff(String... keys)
      Description copied from interface: SortedSetCommands
      Compute the difference between all the sets in the given keys.

      Time complexity O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.

      Specified by:
      zdiff in interface SortedSetCommands
      Parameters:
      keys - group of sets
      Returns:
      The result of the difference
    • zdiffWithScores

      public Set<Tuple> zdiffWithScores(String... keys)
      Description copied from interface: SortedSetCommands
      Compute the difference between all the sets in the given keys. Return the result with scores.
      Specified by:
      zdiffWithScores in interface SortedSetCommands
      Parameters:
      keys - group of sets
      Returns:
      The result of the difference with their scores
    • zdiffStore

      public long zdiffStore(String dstkey, String... keys)
      Description copied from interface: SortedSetCommands
      Compute the difference between all the sets in the given keys. Store the result in dstkey.
      Specified by:
      zdiffStore in interface SortedSetCommands
      Parameters:
      dstkey -
      keys - group of sets
      Returns:
      The number of elements in the resulting sorted set at dstkey.
    • zdiff

      public Set<byte[]> zdiff(byte[]... keys)
      Specified by:
      zdiff in interface SortedSetBinaryCommands
    • zdiffWithScores

      public Set<Tuple> zdiffWithScores(byte[]... keys)
      Specified by:
      zdiffWithScores in interface SortedSetBinaryCommands
    • zdiffStore

      public long zdiffStore(byte[] dstkey, byte[]... keys)
      Specified by:
      zdiffStore in interface SortedSetBinaryCommands
    • zinterstore

      public long zinterstore(String dstkey, String... sets)
      Description copied from interface: SortedSetCommands
      Compute the intersection between all the sets in the given keys. Store the result in dstkey.
      Specified by:
      zinterstore in interface SortedSetCommands
      Parameters:
      dstkey -
      sets - group of sets
      Returns:
      The number of elements in the resulting sorted set at dstkey
    • zinterstore

      public long zinterstore(String dstkey, ZParams params, String... sets)
      Description copied from interface: SortedSetCommands
      Compute the intersection between all the sets in the given keys. Store the result in dstkey.
      Specified by:
      zinterstore in interface SortedSetCommands
      Parameters:
      dstkey -
      params - ZParams
      sets - group of sets
      Returns:
      The number of elements in the resulting sorted set at dstkey
    • zinter

      public Set<String> zinter(ZParams params, String... keys)
      Description copied from interface: SortedSetCommands
      Compute the intersection between all the sets in the given keys.

      Time complexity O(N*K)+O(M*log(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.

      Specified by:
      zinter in interface SortedSetCommands
      Parameters:
      params - ZParams
      keys - group of sets
      Returns:
      The result of the intersection
    • zinterWithScores

      public Set<Tuple> zinterWithScores(ZParams params, String... keys)
      Description copied from interface: SortedSetCommands
      Compute the intersection between all the sets in the given keys. Return the result with scores.
      Specified by:
      zinterWithScores in interface SortedSetCommands
      Parameters:
      params - ZParams
      keys - group of sets
      Returns:
      The result of the intersection with their scores
    • zinterstore

      public long zinterstore(byte[] dstkey, byte[]... sets)
      Specified by:
      zinterstore in interface SortedSetBinaryCommands
    • zinterstore

      public long zinterstore(byte[] dstkey, ZParams params, byte[]... sets)
      Specified by:
      zinterstore in interface SortedSetBinaryCommands
    • zintercard

      public long zintercard(byte[]... keys)
      Description copied from interface: SortedSetBinaryCommands
      Similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.

      Time complexity O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets

      Specified by:
      zintercard in interface SortedSetBinaryCommands
      Parameters:
      keys - group of sets
      Returns:
      The number of elements in the resulting intersection
      See Also:
    • zintercard

      public long zintercard(long limit, byte[]... keys)
      Description copied from interface: SortedSetBinaryCommands
      Similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.

      Time complexity O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets

      Specified by:
      zintercard in interface SortedSetBinaryCommands
      Parameters:
      limit - If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinality
      keys - group of sets
      Returns:
      The number of elements in the resulting intersection
      See Also:
    • zintercard

      public long zintercard(String... keys)
      Description copied from interface: SortedSetCommands
      Similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.

      Time complexity O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets

      Specified by:
      zintercard in interface SortedSetCommands
      Parameters:
      keys - group of sets
      Returns:
      The number of elements in the resulting intersection
      See Also:
    • zintercard

      public long zintercard(long limit, String... keys)
      Description copied from interface: SortedSetCommands
      Similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.

      Time complexity O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets

      Specified by:
      zintercard in interface SortedSetCommands
      Parameters:
      limit - If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinality
      keys - group of sets
      Returns:
      The number of elements in the resulting intersection
      See Also:
    • zinter

      public Set<byte[]> zinter(ZParams params, byte[]... keys)
      Specified by:
      zinter in interface SortedSetBinaryCommands
    • zinterWithScores

      public Set<Tuple> zinterWithScores(ZParams params, byte[]... keys)
      Specified by:
      zinterWithScores in interface SortedSetBinaryCommands
    • zunion

      public Set<String> zunion(ZParams params, String... keys)
      Description copied from interface: SortedSetCommands
      Compute the union between all the sets in the given keys.

      Time complexity O(N)+O(M log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.

      Specified by:
      zunion in interface SortedSetCommands
      Parameters:
      params - ZParams
      keys - group of sets
      Returns:
      The result of the union
    • zunionWithScores

      public Set<Tuple> zunionWithScores(ZParams params, String... keys)
      Description copied from interface: SortedSetCommands
      Compute the union between all the sets in the given keys. Return the result with scores.
      Specified by:
      zunionWithScores in interface SortedSetCommands
      Parameters:
      params - ZParams
      keys - group of sets
      Returns:
      The result of the union with their scores
    • zunionstore

      public long zunionstore(String dstkey, String... sets)
      Description copied from interface: SortedSetCommands
      Compute the union between all the sets in the given keys. Store the result in dstkey.
      Specified by:
      zunionstore in interface SortedSetCommands
      Parameters:
      dstkey -
      sets - group of sets
      Returns:
      The number of elements in the resulting sorted set at dstkey
    • zunionstore

      public long zunionstore(String dstkey, ZParams params, String... sets)
      Description copied from interface: SortedSetCommands
      Compute the union between all the sets in the given keys. Store the result in dstkey.
      Specified by:
      zunionstore in interface SortedSetCommands
      Parameters:
      dstkey -
      params - ZParams
      sets - group of sets
      Returns:
      The number of elements in the resulting sorted set at dstkey
    • zunion

      public Set<byte[]> zunion(ZParams params, byte[]... keys)
      Specified by:
      zunion in interface SortedSetBinaryCommands
    • zunionWithScores

      public Set<Tuple> zunionWithScores(ZParams params, byte[]... keys)
      Specified by:
      zunionWithScores in interface SortedSetBinaryCommands
    • zunionstore

      public long zunionstore(byte[] dstkey, byte[]... sets)
      Specified by:
      zunionstore in interface SortedSetBinaryCommands
    • zunionstore

      public long zunionstore(byte[] dstkey, ZParams params, byte[]... sets)
      Specified by:
      zunionstore in interface SortedSetBinaryCommands
    • zmpop

      public KeyValue<String,List<Tuple>> zmpop(SortedSetOption option, String... keys)
      Specified by:
      zmpop in interface SortedSetCommands
    • zmpop

      public KeyValue<String,List<Tuple>> zmpop(SortedSetOption option, int count, String... keys)
      Specified by:
      zmpop in interface SortedSetCommands
    • bzmpop

      public KeyValue<String,List<Tuple>> bzmpop(long timeout, SortedSetOption option, String... keys)
      Specified by:
      bzmpop in interface SortedSetCommands
    • bzmpop

      public KeyValue<String,List<Tuple>> bzmpop(long timeout, SortedSetOption option, int count, String... keys)
      Specified by:
      bzmpop in interface SortedSetCommands
    • zmpop

      public KeyValue<byte[],List<Tuple>> zmpop(SortedSetOption option, byte[]... keys)
      Specified by:
      zmpop in interface SortedSetBinaryCommands
    • zmpop

      public KeyValue<byte[],List<Tuple>> zmpop(SortedSetOption option, int count, byte[]... keys)
      Specified by:
      zmpop in interface SortedSetBinaryCommands
    • bzmpop

      public KeyValue<byte[],List<Tuple>> bzmpop(long timeout, SortedSetOption option, byte[]... keys)
      Specified by:
      bzmpop in interface SortedSetBinaryCommands
    • bzmpop

      public KeyValue<byte[],List<Tuple>> bzmpop(long timeout, SortedSetOption option, int count, byte[]... keys)
      Specified by:
      bzmpop in interface SortedSetBinaryCommands
    • geoadd

      public long geoadd(String key, double longitude, double latitude, String member)
      Description copied from interface: GeoCommands
      Adds the specified geospatial item (longitude, latitude, member) to the specified key.

      Time complexity: O(log(N)) where N is the number of elements in the sorted set.

      Specified by:
      geoadd in interface GeoCommands
      Parameters:
      key -
      longitude -
      latitude -
      member -
      Returns:
      The number of elements added
    • geoadd

      public long geoadd(String key, Map<String,GeoCoordinate> memberCoordinateMap)
      Description copied from interface: GeoCommands
      Adds the specified geospatial items (in memberCoordinateMap) to the specified key.

      Time complexity: O(log(N)) for each item added, where N is the number of elements in the sorted set.

      Specified by:
      geoadd in interface GeoCommands
      Parameters:
      key -
      memberCoordinateMap - Members names with their geo coordinates
      Returns:
      The number of elements added
    • geoadd

      public long geoadd(String key, GeoAddParams params, Map<String,GeoCoordinate> memberCoordinateMap)
      Description copied from interface: GeoCommands
      Adds the specified geospatial items (in memberCoordinateMap) to the specified key. Can be used with the following options: XX- Only update elements that already exist. Never add elements. NX- Don't update already existing elements. Always add new elements. CH- Modify the return value from the number of new elements added, to the total number of elements changed

      Time complexity: O(log(N)) for each item added

      Specified by:
      geoadd in interface GeoCommands
      Parameters:
      key -
      params - Additional options
      memberCoordinateMap - Members names with their geo coordinates
      Returns:
      The number of elements added
    • geodist

      public Double geodist(String key, String member1, String member2)
      Description copied from interface: GeoCommands
      Return the distance between two members in the geospatial index represented by the sorted set.

      Time complexity: O(log(N))

      Specified by:
      geodist in interface GeoCommands
      Parameters:
      key -
      member1 -
      member2 -
      Returns:
      The distance as a double
    • geodist

      public Double geodist(String key, String member1, String member2, GeoUnit unit)
      Description copied from interface: GeoCommands
      Return the distance between two members in the geospatial index represented by the sorted set.

      Time complexity: O(log(N))

      Specified by:
      geodist in interface GeoCommands
      Parameters:
      key -
      member1 -
      member2 -
      unit - can be M, KM, MI or FT can M, KM, MI or FT
      Returns:
      The distance as a double
    • geohash

      public List<String> geohash(String key, String... members)
      Description copied from interface: GeoCommands
      Return valid Geohash strings representing the position of the given members.

      Time complexity: O(log(N)) for each member requested

      Specified by:
      geohash in interface GeoCommands
      Parameters:
      key -
      members -
      Returns:
      A list of Geohash strings corresponding to each member name passed as argument to the command.
    • geopos

      public List<GeoCoordinate> geopos(String key, String... members)
      Description copied from interface: GeoCommands
      Return the positions (longitude,latitude) of all the specified members.

      Time complexity: O(N) where N is the number of members requested.

      Specified by:
      geopos in interface GeoCommands
      Parameters:
      key -
      members -
      Returns:
      A list of GeoCoordinate representing longitude and latitude (x,y) of each member name passed as argument to the command.
    • geoadd

      public long geoadd(byte[] key, double longitude, double latitude, byte[] member)
      Specified by:
      geoadd in interface GeoBinaryCommands
    • geoadd

      public long geoadd(byte[] key, Map<byte[],GeoCoordinate> memberCoordinateMap)
      Specified by:
      geoadd in interface GeoBinaryCommands
    • geoadd

      public long geoadd(byte[] key, GeoAddParams params, Map<byte[],GeoCoordinate> memberCoordinateMap)
      Specified by:
      geoadd in interface GeoBinaryCommands
    • geodist

      public Double geodist(byte[] key, byte[] member1, byte[] member2)
      Specified by:
      geodist in interface GeoBinaryCommands
    • geodist

      public Double geodist(byte[] key, byte[] member1, byte[] member2, GeoUnit unit)
      Specified by:
      geodist in interface GeoBinaryCommands
    • geohash

      public List<byte[]> geohash(byte[] key, byte[]... members)
      Specified by:
      geohash in interface GeoBinaryCommands
    • geopos

      public List<GeoCoordinate> geopos(byte[] key, byte[]... members)
      Specified by:
      geopos in interface GeoBinaryCommands
    • georadius

      public List<GeoRadiusResponse> georadius(String key, double longitude, double latitude, double radius, GeoUnit unit)
      Description copied from interface: GeoCommands
      Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the radius.

      Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.

      Specified by:
      georadius in interface GeoCommands
      Parameters:
      key -
      longitude - of the center point
      latitude - of the center point
      radius - of the area
      unit - can be M, KM, MI or FT
      Returns:
      List of GeoRadiusResponse
    • georadiusReadonly

      public List<GeoRadiusResponse> georadiusReadonly(String key, double longitude, double latitude, double radius, GeoUnit unit)
      Description copied from interface: GeoCommands
      Readonly version of GEORADIUS,

      Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.

      Specified by:
      georadiusReadonly in interface GeoCommands
      Parameters:
      key -
      longitude - of the center point
      latitude - of the center point
      radius - of the area
      unit - can be M, KM, MI or FT
      Returns:
      List of GeoRadiusResponse
      See Also:
    • georadius

      public List<GeoRadiusResponse> georadius(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param)
      Description copied from interface: GeoCommands
      Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the radius. Additional information can be reached using GeoRadiusParam: WITHDIST: Also return the distance of the returned items from the specified center. The distance is returned in the same unit as the unit specified as the radius argument of the command. WITHCOORD: Also return the longitude,latitude coordinates of the matching items. WITHHASH: Also return the raw geohash-encoded sorted set score of the item, in the form of a 52 bit unsigned integer. This is only useful for low level hacks or debugging and is otherwise of little interest for the general user.

      Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.

      Specified by:
      georadius in interface GeoCommands
      Parameters:
      key -
      longitude - of the center point
      latitude - of the center point
      radius - of the area
      unit - can be M, KM, MI or FT
      param - GeoRadiusParam
      Returns:
      List of GeoRadiusResponse
    • georadiusReadonly

      public List<GeoRadiusResponse> georadiusReadonly(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param)
      Description copied from interface: GeoCommands
      Readonly version of GEORADIUS,

      Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.

      Specified by:
      georadiusReadonly in interface GeoCommands
      Parameters:
      key -
      longitude - of the center point
      latitude - of the center point
      radius - of the area
      unit - can be M, KM, MI or FT
      param - GeoRadiusParam
      Returns:
      List of GeoRadiusResponse
      See Also:
    • georadiusByMember

      public List<GeoRadiusResponse> georadiusByMember(String key, String member, double radius, GeoUnit unit)
      Description copied from interface: GeoCommands
      This command is exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set.

      Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.

      Specified by:
      georadiusByMember in interface GeoCommands
      Parameters:
      key -
      member - represents the center of the area
      radius - of the area
      unit - can be M, KM, MI or FT
      Returns:
      List of GeoRadiusResponse
    • georadiusByMemberReadonly

      public List<GeoRadiusResponse> georadiusByMemberReadonly(String key, String member, double radius, GeoUnit unit)
      Description copied from interface: GeoCommands
      Readonly version of GEORADIUSBYMEMBER

      Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.

      Specified by:
      georadiusByMemberReadonly in interface GeoCommands
      Parameters:
      key -
      member - represents the center of the area
      radius - of the area
      unit - can be M, KM, MI or FT
      Returns:
      List of GeoRadiusResponse
    • georadiusByMember

      public List<GeoRadiusResponse> georadiusByMember(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param)
      Description copied from interface: GeoCommands
      This command is exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set.

      Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.

      Specified by:
      georadiusByMember in interface GeoCommands
      Parameters:
      key -
      member - represents the center of the area
      radius - of the area
      unit - can be M, KM, MI or FT
      param - GeoRadiusParam
      Returns:
      List of GeoRadiusResponse
    • georadiusByMemberReadonly

      public List<GeoRadiusResponse> georadiusByMemberReadonly(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param)
      Description copied from interface: GeoCommands
      Readonly version of GEORADIUSBYMEMBER

      Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.

      Specified by:
      georadiusByMemberReadonly in interface GeoCommands
      Parameters:
      key -
      member - represents the center of the area
      radius - of the area
      unit - can be M, KM, MI or FT
      param - GeoRadiusParam
      Returns:
      List of GeoRadiusResponse
    • georadiusStore

      public long georadiusStore(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam)
      Description copied from interface: GeoCommands
      This command is exactly like GEORADIUS but storing the results at the destination key (provided with storeParam).

      Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.

      Specified by:
      georadiusStore in interface GeoCommands
      Parameters:
      key -
      longitude - of the center point
      latitude - of the center point
      radius - of the area
      unit - can be M, KM, MI or FT
      param - GeoRadiusParam
      storeParam - GeoRadiusStoreParam
      Returns:
      The number of results being stored
    • georadiusByMemberStore

      public long georadiusByMemberStore(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam)
      Description copied from interface: GeoCommands
      This command is exactly like GEORADIUSBYMEMBER but storing the results at the destination key (provided with storeParam).

      Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.

      Specified by:
      georadiusByMemberStore in interface GeoCommands
      Parameters:
      key -
      member - represents the center of the area
      radius - of the area
      unit - can be M, KM, MI or FT
      param - GeoRadiusParam
      storeParam - GeoRadiusStoreParam
      Returns:
      The number of results being stored
    • geosearch

      public List<GeoRadiusResponse> geosearch(String key, String member, double radius, GeoUnit unit)
      Description copied from interface: GeoCommands
      Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape.

      This command can be used in place of the GEORADIUSBYMEMBER command.

      Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape

      Specified by:
      geosearch in interface GeoCommands
      Parameters:
      key -
      member - represents the center of the area
      radius - of the area
      unit - can be M, KM, MI or FT
      Returns:
      List of GeoRadiusResponse
    • geosearch

      public List<GeoRadiusResponse> geosearch(String key, GeoCoordinate coord, double radius, GeoUnit unit)
      Description copied from interface: GeoCommands
      Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape.

      This command can be used in place of the GEORADIUS command.

      Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape

      Specified by:
      geosearch in interface GeoCommands
      Parameters:
      key -
      coord - represents the center of the area
      radius - of the area
      unit - can be M, KM, MI or FT
      Returns:
      List of GeoRadiusResponse
    • geosearch

      public List<GeoRadiusResponse> geosearch(String key, String member, double width, double height, GeoUnit unit)
      Description copied from interface: GeoCommands
      Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape. This command extends the GEORADIUS command, so in addition to searching within circular areas, it supports searching within rectangular areas.

      The axis-aligned rectangle, determined by height and width, when the center point is determined by the position of the given member.

      Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape

      Specified by:
      geosearch in interface GeoCommands
      Parameters:
      key -
      member - represents the center of the area
      width - of the rectangular area
      height - of the rectangular area
      unit - can be M, KM, MI or FT
      Returns:
      List of GeoRadiusResponse
    • geosearch

      public List<GeoRadiusResponse> geosearch(String key, GeoCoordinate coord, double width, double height, GeoUnit unit)
      Description copied from interface: GeoCommands
      Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape. This command extends the GEORADIUS command, so in addition to searching within circular areas, it supports searching within rectangular areas.

      The axis-aligned rectangle, determined by height and width, when the center point is determined by the given coordinate.

      Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape

      Specified by:
      geosearch in interface GeoCommands
      Parameters:
      key -
      coord - represents the center point
      width - of the rectangular area
      height - of the rectangular area
      unit - can be M, KM, MI or FT
      Returns:
      List of GeoRadiusResponse
    • geosearch

      public List<GeoRadiusResponse> geosearch(String key, GeoSearchParam params)
      Description copied from interface: GeoCommands
      Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape. This command extends the GEORADIUS command, so in addition to searching within circular areas, it supports searching within rectangular areas.

      Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape

      Specified by:
      geosearch in interface GeoCommands
      Parameters:
      key -
      params - GeoSearchParam
      Returns:
      List of GeoRadiusResponse
    • geosearchStore

      public long geosearchStore(String dest, String src, String member, double radius, GeoUnit unit)
      Description copied from interface: GeoCommands
      This command is exactly like GEOSEARCH but storing the results at dest.

      Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape

      Specified by:
      geosearchStore in interface GeoCommands
      Parameters:
      dest -
      src - the sorted set (key)
      member - represents the center of the area
      radius - of the circular area
      unit - can be M, KM, MI or FT
      Returns:
      The number of results being stored
    • geosearchStore

      public long geosearchStore(String dest, String src, GeoCoordinate coord, double radius, GeoUnit unit)
      Description copied from interface: GeoCommands
      This command is exactly like GEOSEARCH but storing the results at dest.

      Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape

      Specified by:
      geosearchStore in interface GeoCommands
      Parameters:
      dest -
      src -
      coord - represents the center point
      radius - of the circular area
      unit - can be M, KM, MI or FT
      Returns:
      The number of results being stored
    • geosearchStore

      public long geosearchStore(String dest, String src, String member, double width, double height, GeoUnit unit)
      Description copied from interface: GeoCommands
      This command is exactly like GEOSEARCH but storing the results at dest.

      Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape

      Specified by:
      geosearchStore in interface GeoCommands
      Parameters:
      dest -
      src -
      member - represents the center of the area
      width - of the rectangular area
      height - of the rectangular area
      unit - can be M, KM, MI or FT
      Returns:
      The number of results being stored
    • geosearchStore

      public long geosearchStore(String dest, String src, GeoCoordinate coord, double width, double height, GeoUnit unit)
      Description copied from interface: GeoCommands
      This command is exactly like GEOSEARCH but storing the results at dest.

      Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape

      Specified by:
      geosearchStore in interface GeoCommands
      Parameters:
      dest -
      src -
      coord - represents the center point
      width - of the rectangular area
      height - of the rectangular area
      unit - can be M, KM, MI or FT
      Returns:
      The number of results being stored
    • geosearchStore

      public long geosearchStore(String dest, String src, GeoSearchParam params)
      Description copied from interface: GeoCommands
      This command is exactly like GEOSEARCH but storing the results at dest.

      Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape

      Specified by:
      geosearchStore in interface GeoCommands
      Parameters:
      dest -
      src -
      params - GeoSearchParam
      Returns:
      The number of results being stored
    • geosearchStoreStoreDist

      public long geosearchStoreStoreDist(String dest, String src, GeoSearchParam params)
      Description copied from interface: GeoCommands
      This command is exactly like GEOSEARCHSTORE but storing the results with their destinations from the center point.

      Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape

      Specified by:
      geosearchStoreStoreDist in interface GeoCommands
      Parameters:
      dest -
      src -
      params - GeoSearchParam
      Returns:
      The number of results being stored
    • georadius

      public List<GeoRadiusResponse> georadius(byte[] key, double longitude, double latitude, double radius, GeoUnit unit)
      Specified by:
      georadius in interface GeoBinaryCommands
    • georadiusReadonly

      public List<GeoRadiusResponse> georadiusReadonly(byte[] key, double longitude, double latitude, double radius, GeoUnit unit)
      Specified by:
      georadiusReadonly in interface GeoBinaryCommands
    • georadius

      public List<GeoRadiusResponse> georadius(byte[] key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param)
      Specified by:
      georadius in interface GeoBinaryCommands
    • georadiusReadonly

      public List<GeoRadiusResponse> georadiusReadonly(byte[] key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param)
      Specified by:
      georadiusReadonly in interface GeoBinaryCommands
    • georadiusByMember

      public List<GeoRadiusResponse> georadiusByMember(byte[] key, byte[] member, double radius, GeoUnit unit)
      Specified by:
      georadiusByMember in interface GeoBinaryCommands
    • georadiusByMemberReadonly

      public List<GeoRadiusResponse> georadiusByMemberReadonly(byte[] key, byte[] member, double radius, GeoUnit unit)
      Specified by:
      georadiusByMemberReadonly in interface GeoBinaryCommands
    • georadiusByMember

      public List<GeoRadiusResponse> georadiusByMember(byte[] key, byte[] member, double radius, GeoUnit unit, GeoRadiusParam param)
      Specified by:
      georadiusByMember in interface GeoBinaryCommands
    • georadiusByMemberReadonly

      public List<GeoRadiusResponse> georadiusByMemberReadonly(byte[] key, byte[] member, double radius, GeoUnit unit, GeoRadiusParam param)
      Specified by:
      georadiusByMemberReadonly in interface GeoBinaryCommands
    • georadiusStore

      public long georadiusStore(byte[] key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam)
      Specified by:
      georadiusStore in interface GeoBinaryCommands
    • georadiusByMemberStore

      public long georadiusByMemberStore(byte[] key, byte[] member, double radius, GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam)
      Specified by:
      georadiusByMemberStore in interface GeoBinaryCommands
    • geosearch

      public List<GeoRadiusResponse> geosearch(byte[] key, byte[] member, double radius, GeoUnit unit)
      Specified by:
      geosearch in interface GeoBinaryCommands
    • geosearch

      public List<GeoRadiusResponse> geosearch(byte[] key, GeoCoordinate coord, double radius, GeoUnit unit)
      Specified by:
      geosearch in interface GeoBinaryCommands
    • geosearch

      public List<GeoRadiusResponse> geosearch(byte[] key, byte[] member, double width, double height, GeoUnit unit)
      Specified by:
      geosearch in interface GeoBinaryCommands
    • geosearch

      public List<GeoRadiusResponse> geosearch(byte[] key, GeoCoordinate coord, double width, double height, GeoUnit unit)
      Specified by:
      geosearch in interface GeoBinaryCommands
    • geosearch

      public List<GeoRadiusResponse> geosearch(byte[] key, GeoSearchParam params)
      Specified by:
      geosearch in interface GeoBinaryCommands
    • geosearchStore

      public long geosearchStore(byte[] dest, byte[] src, byte[] member, double radius, GeoUnit unit)
      Specified by:
      geosearchStore in interface GeoBinaryCommands
    • geosearchStore

      public long geosearchStore(byte[] dest, byte[] src, GeoCoordinate coord, double radius, GeoUnit unit)
      Specified by:
      geosearchStore in interface GeoBinaryCommands
    • geosearchStore

      public long geosearchStore(byte[] dest, byte[] src, byte[] member, double width, double height, GeoUnit unit)
      Specified by:
      geosearchStore in interface GeoBinaryCommands
    • geosearchStore

      public long geosearchStore(byte[] dest, byte[] src, GeoCoordinate coord, double width, double height, GeoUnit unit)
      Specified by:
      geosearchStore in interface GeoBinaryCommands
    • geosearchStore

      public long geosearchStore(byte[] dest, byte[] src, GeoSearchParam params)
      Specified by:
      geosearchStore in interface GeoBinaryCommands
    • geosearchStoreStoreDist

      public long geosearchStoreStoreDist(byte[] dest, byte[] src, GeoSearchParam params)
      Specified by:
      geosearchStoreStoreDist in interface GeoBinaryCommands
    • pfadd

      public long pfadd(String key, String... elements)
      Specified by:
      pfadd in interface HyperLogLogCommands
    • pfmerge

      public String pfmerge(String destkey, String... sourcekeys)
      Specified by:
      pfmerge in interface HyperLogLogCommands
    • pfcount

      public long pfcount(String key)
      Specified by:
      pfcount in interface HyperLogLogCommands
    • pfcount

      public long pfcount(String... keys)
      Specified by:
      pfcount in interface HyperLogLogCommands
    • pfadd

      public long pfadd(byte[] key, byte[]... elements)
      Specified by:
      pfadd in interface HyperLogLogBinaryCommands
    • pfmerge

      public String pfmerge(byte[] destkey, byte[]... sourcekeys)
      Specified by:
      pfmerge in interface HyperLogLogBinaryCommands
    • pfcount

      public long pfcount(byte[] key)
      Specified by:
      pfcount in interface HyperLogLogBinaryCommands
    • pfcount

      public long pfcount(byte[]... keys)
      Specified by:
      pfcount in interface HyperLogLogBinaryCommands
    • xadd

      public StreamEntryID xadd(String key, StreamEntryID id, Map<String,String> hash)
      Description copied from interface: StreamCommands
      XADD key ID field string [field string ...]
      Specified by:
      xadd in interface StreamCommands
      Returns:
      the ID of the added entry
    • xadd

      public StreamEntryID xadd(String key, XAddParams params, Map<String,String> hash)
      Specified by:
      xadd in interface StreamCommands
    • xlen

      public long xlen(String key)
      Description copied from interface: StreamCommands
      XLEN key
      Specified by:
      xlen in interface StreamCommands
      Returns:
      length of stream
    • xrange

      public List<StreamEntry> xrange(String key, StreamEntryID start, StreamEntryID end)
      Description copied from interface: StreamCommands
      XRANGE key start end
      Specified by:
      xrange in interface StreamCommands
      Parameters:
      key -
      start - minimum StreamEntryID for the retrieved range, passing null will indicate minimum ID possible in the stream
      end - maximum StreamEntryID for the retrieved range, passing null will indicate maximum ID possible in the stream
      Returns:
      The entries with IDs matching the specified range.
    • xrange

      public List<StreamEntry> xrange(String key, StreamEntryID start, StreamEntryID end, int count)
      Description copied from interface: StreamCommands
      XRANGE key start end COUNT count
      Specified by:
      xrange in interface StreamCommands
      Parameters:
      key -
      start - minimum StreamEntryID for the retrieved range, passing null will indicate minimum ID possible in the stream
      end - maximum StreamEntryID for the retrieved range, passing null will indicate maximum ID possible in the stream
      count - maximum number of entries returned
      Returns:
      The entries with IDs matching the specified range.
    • xrevrange

      public List<StreamEntry> xrevrange(String key, StreamEntryID end, StreamEntryID start)
      Description copied from interface: StreamCommands
      XREVRANGE key end start
      Specified by:
      xrevrange in interface StreamCommands
      Parameters:
      key -
      end - maximum StreamEntryID for the retrieved range, passing null will indicate maximum ID possible in the stream
      start - minimum StreamEntryID for the retrieved range, passing null will indicate minimum ID possible in the stream
      Returns:
      the entries with IDs matching the specified range, from the higher ID to the lower ID matching.
    • xrevrange

      public List<StreamEntry> xrevrange(String key, StreamEntryID end, StreamEntryID start, int count)
      Description copied from interface: StreamCommands
      XREVRANGE key end start COUNT count
      Specified by:
      xrevrange in interface StreamCommands
      Parameters:
      key -
      end - maximum StreamEntryID for the retrieved range, passing null will indicate maximum ID possible in the stream
      start - minimum StreamEntryID for the retrieved range, passing null will indicate minimum ID possible in the stream
      count - The entries with IDs matching the specified range.
      Returns:
      the entries with IDs matching the specified range, from the higher ID to the lower ID matching.
    • xrange

      public List<StreamEntry> xrange(String key, String start, String end)
      Specified by:
      xrange in interface StreamCommands
    • xrange

      public List<StreamEntry> xrange(String key, String start, String end, int count)
      Specified by:
      xrange in interface StreamCommands
    • xrevrange

      public List<StreamEntry> xrevrange(String key, String end, String start)
      Specified by:
      xrevrange in interface StreamCommands
    • xrevrange

      public List<StreamEntry> xrevrange(String key, String end, String start, int count)
      Specified by:
      xrevrange in interface StreamCommands
    • xack

      public long xack(String key, String group, StreamEntryID... ids)
      Description copied from interface: StreamCommands
      XACK key group ID [ID ...]
      Specified by:
      xack in interface StreamCommands
    • xgroupCreate

      public String xgroupCreate(String key, String groupName, StreamEntryID id, boolean makeStream)
      Description copied from interface: StreamCommands
      XGROUP CREATE key groupName <id or $>
      Specified by:
      xgroupCreate in interface StreamCommands
    • xgroupSetID

      public String xgroupSetID(String key, String groupName, StreamEntryID id)
      Description copied from interface: StreamCommands
      XGROUP SETID key groupName <id or $>
      Specified by:
      xgroupSetID in interface StreamCommands
    • xgroupDestroy

      public long xgroupDestroy(String key, String groupName)
      Description copied from interface: StreamCommands
      XGROUP DESTROY key groupName
      Specified by:
      xgroupDestroy in interface StreamCommands
    • xgroupCreateConsumer

      public boolean xgroupCreateConsumer(String key, String groupName, String consumerName)
      Description copied from interface: StreamCommands
      XGROUP CREATECONSUMER key groupName consumerName
      Specified by:
      xgroupCreateConsumer in interface StreamCommands
    • xgroupDelConsumer

      public long xgroupDelConsumer(String key, String groupName, String consumerName)
      Description copied from interface: StreamCommands
      XGROUP DELCONSUMER key groupName consumerName
      Specified by:
      xgroupDelConsumer in interface StreamCommands
    • xpending

      public StreamPendingSummary xpending(String key, String groupName)
      Description copied from interface: StreamCommands
      XPENDING key group
      Specified by:
      xpending in interface StreamCommands
    • xpending

      public List<StreamPendingEntry> xpending(String key, String groupName, StreamEntryID start, StreamEntryID end, int count, String consumerName)
      Description copied from interface: StreamCommands
      XPENDING key group [start end count] [consumer]
      Specified by:
      xpending in interface StreamCommands
    • xpending

      public List<StreamPendingEntry> xpending(String key, String groupName, XPendingParams params)
      Description copied from interface: StreamCommands
      XPENDING key group [[IDLE min-idle-time] start end count [consumer]]
      Specified by:
      xpending in interface StreamCommands
    • xdel

      public long xdel(String key, StreamEntryID... ids)
      Description copied from interface: StreamCommands
      XDEL key ID [ID ...]
      Specified by:
      xdel in interface StreamCommands
    • xtrim

      public long xtrim(String key, long maxLen, boolean approximate)
      Description copied from interface: StreamCommands
      XTRIM key MAXLEN [~] count
      Specified by:
      xtrim in interface StreamCommands
    • xtrim

      public long xtrim(String key, XTrimParams params)
      Description copied from interface: StreamCommands
      XTRIM key MAXLEN|MINID [=|~] threshold [LIMIT count]
      Specified by:
      xtrim in interface StreamCommands
    • xclaim

      public List<StreamEntry> xclaim(String key, String group, String consumerName, long minIdleTime, XClaimParams params, StreamEntryID... ids)
      Description copied from interface: StreamCommands
      XCLAIM key group consumer min-idle-time <ID-1> ... <ID-N> [IDLE <milliseconds>] [TIME <mstime>] [RETRYCOUNT <count>] [FORCE]
      Specified by:
      xclaim in interface StreamCommands
    • xclaimJustId

      public List<StreamEntryID> xclaimJustId(String key, String group, String consumerName, long minIdleTime, XClaimParams params, StreamEntryID... ids)
      Description copied from interface: StreamCommands
      XCLAIM key group consumer min-idle-time <ID-1> ... <ID-N> [IDLE <milliseconds>] [TIME <mstime>] [RETRYCOUNT <count>] [FORCE] JUSTID
      Specified by:
      xclaimJustId in interface StreamCommands
    • xautoclaim

      public Map.Entry<StreamEntryID,List<StreamEntry>> xautoclaim(String key, String group, String consumerName, long minIdleTime, StreamEntryID start, XAutoClaimParams params)
      Description copied from interface: StreamCommands
      XAUTOCLAIM key group consumer min-idle-time start [COUNT count]
      Specified by:
      xautoclaim in interface StreamCommands
      Parameters:
      key - Stream Key
      group - Consumer Group
      consumerName - Consumer name to transfer the auto claimed entries
      minIdleTime - Entries pending more than minIdleTime will be transferred ownership
      start - StreamEntryID - Entries ≥ start will be transferred ownership, passing null will indicate '-'
      params - XAutoClaimParams
    • xautoclaimJustId

      public Map.Entry<StreamEntryID,List<StreamEntryID>> xautoclaimJustId(String key, String group, String consumerName, long minIdleTime, StreamEntryID start, XAutoClaimParams params)
      Description copied from interface: StreamCommands
      XAUTOCLAIM key group consumer min-idle-time start [COUNT count] JUSTID
      Specified by:
      xautoclaimJustId in interface StreamCommands
      Parameters:
      key - Stream Key
      group - Consumer Group
      consumerName - Consumer name to transfer the auto claimed entries
      minIdleTime - Entries pending more than minIdleTime will be transferred ownership
      start - StreamEntryID - Entries ≥ start will be transferred ownership, passing null will indicate '-'
      params - XAutoClaimParams
    • xinfoStream

      public StreamInfo xinfoStream(String key)
      Description copied from interface: StreamCommands
      Introspection command used in order to retrieve different information about the stream
      Specified by:
      xinfoStream in interface StreamCommands
      Parameters:
      key - Stream name
      Returns:
      StreamInfo that contains information about the stream
    • xinfoStreamFull

      public StreamFullInfo xinfoStreamFull(String key)
      Description copied from interface: StreamCommands
      Introspection command used in order to retrieve all information about the stream
      Specified by:
      xinfoStreamFull in interface StreamCommands
      Parameters:
      key - Stream name
      Returns:
      StreamFullInfo that contains information about the stream
    • xinfoStreamFull

      public StreamFullInfo xinfoStreamFull(String key, int count)
      Description copied from interface: StreamCommands
      Introspection command used in order to retrieve all information about the stream
      Specified by:
      xinfoStreamFull in interface StreamCommands
      Parameters:
      key - Stream name
      count - stream info count
      Returns:
      StreamFullInfo that contains information about the stream
    • xinfoGroup

      @Deprecated public List<StreamGroupInfo> xinfoGroup(String key)
      Deprecated.
      Specified by:
      xinfoGroup in interface StreamCommands
    • xinfoGroups

      public List<StreamGroupInfo> xinfoGroups(String key)
      Description copied from interface: StreamCommands
      Introspection command used in order to retrieve different information about groups in the stream
      Specified by:
      xinfoGroups in interface StreamCommands
      Parameters:
      key - Stream name
      Returns:
      List of StreamGroupInfo containing information about groups
    • xinfoConsumers

      public List<StreamConsumersInfo> xinfoConsumers(String key, String group)
      Description copied from interface: StreamCommands
      Introspection command used in order to retrieve different information about consumers in the group
      Specified by:
      xinfoConsumers in interface StreamCommands
      Parameters:
      key - Stream name
      group - Group name
      Returns:
      List of StreamConsumersInfo containing information about consumers that belong to the the group
    • xread

      public List<Map.Entry<String,List<StreamEntry>>> xread(XReadParams xReadParams, Map<String,StreamEntryID> streams)
      Description copied from interface: StreamCommands
      XREAD [COUNT count] [BLOCK milliseconds] STREAMS key [key ...] ID [ID ...]
      Specified by:
      xread in interface StreamCommands
    • xreadGroup

      public List<Map.Entry<String,List<StreamEntry>>> xreadGroup(String groupName, String consumer, XReadGroupParams xReadGroupParams, Map<String,StreamEntryID> streams)
      Description copied from interface: StreamCommands
      XREAD [COUNT count] [BLOCK milliseconds] STREAMS key [key ...] ID [ID ...]
      Specified by:
      xreadGroup in interface StreamCommands
    • xadd

      public byte[] xadd(byte[] key, XAddParams params, Map<byte[],byte[]> hash)
      Specified by:
      xadd in interface StreamBinaryCommands
    • xlen

      public long xlen(byte[] key)
      Specified by:
      xlen in interface StreamBinaryCommands
    • xrange

      public List<Object> xrange(byte[] key, byte[] start, byte[] end)
      Specified by:
      xrange in interface StreamBinaryCommands
    • xrange

      public List<Object> xrange(byte[] key, byte[] start, byte[] end, int count)
      Specified by:
      xrange in interface StreamBinaryCommands
    • xrevrange

      public List<Object> xrevrange(byte[] key, byte[] end, byte[] start)
      Specified by:
      xrevrange in interface StreamBinaryCommands
    • xrevrange

      public List<Object> xrevrange(byte[] key, byte[] end, byte[] start, int count)
      Specified by:
      xrevrange in interface StreamBinaryCommands
    • xack

      public long xack(byte[] key, byte[] group, byte[]... ids)
      Specified by:
      xack in interface StreamBinaryCommands
    • xgroupCreate

      public String xgroupCreate(byte[] key, byte[] groupName, byte[] id, boolean makeStream)
      Specified by:
      xgroupCreate in interface StreamBinaryCommands
    • xgroupSetID

      public String xgroupSetID(byte[] key, byte[] groupName, byte[] id)
      Specified by:
      xgroupSetID in interface StreamBinaryCommands
    • xgroupDestroy

      public long xgroupDestroy(byte[] key, byte[] groupName)
      Specified by:
      xgroupDestroy in interface StreamBinaryCommands
    • xgroupCreateConsumer

      public boolean xgroupCreateConsumer(byte[] key, byte[] groupName, byte[] consumerName)
      Specified by:
      xgroupCreateConsumer in interface StreamBinaryCommands
    • xgroupDelConsumer

      public long xgroupDelConsumer(byte[] key, byte[] groupName, byte[] consumerName)
      Specified by:
      xgroupDelConsumer in interface StreamBinaryCommands
    • xdel

      public long xdel(byte[] key, byte[]... ids)
      Specified by:
      xdel in interface StreamBinaryCommands
    • xtrim

      public long xtrim(byte[] key, long maxLen, boolean approximateLength)
      Specified by:
      xtrim in interface StreamBinaryCommands
    • xtrim

      public long xtrim(byte[] key, XTrimParams params)
      Specified by:
      xtrim in interface StreamBinaryCommands
    • xpending

      public Object xpending(byte[] key, byte[] groupName)
      Specified by:
      xpending in interface StreamBinaryCommands
    • xpending

      public List<Object> xpending(byte[] key, byte[] groupName, byte[] start, byte[] end, int count, byte[] consumerName)
      Specified by:
      xpending in interface StreamBinaryCommands
    • xpending

      public List<Object> xpending(byte[] key, byte[] groupName, XPendingParams params)
      Specified by:
      xpending in interface StreamBinaryCommands
    • xclaim

      public List<byte[]> xclaim(byte[] key, byte[] group, byte[] consumerName, long minIdleTime, XClaimParams params, byte[]... ids)
      Specified by:
      xclaim in interface StreamBinaryCommands
    • xclaimJustId

      public List<byte[]> xclaimJustId(byte[] key, byte[] group, byte[] consumerName, long minIdleTime, XClaimParams params, byte[]... ids)
      Specified by:
      xclaimJustId in interface StreamBinaryCommands
    • xautoclaim

      public List<Object> xautoclaim(byte[] key, byte[] groupName, byte[] consumerName, long minIdleTime, byte[] start, XAutoClaimParams params)
      Specified by:
      xautoclaim in interface StreamBinaryCommands
    • xautoclaimJustId

      public List<Object> xautoclaimJustId(byte[] key, byte[] groupName, byte[] consumerName, long minIdleTime, byte[] start, XAutoClaimParams params)
      Specified by:
      xautoclaimJustId in interface StreamBinaryCommands
    • xinfoStream

      public Object xinfoStream(byte[] key)
      Specified by:
      xinfoStream in interface StreamBinaryCommands
    • xinfoStreamFull

      public Object xinfoStreamFull(byte[] key)
      Description copied from interface: StreamBinaryCommands
      Introspection command used in order to retrieve all information about the stream
      Specified by:
      xinfoStreamFull in interface StreamBinaryCommands
      Parameters:
      key - Stream name
    • xinfoStreamFull

      public Object xinfoStreamFull(byte[] key, int count)
      Description copied from interface: StreamBinaryCommands
      Introspection command used in order to retrieve all information about the stream
      Specified by:
      xinfoStreamFull in interface StreamBinaryCommands
      Parameters:
      key - Stream name
      count - stream info count
    • xinfoGroup

      @Deprecated public List<Object> xinfoGroup(byte[] key)
      Deprecated.
      Specified by:
      xinfoGroup in interface StreamBinaryCommands
    • xinfoGroups

      public List<Object> xinfoGroups(byte[] key)
      Specified by:
      xinfoGroups in interface StreamBinaryCommands
    • xinfoConsumers

      public List<Object> xinfoConsumers(byte[] key, byte[] group)
      Specified by:
      xinfoConsumers in interface StreamBinaryCommands
    • xread

      public List<Object> xread(XReadParams xReadParams, Map.Entry<byte[],byte[]>... streams)
      Specified by:
      xread in interface StreamBinaryCommands
    • xreadGroup

      public List<Object> xreadGroup(byte[] groupName, byte[] consumer, XReadGroupParams xReadGroupParams, Map.Entry<byte[],byte[]>... streams)
      Specified by:
      xreadGroup in interface StreamBinaryCommands
    • eval

      public Object eval(String script)
      Description copied from interface: ScriptingKeyCommands
      Eval Command Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.
      Specified by:
      eval in interface ScriptingKeyCommands
      Parameters:
      script - Lua 5.1 script. The script does not need to define a Lua function (and should not). It is just a Lua program that will run in the context of the Redis server.
      Returns:
      The result of the evaluated script
    • eval

      public Object eval(String script, int keyCount, String... params)
      Description copied from interface: ScriptingKeyCommands
      Eval Command Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.
      Specified by:
      eval in interface ScriptingKeyCommands
      Parameters:
      script - Lua 5.1 script. The script does not need to define a Lua function (and should not). It is just a Lua program that will run in the context of the Redis server.
      keyCount - the count of the provided keys
      params - arguments that can be accessed from the script
      Returns:
      The result of the evaluated script
    • eval

      public Object eval(String script, List<String> keys, List<String> args)
      Description copied from interface: ScriptingKeyCommands
      Eval Command Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.
      Specified by:
      eval in interface ScriptingKeyCommands
      Parameters:
      script - Lua 5.1 script. The script does not need to define a Lua function (and should not). It is just a Lua program that will run in the context of the Redis server.
      keys - arguments that can be accessed by the script
      args - additional arguments should not represent key names and can be accessed by the script
      Returns:
      The result of the evaluated script
    • evalReadonly

      public Object evalReadonly(String script, List<String> keys, List<String> args)
      Description copied from interface: ScriptingKeyCommands
      Readonly version of EVAL
      Specified by:
      evalReadonly in interface ScriptingKeyCommands
      Parameters:
      script - Lua 5.1 script. The script does not need to define a Lua function (and should not). It is just a Lua program that will run in the context of the Redis server.
      keys - arguments that can be accessed by the script
      args - additional arguments should not represent key names and can be accessed by the script
      Returns:
      The result of the evaluated script
      See Also:
    • evalsha

      public Object evalsha(String sha1)
      Description copied from interface: ScriptingKeyCommands
      EvalSha Command Similar to EVAL, but the script cached on the server side by its SHA1 digest. Scripts are cached on the server side using the SCRIPT LOAD command.
      Specified by:
      evalsha in interface ScriptingKeyCommands
      Parameters:
      sha1 - the script
      Returns:
      The result of the evaluated script
      See Also:
    • evalsha

      public Object evalsha(String sha1, int keyCount, String... params)
      Description copied from interface: ScriptingKeyCommands
      EvalSha Command Similar to ScriptingKeyCommands.eval(String, int, String...) EVAL}, but the script cached on the server side by its SHA1 digest. Scripts are cached on the server side using the SCRIPT LOAD command.
      Specified by:
      evalsha in interface ScriptingKeyCommands
      Parameters:
      sha1 - the script
      Returns:
      The result of the evaluated script
      See Also:
    • evalsha

      public Object evalsha(String sha1, List<String> keys, List<String> args)
      Description copied from interface: ScriptingKeyCommands
      EvalSha Command Similar to ScriptingKeyCommands.eval(String, List, List) EVAL}, but the script cached on the server side by its SHA1 digest. Scripts are cached on the server side using the SCRIPT LOAD command.
      Specified by:
      evalsha in interface ScriptingKeyCommands
      Parameters:
      sha1 - the script
      Returns:
      The result of the evaluated script
      See Also:
    • evalshaReadonly

      public Object evalshaReadonly(String sha1, List<String> keys, List<String> args)
      Description copied from interface: ScriptingKeyCommands
      Readonly version of EVAL
      Specified by:
      evalshaReadonly in interface ScriptingKeyCommands
      Parameters:
      sha1 - the script
      Returns:
      The result of the evaluated script
      See Also:
    • eval

      public Object eval(byte[] script)
      Specified by:
      eval in interface ScriptingKeyBinaryCommands
    • eval

      public Object eval(byte[] script, int keyCount, byte[]... params)
      Specified by:
      eval in interface ScriptingKeyBinaryCommands
    • eval

      public Object eval(byte[] script, List<byte[]> keys, List<byte[]> args)
      Specified by:
      eval in interface ScriptingKeyBinaryCommands
    • evalReadonly

      public Object evalReadonly(byte[] script, List<byte[]> keys, List<byte[]> args)
      Specified by:
      evalReadonly in interface ScriptingKeyBinaryCommands
    • evalsha

      public Object evalsha(byte[] sha1)
      Specified by:
      evalsha in interface ScriptingKeyBinaryCommands
    • evalsha

      public Object evalsha(byte[] sha1, int keyCount, byte[]... params)
      Specified by:
      evalsha in interface ScriptingKeyBinaryCommands
    • evalsha

      public Object evalsha(byte[] sha1, List<byte[]> keys, List<byte[]> args)
      Specified by:
      evalsha in interface ScriptingKeyBinaryCommands
    • evalshaReadonly

      public Object evalshaReadonly(byte[] sha1, List<byte[]> keys, List<byte[]> args)
      Specified by:
      evalshaReadonly in interface ScriptingKeyBinaryCommands
    • fcall

      public Object fcall(String name, List<String> keys, List<String> args)
      Description copied from interface: FunctionCommands
      Invoke a function.
      Specified by:
      fcall in interface FunctionCommands
      Parameters:
      name -
      keys -
      args -
    • fcallReadonly

      public Object fcallReadonly(String name, List<String> keys, List<String> args)
      Description copied from interface: FunctionCommands
      This is a read-only variant of the FCALL command that cannot execute commands that modify data.
      Specified by:
      fcallReadonly in interface FunctionCommands
    • functionDelete

      public String functionDelete(String libraryName)
      Description copied from interface: FunctionCommands
      This command deletes the library called library-name and all functions in it. If the library doesn't exist, the server returns an error.
      Specified by:
      functionDelete in interface FunctionCommands
      Parameters:
      libraryName -
      Returns:
      OK
    • functionFlush

      public String functionFlush()
      Description copied from interface: FunctionCommands
      Deletes all the libraries, unless called with the optional mode argument, the 'lazyfree-lazy-user-flush' configuration directive sets the effective behavior.
      Specified by:
      functionFlush in interface FunctionBinaryCommands
      Specified by:
      functionFlush in interface FunctionCommands
      Returns:
      OK
    • functionFlush

      public String functionFlush(FlushMode mode)
      Description copied from interface: FunctionCommands
      Deletes all the libraries, unless called with the optional mode argument, the 'lazyfree-lazy-user-flush' configuration directive sets the effective behavior.
      Specified by:
      functionFlush in interface FunctionBinaryCommands
      Specified by:
      functionFlush in interface FunctionCommands
      Parameters:
      mode - ASYNC: Asynchronously flush the libraries, SYNC: Synchronously flush the libraries.
      Returns:
      OK
    • functionKill

      public String functionKill()
      Description copied from interface: FunctionCommands
      Kill a function that is currently executing. The command can be used only on functions that did not modify the dataset during their execution.
      Specified by:
      functionKill in interface FunctionBinaryCommands
      Specified by:
      functionKill in interface FunctionCommands
      Returns:
      OK
    • functionList

      public List<LibraryInfo> functionList()
      Description copied from interface: FunctionCommands
      Return information about the functions and libraries.
      Specified by:
      functionList in interface FunctionCommands
      Returns:
      LibraryInfo
    • functionList

      public List<LibraryInfo> functionList(String libraryNamePattern)
      Description copied from interface: FunctionCommands
      Return information about the functions and libraries.
      Specified by:
      functionList in interface FunctionCommands
      Parameters:
      libraryNamePattern - a pattern for matching library names
      Returns:
      LibraryInfo
    • functionListWithCode

      public List<LibraryInfo> functionListWithCode()
      Description copied from interface: FunctionCommands
      Similar to FUNCTION LIST but include the libraries source implementation in the reply.
      Specified by:
      functionListWithCode in interface FunctionCommands
      Returns:
      LibraryInfo
      See Also:
    • functionListWithCode

      public List<LibraryInfo> functionListWithCode(String libraryNamePattern)
      Description copied from interface: FunctionCommands
      Similar to FUNCTION LIST but include the libraries source implementation in the reply.
      Specified by:
      functionListWithCode in interface FunctionCommands
      Parameters:
      libraryNamePattern - a pattern for matching library names
      Returns:
      LibraryInfo
      See Also:
    • functionLoad

      public String functionLoad(String functionCode)
      Description copied from interface: FunctionCommands
      Load a library to Redis.

      The library payload must start with Shebang statement that provides a metadata about the library (like the engine to use and the library name). Shebang format: #!<engine name> name=<library name>. Currently engine name must be lua.

      Specified by:
      functionLoad in interface FunctionCommands
      Parameters:
      functionCode - the source code.
      Returns:
      The library name that was loaded
    • functionLoadReplace

      public String functionLoadReplace(String functionCode)
      Description copied from interface: FunctionCommands
      Load a library to Redis. Will replace the current library if it already exists.
      Specified by:
      functionLoadReplace in interface FunctionCommands
      Parameters:
      functionCode - the source code
      Returns:
      The library name that was loaded
    • functionStats

      public FunctionStats functionStats()
      Description copied from interface: FunctionCommands
      Return information about the function that's currently running and information about the available execution engines.
      Specified by:
      functionStats in interface FunctionCommands
      Returns:
      FunctionStats
    • fcall

      public Object fcall(byte[] name, List<byte[]> keys, List<byte[]> args)
      Description copied from interface: FunctionBinaryCommands
      Invoke a function.
      Specified by:
      fcall in interface FunctionBinaryCommands
      Parameters:
      name -
      keys -
      args -
      Returns:
    • fcallReadonly

      public Object fcallReadonly(byte[] name, List<byte[]> keys, List<byte[]> args)
      Specified by:
      fcallReadonly in interface FunctionBinaryCommands
    • functionDelete

      public String functionDelete(byte[] libraryName)
      Description copied from interface: FunctionBinaryCommands
      This command deletes the library called library-name and all functions in it. If the library doesn't exist, the server returns an error.
      Specified by:
      functionDelete in interface FunctionBinaryCommands
      Parameters:
      libraryName -
      Returns:
      OK
    • functionDump

      public byte[] functionDump()
      Description copied from interface: FunctionCommands
      Return the serialized payload of loaded libraries. You can restore the serialized payload later with the FUNCTION RESTORE command.
      Specified by:
      functionDump in interface FunctionBinaryCommands
      Specified by:
      functionDump in interface FunctionCommands
      Returns:
      the serialized payload
    • functionListBinary

      public List<Object> functionListBinary()
      Description copied from interface: FunctionBinaryCommands
      Return information about the functions and libraries.
      Specified by:
      functionListBinary in interface FunctionBinaryCommands
      Returns:
      LibraryInfo
    • functionList

      public List<Object> functionList(byte[] libraryNamePattern)
      Description copied from interface: FunctionBinaryCommands
      Return information about the functions and libraries.
      Specified by:
      functionList in interface FunctionBinaryCommands
      Parameters:
      libraryNamePattern - a pattern for matching library names
      Returns:
      LibraryInfo
    • functionListWithCodeBinary

      public List<Object> functionListWithCodeBinary()
      Description copied from interface: FunctionBinaryCommands
      Similar to FUNCTION LIST but include the libraries source implementation in the reply.
      Specified by:
      functionListWithCodeBinary in interface FunctionBinaryCommands
      Returns:
      LibraryInfo
      See Also:
    • functionListWithCode

      public List<Object> functionListWithCode(byte[] libraryNamePattern)
      Description copied from interface: FunctionBinaryCommands
      Similar to FUNCTION LIST but include the libraries source implementation in the reply.
      Specified by:
      functionListWithCode in interface FunctionBinaryCommands
      Parameters:
      libraryNamePattern - a pattern for matching library names
      Returns:
      LibraryInfo
      See Also:
    • functionLoad

      public String functionLoad(byte[] functionCode)
      Description copied from interface: FunctionBinaryCommands
      Load a library to Redis.

      The library payload must start with Shebang statement that provides a metadata about the library (like the engine to use and the library name). Shebang format: #!<engine name> name=<library name>. Currently engine name must be lua.

      Specified by:
      functionLoad in interface FunctionBinaryCommands
      Parameters:
      functionCode - the source code.
      Returns:
      The library name that was loaded
    • functionLoadReplace

      public String functionLoadReplace(byte[] functionCode)
      Description copied from interface: FunctionBinaryCommands
      Load a library to Redis. Will replace the current library if it already exists.
      Specified by:
      functionLoadReplace in interface FunctionBinaryCommands
      Parameters:
      functionCode - the source code
      Returns:
      The library name that was loaded
    • functionRestore

      public String functionRestore(byte[] serializedValue)
      Description copied from interface: FunctionCommands
      Restore libraries from the serialized payload. Default policy is APPEND.
      Specified by:
      functionRestore in interface FunctionBinaryCommands
      Specified by:
      functionRestore in interface FunctionCommands
      Parameters:
      serializedValue - the serialized payload
      Returns:
      OK
    • functionRestore

      public String functionRestore(byte[] serializedValue, FunctionRestorePolicy policy)
      Description copied from interface: FunctionCommands
      Restore libraries from the serialized payload.
      Specified by:
      functionRestore in interface FunctionBinaryCommands
      Specified by:
      functionRestore in interface FunctionCommands
      Parameters:
      serializedValue - the serialized payload
      policy - can be FLUSH, APPEND or REPLACE
      Returns:
      OK
    • functionStatsBinary

      public Object functionStatsBinary()
      Description copied from interface: FunctionBinaryCommands
      Return information about the function that's currently running and information about the available execution engines.
      Specified by:
      functionStatsBinary in interface FunctionBinaryCommands
      Returns:
      FunctionStats
    • objectRefcount

      public Long objectRefcount(String key)
      Description copied from interface: KeyCommands
      Object Refcount Command Return the reference count of the stored at key.

      Time complexity: O(1)

      Specified by:
      objectRefcount in interface KeyCommands
      Parameters:
      key -
      Returns:
      The number of references
    • objectEncoding

      public String objectEncoding(String key)
      Description copied from interface: KeyCommands
      Object Encoding Command Return the internal encoding for the Redis object stored at key.

      Time complexity: O(1)

      Specified by:
      objectEncoding in interface KeyCommands
      Parameters:
      key -
      Returns:
      The encoding of the object
    • objectIdletime

      public Long objectIdletime(String key)
      Description copied from interface: KeyCommands
      Object IdleTime Command Return the time in seconds since the last access to the value stored at key.

      Time complexity: O(1)

      Specified by:
      objectIdletime in interface KeyCommands
      Parameters:
      key -
      Returns:
      The idle time in seconds
    • objectFreq

      public Long objectFreq(String key)
      Description copied from interface: KeyCommands
      Object Freq Command Return the logarithmic access frequency counter of a Redis object stored at key.

      Time complexity: O(1)

      Specified by:
      objectFreq in interface KeyCommands
      Parameters:
      key -
      Returns:
      The counter's value
    • objectRefcount

      public Long objectRefcount(byte[] key)
      Specified by:
      objectRefcount in interface KeyBinaryCommands
    • objectEncoding

      public byte[] objectEncoding(byte[] key)
      Specified by:
      objectEncoding in interface KeyBinaryCommands
    • objectIdletime

      public Long objectIdletime(byte[] key)
      Specified by:
      objectIdletime in interface KeyBinaryCommands
    • objectFreq

      public Long objectFreq(byte[] key)
      Specified by:
      objectFreq in interface KeyBinaryCommands
    • migrate

      public String migrate(String host, int port, String key, int timeout)
      Description copied from interface: KeyCommands
      Migrate Command Atomically transfer a key from a source Redis instance to a destination Redis instance. On success the key is deleted from the original instance and is guaranteed to exist in the target instance.
      Specified by:
      migrate in interface KeyCommands
      Parameters:
      host -
      port -
      key -
      timeout - the maximum idle time in any moment of the communication with the destination instance in milliseconds.
      Returns:
      OK on success, or NOKEY if no keys were found in the source instance.
    • migrate

      public String migrate(String host, int port, int timeout, MigrateParams params, String... keys)
      Description copied from interface: KeyCommands
      Migrate Command Atomically transfer a key from a source Redis instance to a destination Redis instance. On success the key is deleted from the original instance and is guaranteed to exist in the target instance.
      Specified by:
      migrate in interface KeyCommands
      Parameters:
      host -
      port -
      timeout - the maximum idle time in any moment of the communication with the destination instance in milliseconds.
      params - MigrateParams
      keys -
      Returns:
      OK on success, or NOKEY if no keys were found in the source instance.
    • migrate

      public String migrate(String host, int port, byte[] key, int timeout)
      Specified by:
      migrate in interface KeyBinaryCommands
    • migrate

      public String migrate(String host, int port, int timeout, MigrateParams params, byte[]... keys)
      Specified by:
      migrate in interface KeyBinaryCommands
    • waitReplicas

      public long waitReplicas(String sampleKey, int replicas, long timeout)
      Specified by:
      waitReplicas in interface SampleKeyedCommands
    • waitReplicas

      public long waitReplicas(byte[] sampleKey, int replicas, long timeout)
      Specified by:
      waitReplicas in interface SampleBinaryKeyedCommands
    • waitAOF

      public KeyValue<Long,Long> waitAOF(String sampleKey, long numLocal, long numReplicas, long timeout)
      Specified by:
      waitAOF in interface SampleKeyedCommands
    • waitAOF

      public KeyValue<Long,Long> waitAOF(byte[] sampleKey, long numLocal, long numReplicas, long timeout)
      Specified by:
      waitAOF in interface SampleBinaryKeyedCommands
    • eval

      public Object eval(String script, String sampleKey)
      Specified by:
      eval in interface SampleKeyedCommands
    • evalsha

      public Object evalsha(String sha1, String sampleKey)
      Specified by:
      evalsha in interface SampleKeyedCommands
    • eval

      public Object eval(byte[] script, byte[] sampleKey)
      Specified by:
      eval in interface SampleBinaryKeyedCommands
    • evalsha

      public Object evalsha(byte[] sha1, byte[] sampleKey)
      Specified by:
      evalsha in interface SampleBinaryKeyedCommands
    • scriptExists

      public List<Boolean> scriptExists(List<String> sha1s)
    • scriptExists

      public Boolean scriptExists(String sha1, String sampleKey)
      Specified by:
      scriptExists in interface SampleKeyedCommands
    • scriptExists

      public List<Boolean> scriptExists(String sampleKey, String... sha1s)
      Specified by:
      scriptExists in interface SampleKeyedCommands
    • scriptExists

      public Boolean scriptExists(byte[] sha1, byte[] sampleKey)
      Specified by:
      scriptExists in interface SampleBinaryKeyedCommands
    • scriptExists

      public List<Boolean> scriptExists(byte[] sampleKey, byte[]... sha1s)
      Specified by:
      scriptExists in interface SampleBinaryKeyedCommands
    • scriptLoad

      public String scriptLoad(String script)
    • scriptLoad

      public String scriptLoad(String script, String sampleKey)
      Specified by:
      scriptLoad in interface SampleKeyedCommands
    • scriptFlush

      public String scriptFlush()
    • scriptFlush

      public String scriptFlush(String sampleKey)
      Specified by:
      scriptFlush in interface SampleKeyedCommands
    • scriptFlush

      public String scriptFlush(String sampleKey, FlushMode flushMode)
      Specified by:
      scriptFlush in interface SampleKeyedCommands
    • scriptKill

      public String scriptKill()
    • scriptKill

      public String scriptKill(String sampleKey)
      Specified by:
      scriptKill in interface SampleKeyedCommands
    • scriptLoad

      public byte[] scriptLoad(byte[] script, byte[] sampleKey)
      Specified by:
      scriptLoad in interface SampleBinaryKeyedCommands
    • scriptFlush

      public String scriptFlush(byte[] sampleKey)
      Specified by:
      scriptFlush in interface SampleBinaryKeyedCommands
    • scriptFlush

      public String scriptFlush(byte[] sampleKey, FlushMode flushMode)
      Specified by:
      scriptFlush in interface SampleBinaryKeyedCommands
    • scriptKill

      public String scriptKill(byte[] sampleKey)
      Specified by:
      scriptKill in interface SampleBinaryKeyedCommands
    • slowlogReset

      public String slowlogReset()
    • publish

      public long publish(String channel, String message)
    • publish

      public long publish(byte[] channel, byte[] message)
    • subscribe

      public void subscribe(JedisPubSub jedisPubSub, String... channels)
    • psubscribe

      public void psubscribe(JedisPubSub jedisPubSub, String... patterns)
    • subscribe

      public void subscribe(BinaryJedisPubSub jedisPubSub, byte[]... channels)
    • psubscribe

      public void psubscribe(BinaryJedisPubSub jedisPubSub, byte[]... patterns)
    • strAlgoLCSStrings

      public LCSMatchResult strAlgoLCSStrings(String strA, String strB, StrAlgoLCSParams params)
    • strAlgoLCSStrings

      public LCSMatchResult strAlgoLCSStrings(byte[] strA, byte[] strB, StrAlgoLCSParams params)
    • hsetObject

      public long hsetObject(String key, String field, Object value)
    • hsetObject

      public long hsetObject(String key, Map<String,Object> hash)
    • ftCreate

      public String ftCreate(String indexName, IndexOptions indexOptions, Schema schema)
      Specified by:
      ftCreate in interface RediSearchCommands
    • ftCreate

      public String ftCreate(String indexName, FTCreateParams createParams, Iterable<SchemaField> schemaFields)
      Specified by:
      ftCreate in interface RediSearchCommands
    • ftAlter

      public String ftAlter(String indexName, Schema schema)
      Specified by:
      ftAlter in interface RediSearchCommands
    • ftAlter

      public String ftAlter(String indexName, Iterable<SchemaField> schemaFields)
      Specified by:
      ftAlter in interface RediSearchCommands
    • ftSearch

      public SearchResult ftSearch(String indexName, String query)
      Specified by:
      ftSearch in interface RediSearchCommands
    • ftSearch

      public SearchResult ftSearch(String indexName, String query, FTSearchParams params)
      Specified by:
      ftSearch in interface RediSearchCommands
    • ftSearchIteration

      public FtSearchIteration ftSearchIteration(int batchSize, String indexName, String query, FTSearchParams params)
      Parameters:
      batchSize - batch size
      indexName - index name
      query - query
      params - limit will be ignored
      Returns:
      search iteration
    • ftSearch

      public SearchResult ftSearch(String indexName, Query query)
      Specified by:
      ftSearch in interface RediSearchCommands
    • ftSearchIteration

      public FtSearchIteration ftSearchIteration(int batchSize, String indexName, Query query)
      Parameters:
      batchSize - batch size
      indexName - index name
      query - limit will be ignored
      Returns:
      search iteration
    • ftSearch

      public SearchResult ftSearch(byte[] indexName, Query query)
      Specified by:
      ftSearch in interface RediSearchCommands
    • ftExplain

      public String ftExplain(String indexName, Query query)
      Specified by:
      ftExplain in interface RediSearchCommands
    • ftExplainCLI

      public List<String> ftExplainCLI(String indexName, Query query)
      Specified by:
      ftExplainCLI in interface RediSearchCommands
    • ftAggregate

      public AggregationResult ftAggregate(String indexName, AggregationBuilder aggr)
      Specified by:
      ftAggregate in interface RediSearchCommands
    • ftCursorRead

      public AggregationResult ftCursorRead(String indexName, long cursorId, int count)
      Specified by:
      ftCursorRead in interface RediSearchCommands
    • ftCursorDel

      public String ftCursorDel(String indexName, long cursorId)
      Specified by:
      ftCursorDel in interface RediSearchCommands
    • ftAggregateIteration

      public FtAggregateIteration ftAggregateIteration(String indexName, AggregationBuilder aggr)
      CURSOR must be set.
      Parameters:
      indexName - index name
      aggr - cursor must be set
      Returns:
      aggregate iteration
    • ftProfileAggregate

      public Map.Entry<AggregationResult,Map<String,Object>> ftProfileAggregate(String indexName, FTProfileParams profileParams, AggregationBuilder aggr)
      Specified by:
      ftProfileAggregate in interface RediSearchCommands
    • ftProfileSearch

      public Map.Entry<SearchResult,Map<String,Object>> ftProfileSearch(String indexName, FTProfileParams profileParams, Query query)
      Specified by:
      ftProfileSearch in interface RediSearchCommands
    • ftProfileSearch

      public Map.Entry<SearchResult,Map<String,Object>> ftProfileSearch(String indexName, FTProfileParams profileParams, String query, FTSearchParams searchParams)
      Specified by:
      ftProfileSearch in interface RediSearchCommands
    • ftDropIndex

      public String ftDropIndex(String indexName)
      Specified by:
      ftDropIndex in interface RediSearchCommands
    • ftDropIndexDD

      public String ftDropIndexDD(String indexName)
      Specified by:
      ftDropIndexDD in interface RediSearchCommands
    • ftSynUpdate

      public String ftSynUpdate(String indexName, String synonymGroupId, String... terms)
      Specified by:
      ftSynUpdate in interface RediSearchCommands
    • ftSynDump

      public Map<String,List<String>> ftSynDump(String indexName)
      Specified by:
      ftSynDump in interface RediSearchCommands
    • ftDictAdd

      public long ftDictAdd(String dictionary, String... terms)
      Specified by:
      ftDictAdd in interface RediSearchCommands
    • ftDictDel

      public long ftDictDel(String dictionary, String... terms)
      Specified by:
      ftDictDel in interface RediSearchCommands
    • ftDictDump

      public Set<String> ftDictDump(String dictionary)
      Specified by:
      ftDictDump in interface RediSearchCommands
    • ftDictAddBySampleKey

      public long ftDictAddBySampleKey(String indexName, String dictionary, String... terms)
      Specified by:
      ftDictAddBySampleKey in interface RediSearchCommands
    • ftDictDelBySampleKey

      public long ftDictDelBySampleKey(String indexName, String dictionary, String... terms)
      Specified by:
      ftDictDelBySampleKey in interface RediSearchCommands
    • ftDictDumpBySampleKey

      public Set<String> ftDictDumpBySampleKey(String indexName, String dictionary)
      Specified by:
      ftDictDumpBySampleKey in interface RediSearchCommands
    • ftSpellCheck

      public Map<String,Map<String,Double>> ftSpellCheck(String index, String query)
      Specified by:
      ftSpellCheck in interface RediSearchCommands
    • ftSpellCheck

      public Map<String,Map<String,Double>> ftSpellCheck(String index, String query, FTSpellCheckParams spellCheckParams)
      Specified by:
      ftSpellCheck in interface RediSearchCommands
    • ftInfo

      public Map<String,Object> ftInfo(String indexName)
      Specified by:
      ftInfo in interface RediSearchCommands
    • ftTagVals

      public Set<String> ftTagVals(String indexName, String fieldName)
      Specified by:
      ftTagVals in interface RediSearchCommands
    • ftAliasAdd

      public String ftAliasAdd(String aliasName, String indexName)
      Specified by:
      ftAliasAdd in interface RediSearchCommands
    • ftAliasUpdate

      public String ftAliasUpdate(String aliasName, String indexName)
      Specified by:
      ftAliasUpdate in interface RediSearchCommands
    • ftAliasDel

      public String ftAliasDel(String aliasName)
      Specified by:
      ftAliasDel in interface RediSearchCommands
    • ftConfigGet

      public Map<String,String> ftConfigGet(String option)
      Specified by:
      ftConfigGet in interface RediSearchCommands
    • ftConfigGet

      public Map<String,String> ftConfigGet(String indexName, String option)
      Specified by:
      ftConfigGet in interface RediSearchCommands
    • ftConfigSet

      public String ftConfigSet(String option, String value)
      Specified by:
      ftConfigSet in interface RediSearchCommands
    • ftConfigSet

      public String ftConfigSet(String indexName, String option, String value)
      Specified by:
      ftConfigSet in interface RediSearchCommands
    • ftSugAdd

      public long ftSugAdd(String key, String string, double score)
      Specified by:
      ftSugAdd in interface RediSearchCommands
    • ftSugAddIncr

      public long ftSugAddIncr(String key, String string, double score)
      Specified by:
      ftSugAddIncr in interface RediSearchCommands
    • ftSugGet

      public List<String> ftSugGet(String key, String prefix)
      Specified by:
      ftSugGet in interface RediSearchCommands
    • ftSugGet

      public List<String> ftSugGet(String key, String prefix, boolean fuzzy, int max)
      Specified by:
      ftSugGet in interface RediSearchCommands
    • ftSugGetWithScores

      public List<Tuple> ftSugGetWithScores(String key, String prefix)
      Specified by:
      ftSugGetWithScores in interface RediSearchCommands
    • ftSugGetWithScores

      public List<Tuple> ftSugGetWithScores(String key, String prefix, boolean fuzzy, int max)
      Specified by:
      ftSugGetWithScores in interface RediSearchCommands
    • ftSugDel

      public boolean ftSugDel(String key, String string)
      Specified by:
      ftSugDel in interface RediSearchCommands
    • ftSugLen

      public long ftSugLen(String key)
      Specified by:
      ftSugLen in interface RediSearchCommands
    • ftList

      public List<String> ftList()
      Specified by:
      ftList in interface RediSearchCommands
    • jsonSet

      public String jsonSet(String key, Path2 path, Object object)
      Specified by:
      jsonSet in interface RedisJsonCommands
    • jsonSetWithEscape

      public String jsonSetWithEscape(String key, Path2 path, Object object)
      Specified by:
      jsonSetWithEscape in interface RedisJsonCommands
    • jsonSet

      public String jsonSet(String key, Path path, Object pojo)
      Specified by:
      jsonSet in interface RedisJsonCommands
    • jsonSetWithPlainString

      public String jsonSetWithPlainString(String key, Path path, String string)
      Specified by:
      jsonSetWithPlainString in interface RedisJsonCommands
    • jsonSet

      public String jsonSet(String key, Path2 path, Object pojo, JsonSetParams params)
      Specified by:
      jsonSet in interface RedisJsonCommands
    • jsonSetWithEscape

      public String jsonSetWithEscape(String key, Path2 path, Object pojo, JsonSetParams params)
      Specified by:
      jsonSetWithEscape in interface RedisJsonCommands
    • jsonSet

      public String jsonSet(String key, Path path, Object pojo, JsonSetParams params)
      Specified by:
      jsonSet in interface RedisJsonCommands
    • jsonGet

      public Object jsonGet(String key)
      Specified by:
      jsonGet in interface RedisJsonCommands
    • jsonGet

      public <T> T jsonGet(String key, Class<T> clazz)
      Specified by:
      jsonGet in interface RedisJsonCommands
    • jsonGet

      public Object jsonGet(String key, Path2... paths)
      Specified by:
      jsonGet in interface RedisJsonCommands
    • jsonGet

      public Object jsonGet(String key, Path... paths)
      Specified by:
      jsonGet in interface RedisJsonCommands
    • jsonGetAsPlainString

      public String jsonGetAsPlainString(String key, Path path)
      Specified by:
      jsonGetAsPlainString in interface RedisJsonCommands
    • jsonGet

      public <T> T jsonGet(String key, Class<T> clazz, Path... paths)
      Specified by:
      jsonGet in interface RedisJsonCommands
    • jsonMGet

      public List<org.json.JSONArray> jsonMGet(Path2 path, String... keys)
      Specified by:
      jsonMGet in interface RedisJsonCommands
    • jsonMGet

      public <T> List<T> jsonMGet(Path path, Class<T> clazz, String... keys)
      Specified by:
      jsonMGet in interface RedisJsonCommands
    • jsonDel

      public long jsonDel(String key)
      Specified by:
      jsonDel in interface RedisJsonCommands
    • jsonDel

      public long jsonDel(String key, Path2 path)
      Specified by:
      jsonDel in interface RedisJsonCommands
    • jsonDel

      public long jsonDel(String key, Path path)
      Specified by:
      jsonDel in interface RedisJsonCommands
    • jsonClear

      public long jsonClear(String key)
      Specified by:
      jsonClear in interface RedisJsonCommands
    • jsonClear

      public long jsonClear(String key, Path2 path)
      Specified by:
      jsonClear in interface RedisJsonCommands
    • jsonClear

      public long jsonClear(String key, Path path)
      Specified by:
      jsonClear in interface RedisJsonCommands
    • jsonToggle

      public List<Boolean> jsonToggle(String key, Path2 path)
      Specified by:
      jsonToggle in interface RedisJsonCommands
    • jsonToggle

      public String jsonToggle(String key, Path path)
      Specified by:
      jsonToggle in interface RedisJsonCommands
    • jsonType

      public Class<?> jsonType(String key)
      Specified by:
      jsonType in interface RedisJsonCommands
    • jsonType

      public List<Class<?>> jsonType(String key, Path2 path)
      Specified by:
      jsonType in interface RedisJsonCommands
    • jsonType

      public Class<?> jsonType(String key, Path path)
      Specified by:
      jsonType in interface RedisJsonCommands
    • jsonStrAppend

      public long jsonStrAppend(String key, Object string)
      Specified by:
      jsonStrAppend in interface RedisJsonCommands
    • jsonStrAppend

      public List<Long> jsonStrAppend(String key, Path2 path, Object string)
      Specified by:
      jsonStrAppend in interface RedisJsonCommands
    • jsonStrAppend

      public long jsonStrAppend(String key, Path path, Object string)
      Specified by:
      jsonStrAppend in interface RedisJsonCommands
    • jsonStrLen

      public Long jsonStrLen(String key)
      Specified by:
      jsonStrLen in interface RedisJsonCommands
    • jsonStrLen

      public List<Long> jsonStrLen(String key, Path2 path)
      Specified by:
      jsonStrLen in interface RedisJsonCommands
    • jsonStrLen

      public Long jsonStrLen(String key, Path path)
      Specified by:
      jsonStrLen in interface RedisJsonCommands
    • jsonNumIncrBy

      public org.json.JSONArray jsonNumIncrBy(String key, Path2 path, double value)
      Specified by:
      jsonNumIncrBy in interface RedisJsonCommands
    • jsonNumIncrBy

      public double jsonNumIncrBy(String key, Path path, double value)
      Specified by:
      jsonNumIncrBy in interface RedisJsonCommands
    • jsonArrAppend

      public List<Long> jsonArrAppend(String key, Path2 path, Object... objects)
      Specified by:
      jsonArrAppend in interface RedisJsonCommands
    • jsonArrAppendWithEscape

      public List<Long> jsonArrAppendWithEscape(String key, Path2 path, Object... objects)
      Specified by:
      jsonArrAppendWithEscape in interface RedisJsonCommands
    • jsonArrAppend

      public Long jsonArrAppend(String key, Path path, Object... pojos)
      Specified by:
      jsonArrAppend in interface RedisJsonCommands
    • jsonArrIndex

      public List<Long> jsonArrIndex(String key, Path2 path, Object scalar)
      Specified by:
      jsonArrIndex in interface RedisJsonCommands
    • jsonArrIndexWithEscape

      public List<Long> jsonArrIndexWithEscape(String key, Path2 path, Object scalar)
      Specified by:
      jsonArrIndexWithEscape in interface RedisJsonCommands
    • jsonArrIndex

      public long jsonArrIndex(String key, Path path, Object scalar)
      Specified by:
      jsonArrIndex in interface RedisJsonCommands
    • jsonArrInsert

      public List<Long> jsonArrInsert(String key, Path2 path, int index, Object... objects)
      Specified by:
      jsonArrInsert in interface RedisJsonCommands
    • jsonArrInsertWithEscape

      public List<Long> jsonArrInsertWithEscape(String key, Path2 path, int index, Object... objects)
      Specified by:
      jsonArrInsertWithEscape in interface RedisJsonCommands
    • jsonArrInsert

      public long jsonArrInsert(String key, Path path, int index, Object... pojos)
      Specified by:
      jsonArrInsert in interface RedisJsonCommands
    • jsonArrPop

      public Object jsonArrPop(String key)
      Specified by:
      jsonArrPop in interface RedisJsonCommands
    • jsonArrPop

      public <T> T jsonArrPop(String key, Class<T> clazz)
      Specified by:
      jsonArrPop in interface RedisJsonCommands
    • jsonArrPop

      public List<Object> jsonArrPop(String key, Path2 path)
      Specified by:
      jsonArrPop in interface RedisJsonCommands
    • jsonArrPop

      public Object jsonArrPop(String key, Path path)
      Specified by:
      jsonArrPop in interface RedisJsonCommands
    • jsonArrPop

      public <T> T jsonArrPop(String key, Class<T> clazz, Path path)
      Specified by:
      jsonArrPop in interface RedisJsonCommands
    • jsonArrPop

      public List<Object> jsonArrPop(String key, Path2 path, int index)
      Specified by:
      jsonArrPop in interface RedisJsonCommands
    • jsonArrPop

      public Object jsonArrPop(String key, Path path, int index)
      Specified by:
      jsonArrPop in interface RedisJsonCommands
    • jsonArrPop

      public <T> T jsonArrPop(String key, Class<T> clazz, Path path, int index)
      Specified by:
      jsonArrPop in interface RedisJsonCommands
    • jsonArrLen

      public Long jsonArrLen(String key)
      Specified by:
      jsonArrLen in interface RedisJsonCommands
    • jsonArrLen

      public List<Long> jsonArrLen(String key, Path2 path)
      Specified by:
      jsonArrLen in interface RedisJsonCommands
    • jsonArrLen

      public Long jsonArrLen(String key, Path path)
      Specified by:
      jsonArrLen in interface RedisJsonCommands
    • jsonArrTrim

      public List<Long> jsonArrTrim(String key, Path2 path, int start, int stop)
      Specified by:
      jsonArrTrim in interface RedisJsonCommands
    • jsonArrTrim

      public Long jsonArrTrim(String key, Path path, int start, int stop)
      Specified by:
      jsonArrTrim in interface RedisJsonCommands
    • jsonObjLen

      public Long jsonObjLen(String key)
      Specified by:
      jsonObjLen in interface RedisJsonCommands
    • jsonObjLen

      public Long jsonObjLen(String key, Path path)
      Specified by:
      jsonObjLen in interface RedisJsonCommands
    • jsonObjLen

      public List<Long> jsonObjLen(String key, Path2 path)
      Specified by:
      jsonObjLen in interface RedisJsonCommands
    • jsonObjKeys

      public List<String> jsonObjKeys(String key)
      Specified by:
      jsonObjKeys in interface RedisJsonCommands
    • jsonObjKeys

      public List<String> jsonObjKeys(String key, Path path)
      Specified by:
      jsonObjKeys in interface RedisJsonCommands
    • jsonObjKeys

      public List<List<String>> jsonObjKeys(String key, Path2 path)
      Specified by:
      jsonObjKeys in interface RedisJsonCommands
    • jsonDebugMemory

      public long jsonDebugMemory(String key)
      Specified by:
      jsonDebugMemory in interface RedisJsonCommands
    • jsonDebugMemory

      public long jsonDebugMemory(String key, Path path)
      Specified by:
      jsonDebugMemory in interface RedisJsonCommands
    • jsonDebugMemory

      public List<Long> jsonDebugMemory(String key, Path2 path)
      Specified by:
      jsonDebugMemory in interface RedisJsonCommands
    • jsonResp

      @Deprecated public List<Object> jsonResp(String key)
      Deprecated.
      Specified by:
      jsonResp in interface RedisJsonCommands
    • jsonResp

      @Deprecated public List<Object> jsonResp(String key, Path path)
      Deprecated.
      Specified by:
      jsonResp in interface RedisJsonCommands
    • jsonResp

      @Deprecated public List<List<Object>> jsonResp(String key, Path2 path)
      Deprecated.
      Specified by:
      jsonResp in interface RedisJsonCommands
    • tsCreate

      public String tsCreate(String key)
      Description copied from interface: RedisTimeSeriesCommands
      TS.CREATE key
      Specified by:
      tsCreate in interface RedisTimeSeriesCommands
      Parameters:
      key -
    • tsCreate

      public String tsCreate(String key, TSCreateParams createParams)
      Description copied from interface: RedisTimeSeriesCommands
      TS.CREATE key [RETENTION retentionTime] [ENCODING [UNCOMPRESSED|COMPRESSED]] [CHUNK_SIZE size] [DUPLICATE_POLICY policy] [LABELS label value..]
      Specified by:
      tsCreate in interface RedisTimeSeriesCommands
      Parameters:
      key -
      createParams -
    • tsDel

      public long tsDel(String key, long fromTimestamp, long toTimestamp)
      Description copied from interface: RedisTimeSeriesCommands
      TS.DEL key fromTimestamp toTimestamp
      Specified by:
      tsDel in interface RedisTimeSeriesCommands
      Parameters:
      key -
      fromTimestamp -
      toTimestamp -
      Returns:
      The number of samples that were removed
    • tsAlter

      public String tsAlter(String key, TSAlterParams alterParams)
      Description copied from interface: RedisTimeSeriesCommands
      TS.ALTER key [RETENTION retentionTime] [LABELS label value..]
      Specified by:
      tsAlter in interface RedisTimeSeriesCommands
      Parameters:
      key -
      alterParams -
      Returns:
      OK
    • tsAdd

      public long tsAdd(String key, double value)
      Description copied from interface: RedisTimeSeriesCommands
      TS.ADD key * value
      Specified by:
      tsAdd in interface RedisTimeSeriesCommands
      Parameters:
      key -
      value -
      Returns:
      timestamp
    • tsAdd

      public long tsAdd(String key, long timestamp, double value)
      Description copied from interface: RedisTimeSeriesCommands
      TS.ADD key timestamp value
      Specified by:
      tsAdd in interface RedisTimeSeriesCommands
      Parameters:
      key -
      timestamp -
      value -
      Returns:
      timestamp
    • tsAdd

      public long tsAdd(String key, long timestamp, double value, TSCreateParams createParams)
      Description copied from interface: RedisTimeSeriesCommands
      TS.ADD key timestamp value [RETENTION retentionTime] [ENCODING [COMPRESSED|UNCOMPRESSED]] [CHUNK_SIZE size] [ON_DUPLICATE policy] [LABELS label value..]
      Specified by:
      tsAdd in interface RedisTimeSeriesCommands
      Parameters:
      key -
      timestamp -
      value -
      createParams -
      Returns:
      timestamp
    • tsMAdd

      public List<Long> tsMAdd(Map.Entry<String,TSElement>... entries)
      Description copied from interface: RedisTimeSeriesCommands
      TS.MADD key timestamp value [key timestamp value ...]
      Specified by:
      tsMAdd in interface RedisTimeSeriesCommands
      Parameters:
      entries - key, timestamp, value
      Returns:
      timestamps
    • tsIncrBy

      public long tsIncrBy(String key, double value)
      Specified by:
      tsIncrBy in interface RedisTimeSeriesCommands
    • tsIncrBy

      public long tsIncrBy(String key, double value, long timestamp)
      Specified by:
      tsIncrBy in interface RedisTimeSeriesCommands
    • tsDecrBy

      public long tsDecrBy(String key, double value)
      Specified by:
      tsDecrBy in interface RedisTimeSeriesCommands
    • tsDecrBy

      public long tsDecrBy(String key, double value, long timestamp)
      Specified by:
      tsDecrBy in interface RedisTimeSeriesCommands
    • tsRange

      public List<TSElement> tsRange(String key, long fromTimestamp, long toTimestamp)
      Description copied from interface: RedisTimeSeriesCommands
      TS.RANGE key fromTimestamp toTimestamp
      Specified by:
      tsRange in interface RedisTimeSeriesCommands
      Parameters:
      key -
      fromTimestamp -
      toTimestamp -
      Returns:
      range elements
    • tsRange

      public List<TSElement> tsRange(String key, TSRangeParams rangeParams)
      Description copied from interface: RedisTimeSeriesCommands
      TS.RANGE key fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS ts...] [FILTER_BY_VALUE min max] [COUNT count] [[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]
      Specified by:
      tsRange in interface RedisTimeSeriesCommands
      Parameters:
      key -
      rangeParams -
      Returns:
      range elements
    • tsRevRange

      public List<TSElement> tsRevRange(String key, long fromTimestamp, long toTimestamp)
      Description copied from interface: RedisTimeSeriesCommands
      TS.REVRANGE key fromTimestamp toTimestamp
      Specified by:
      tsRevRange in interface RedisTimeSeriesCommands
      Parameters:
      key -
      fromTimestamp -
      toTimestamp -
      Returns:
      range elements
    • tsRevRange

      public List<TSElement> tsRevRange(String key, TSRangeParams rangeParams)
      Description copied from interface: RedisTimeSeriesCommands
      TS.REVRANGE key fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS TS...] [FILTER_BY_VALUE min max] [COUNT count] [[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]
      Specified by:
      tsRevRange in interface RedisTimeSeriesCommands
      Parameters:
      key -
      rangeParams -
      Returns:
      range elements
    • tsMRange

      public List<TSKeyedElements> tsMRange(long fromTimestamp, long toTimestamp, String... filters)
      Description copied from interface: RedisTimeSeriesCommands
      TS.MRANGE fromTimestamp toTimestamp FILTER filter...
      Specified by:
      tsMRange in interface RedisTimeSeriesCommands
      Parameters:
      fromTimestamp -
      toTimestamp -
      filters -
      Returns:
      multi range elements
    • tsMRange

      public List<TSKeyedElements> tsMRange(TSMRangeParams multiRangeParams)
      Description copied from interface: RedisTimeSeriesCommands
      TS.MRANGE fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS ts...] [FILTER_BY_VALUE min max] [WITHLABELS | SELECTED_LABELS label...] [COUNT count] [[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]] FILTER filter... [GROUPBY label REDUCE reducer]
      Specified by:
      tsMRange in interface RedisTimeSeriesCommands
      Parameters:
      multiRangeParams -
      Returns:
      multi range elements
    • tsMRevRange

      public List<TSKeyedElements> tsMRevRange(long fromTimestamp, long toTimestamp, String... filters)
      Description copied from interface: RedisTimeSeriesCommands
      TS.MREVRANGE fromTimestamp toTimestamp FILTER filter...
      Specified by:
      tsMRevRange in interface RedisTimeSeriesCommands
      Parameters:
      fromTimestamp -
      toTimestamp -
      filters -
      Returns:
      multi range elements
    • tsMRevRange

      public List<TSKeyedElements> tsMRevRange(TSMRangeParams multiRangeParams)
      Description copied from interface: RedisTimeSeriesCommands
      TS.MREVRANGE fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS TS...] [FILTER_BY_VALUE min max] [WITHLABELS | SELECTED_LABELS label...] [COUNT count] [[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]] FILTER filter... [GROUPBY label REDUCE reducer]
      Specified by:
      tsMRevRange in interface RedisTimeSeriesCommands
      Parameters:
      multiRangeParams -
      Returns:
      multi range elements
    • tsGet

      public TSElement tsGet(String key)
      Description copied from interface: RedisTimeSeriesCommands
      TS.GET key
      Specified by:
      tsGet in interface RedisTimeSeriesCommands
      Parameters:
      key - the key
      Returns:
      the element
    • tsGet

      public TSElement tsGet(String key, TSGetParams getParams)
      Description copied from interface: RedisTimeSeriesCommands
      TS.GET key [LATEST]
      Specified by:
      tsGet in interface RedisTimeSeriesCommands
      Parameters:
      key - the key
      getParams - optional arguments
      Returns:
      the element
    • tsMGet

      public List<TSKeyValue<TSElement>> tsMGet(TSMGetParams multiGetParams, String... filters)
      Description copied from interface: RedisTimeSeriesCommands
      TS.MGET [LATEST] [ WITHLABELS | SELECTED_LABELS label...] FILTER filter...
      Specified by:
      tsMGet in interface RedisTimeSeriesCommands
      Parameters:
      multiGetParams - optional arguments
      filters - secondary indexes
      Returns:
      multi get elements
    • tsCreateRule

      public String tsCreateRule(String sourceKey, String destKey, AggregationType aggregationType, long timeBucket)
      Description copied from interface: RedisTimeSeriesCommands
      TS.CREATERULE sourceKey destKey AGGREGATION aggregationType timeBucket
      Specified by:
      tsCreateRule in interface RedisTimeSeriesCommands
      Parameters:
      sourceKey -
      destKey -
      aggregationType -
      timeBucket -
    • tsCreateRule

      public String tsCreateRule(String sourceKey, String destKey, AggregationType aggregationType, long bucketDuration, long alignTimestamp)
      Description copied from interface: RedisTimeSeriesCommands
      TS.CREATERULE sourceKey destKey AGGREGATION aggregationType bucketDuration [alignTimestamp]
      Specified by:
      tsCreateRule in interface RedisTimeSeriesCommands
      Parameters:
      sourceKey -
      destKey -
      aggregationType -
      bucketDuration -
      alignTimestamp -
    • tsDeleteRule

      public String tsDeleteRule(String sourceKey, String destKey)
      Description copied from interface: RedisTimeSeriesCommands
      TS.DELETERULE sourceKey destKey
      Specified by:
      tsDeleteRule in interface RedisTimeSeriesCommands
      Parameters:
      sourceKey -
      destKey -
    • tsQueryIndex

      public List<String> tsQueryIndex(String... filters)
      Description copied from interface: RedisTimeSeriesCommands
      TS.QUERYINDEX filter...
      Specified by:
      tsQueryIndex in interface RedisTimeSeriesCommands
      Parameters:
      filters -
      Returns:
      list of timeseries keys
    • tsInfo

      public TSInfo tsInfo(String key)
      Specified by:
      tsInfo in interface RedisTimeSeriesCommands
    • tsInfoDebug

      public TSInfo tsInfoDebug(String key)
      Specified by:
      tsInfoDebug in interface RedisTimeSeriesCommands
    • bfReserve

      public String bfReserve(String key, double errorRate, long capacity)
      Description copied from interface: BloomFilterCommands
      BF.RESERVE {key} {error_rate} {capacity}
      Specified by:
      bfReserve in interface BloomFilterCommands
      Parameters:
      key -
      errorRate -
      capacity -
      Returns:
      OK
    • bfReserve

      public String bfReserve(String key, double errorRate, long capacity, BFReserveParams reserveParams)
      Description copied from interface: BloomFilterCommands
      BF.RESERVE {key} {error_rate} {capacity} [EXPANSION {expansion}] [NONSCALING]
      Specified by:
      bfReserve in interface BloomFilterCommands
      Parameters:
      key -
      errorRate -
      capacity -
      reserveParams -
      Returns:
      OK
    • bfAdd

      public boolean bfAdd(String key, String item)
      Description copied from interface: BloomFilterCommands
      BF.ADD {key} {item}
      Specified by:
      bfAdd in interface BloomFilterCommands
      Parameters:
      key -
      item -
    • bfMAdd

      public List<Boolean> bfMAdd(String key, String... items)
      Description copied from interface: BloomFilterCommands
      BF.MADD {key} {item ...}
      Specified by:
      bfMAdd in interface BloomFilterCommands
      Parameters:
      key -
      items -
    • bfInsert

      public List<Boolean> bfInsert(String key, String... items)
      Description copied from interface: BloomFilterCommands
      BF.INSERT {key} ITEMS {item ...}
      Specified by:
      bfInsert in interface BloomFilterCommands
      Parameters:
      key -
      items -
    • bfInsert

      public List<Boolean> bfInsert(String key, BFInsertParams insertParams, String... items)
      Description copied from interface: BloomFilterCommands
      BF.INSERT {key} [CAPACITY {cap}] [ERROR {error}] [EXPANSION {expansion}] [NOCREATE] [NONSCALING] ITEMS {item ...}
      Specified by:
      bfInsert in interface BloomFilterCommands
      Parameters:
      key -
      insertParams -
      items -
    • bfExists

      public boolean bfExists(String key, String item)
      Description copied from interface: BloomFilterCommands
      BF.EXISTS {key} {item}
      Specified by:
      bfExists in interface BloomFilterCommands
      Parameters:
      key -
      item -
      Returns:
      if the item may exist
    • bfMExists

      public List<Boolean> bfMExists(String key, String... items)
      Description copied from interface: BloomFilterCommands
      BF.MEXISTS {key} {item ...}
      Specified by:
      bfMExists in interface BloomFilterCommands
      Parameters:
      key -
      items -
    • bfScanDump

      public Map.Entry<Long,byte[]> bfScanDump(String key, long iterator)
      Description copied from interface: BloomFilterCommands
      BF.SCANDUMP {key} {iterator}
      Specified by:
      bfScanDump in interface BloomFilterCommands
      Parameters:
      key -
      iterator -
      Returns:
      Pair of next iterator and current data
    • bfLoadChunk

      public String bfLoadChunk(String key, long iterator, byte[] data)
      Description copied from interface: BloomFilterCommands
      BF.LOADCHUNK {key} {iterator} {data}
      Specified by:
      bfLoadChunk in interface BloomFilterCommands
      Parameters:
      key -
      iterator -
      data -
      Returns:
      OK
    • bfCard

      public long bfCard(String key)
      Specified by:
      bfCard in interface BloomFilterCommands
    • bfInfo

      public Map<String,Object> bfInfo(String key)
      Specified by:
      bfInfo in interface BloomFilterCommands
    • cfReserve

      public String cfReserve(String key, long capacity)
      Description copied from interface: CuckooFilterCommands
      CF.RESERVE Creates a Cuckoo Filter under key with the given parameters
      Specified by:
      cfReserve in interface CuckooFilterCommands
      Parameters:
      key - The name of the filter
      capacity -
      Returns:
      OK
    • cfReserve

      public String cfReserve(String key, long capacity, CFReserveParams reserveParams)
      Description copied from interface: CuckooFilterCommands
      CF.RESERVE Creates a Cuckoo Filter under key with the given parameters
      Specified by:
      cfReserve in interface CuckooFilterCommands
      Parameters:
      key - The name of the filter
      capacity -
      reserveParams - An instance of CFReserveParams containing the options
      Returns:
      OK
    • cfAdd

      public boolean cfAdd(String key, String item)
      Description copied from interface: CuckooFilterCommands
      CF.ADD Adds an item to the cuckoo filter, creating the filter if it does not exist
      Specified by:
      cfAdd in interface CuckooFilterCommands
      Parameters:
      key - The name of the filter
      item - The item to add
      Returns:
      true on success, false otherwise
    • cfAddNx

      public boolean cfAddNx(String key, String item)
      Description copied from interface: CuckooFilterCommands
      CF.ADDNX Adds an item to the cuckoo filter, only if it does not exist yet
      Specified by:
      cfAddNx in interface CuckooFilterCommands
      Parameters:
      key - The name of the filter
      item - The item to add
      Returns:
      true if the item was added to the filter, false if the item already exists.
    • cfInsert

      public List<Boolean> cfInsert(String key, String... items)
      Description copied from interface: CuckooFilterCommands
      CF.INSERT Adds one or more items to a cuckoo filter, creating it if it does not exist yet.
      Specified by:
      cfInsert in interface CuckooFilterCommands
      Parameters:
      key - The name of the filter
      items - One or more items to add
      Returns:
      true if the item was successfully inserted, false if an error occurred
    • cfInsert

      public List<Boolean> cfInsert(String key, CFInsertParams insertParams, String... items)
      Description copied from interface: CuckooFilterCommands
      CF.INSERT Adds one or more items to a cuckoo filter, using the passed options
      Specified by:
      cfInsert in interface CuckooFilterCommands
      Parameters:
      key - The name of the filter
      insertParams - An instance of CFInsertParams containing the options
      items - One or more items to add
      Returns:
      true if the item was successfully inserted, false if an error occurred
    • cfInsertNx

      public List<Boolean> cfInsertNx(String key, String... items)
      Description copied from interface: CuckooFilterCommands
      CF.INSERTNX Adds one or more items to a cuckoo filter, only if it does not exist yet
      Specified by:
      cfInsertNx in interface CuckooFilterCommands
      Parameters:
      key - The name of the filter
      items - One or more items to add
      Returns:
      true if the item was added to the filter, false if the item already exists.
    • cfInsertNx

      public List<Boolean> cfInsertNx(String key, CFInsertParams insertParams, String... items)
      Description copied from interface: CuckooFilterCommands
      CF.INSERTNX Adds one or more items to a cuckoo filter, using the passed options
      Specified by:
      cfInsertNx in interface CuckooFilterCommands
      Parameters:
      key - The name of the filter
      insertParams - An instance of CFInsertParams containing the options (CAPACITY/NOCREATE)
      items - One or more items to add
      Returns:
      true if the item was added to the filter, false if the item already exists.
    • cfExists

      public boolean cfExists(String key, String item)
      Description copied from interface: CuckooFilterCommands
      CF.EXISTS Check if an item exists in a Cuckoo Filter
      Specified by:
      cfExists in interface CuckooFilterCommands
      Parameters:
      key - The name of the filter
      item - The item to check for
      Returns:
      false if the item certainly does not exist, true if the item may exist.
    • cfMExists

      public List<Boolean> cfMExists(String key, String... items)
      Description copied from interface: CuckooFilterCommands
      CF.MEXISTS {key} {item ...}
      Specified by:
      cfMExists in interface CuckooFilterCommands
      Parameters:
      key - The name of the filter
      items - Items to check for (non empty sequence)
      Returns:
      a list of booleans where false if the item certainly does not exist, true if the item may exist.
    • cfDel

      public boolean cfDel(String key, String item)
      Description copied from interface: CuckooFilterCommands
      CF.DEL Deletes an item once from the filter. If the item exists only once, it will be removed from the filter. If the item was added multiple times, it will still be present.
      Specified by:
      cfDel in interface CuckooFilterCommands
      Parameters:
      key - The name of the filter
      item - The item to delete from the filter
      Returns:
      true if the item has been deleted, false if the item was not found.
    • cfCount

      public long cfCount(String key, String item)
      Description copied from interface: CuckooFilterCommands
      CF.COUNT Returns the number of times an item may be in the filter.
      Specified by:
      cfCount in interface CuckooFilterCommands
      Parameters:
      key - The name of the filter
      item - The item to count
      Returns:
      The number of times the item exists in the filter
    • cfScanDump

      public Map.Entry<Long,byte[]> cfScanDump(String key, long iterator)
      Description copied from interface: CuckooFilterCommands
      CF.SCANDUMP Begins an incremental save of the cuckoo filter. This is useful for large cuckoo filters which cannot fit into the normal SAVE and RESTORE model. The Iterator is passed as input to the next invocation of SCANDUMP . If Iterator is 0, the iteration has completed.
      Specified by:
      cfScanDump in interface CuckooFilterCommands
      Parameters:
      key - Name of the filter
      iterator - This is either 0, or the iterator from a previous invocation of this command
      Returns:
      a Map.Entry containing the Iterator and Data.
    • cfLoadChunk

      public String cfLoadChunk(String key, long iterator, byte[] data)
      Description copied from interface: CuckooFilterCommands
      CF.LOADCHUNK Restores a filter previously saved using SCANDUMP.
      Specified by:
      cfLoadChunk in interface CuckooFilterCommands
      Parameters:
      key - Name of the filter to restore
      iterator - Iterator from CF.SCANDUMP
      data - Data from CF.SCANDUMP
      Returns:
      OK
    • cfInfo

      public Map<String,Object> cfInfo(String key)
      Description copied from interface: CuckooFilterCommands
      CF.INFO Return information about filter
      Specified by:
      cfInfo in interface CuckooFilterCommands
      Parameters:
      key - Name of the filter to restore
      Returns:
      A Map containing Size, Number of buckets, Number of filter, Number of items inserted, Number of items deleted, Bucket size, Expansion rate, Max iteration
    • cmsInitByDim

      public String cmsInitByDim(String key, long width, long depth)
      Description copied from interface: CountMinSketchCommands
      CMS.INITBYDIM Initializes a Count-Min Sketch to dimensions specified by user.
      Specified by:
      cmsInitByDim in interface CountMinSketchCommands
      Parameters:
      key - The name of the sketch
      width - Number of counter in each array. Reduces the error size
      depth - Number of counter-arrays. Reduces the probability for an error of a certain size (percentage of total count
      Returns:
      OK
    • cmsInitByProb

      public String cmsInitByProb(String key, double error, double probability)
      Description copied from interface: CountMinSketchCommands
      CMS.INITBYPROB Initializes a Count-Min Sketch to accommodate requested capacity.
      Specified by:
      cmsInitByProb in interface CountMinSketchCommands
      Parameters:
      key - The name of the sketch.
      error - Estimate size of error. The error is a percent of total counted items. This effects the width of the sketch.
      probability - The desired probability for inflated count. This should be a decimal value between 0 and 1. This effects the depth of the sketch. For example, for a desired false positive rate of 0.1% (1 in 1000), error_rate should be set to 0.001. The closer this number is to zero, the greater the memory consumption per item and the more CPU usage per operation.
      Returns:
      OK
    • cmsIncrBy

      public List<Long> cmsIncrBy(String key, Map<String,Long> itemIncrements)
      Description copied from interface: CountMinSketchCommands
      CMS.INCRBY Increases the count of one or more item.
      Specified by:
      cmsIncrBy in interface CountMinSketchCommands
      Parameters:
      key - The name of the sketch
      itemIncrements - a Map of the items to be increased and their integer increment
      Returns:
      Count of each item after increment
    • cmsQuery

      public List<Long> cmsQuery(String key, String... items)
      Description copied from interface: CountMinSketchCommands
      CMS.QUERY Returns count for item. Multiple items can be queried with one call.
      Specified by:
      cmsQuery in interface CountMinSketchCommands
      Parameters:
      key - The name of the sketch
      items - The items for which to retrieve the counts
      Returns:
      Count for one or more items
    • cmsMerge

      public String cmsMerge(String destKey, String... keys)
      Description copied from interface: CountMinSketchCommands
      CMS.MERGE Merges several sketches into one sketch. All sketches must have identical width and depth.
      Specified by:
      cmsMerge in interface CountMinSketchCommands
      Parameters:
      destKey - The name of destination sketch. Must be initialized.
      keys - The sketches to be merged
      Returns:
      OK
    • cmsMerge

      public String cmsMerge(String destKey, Map<String,Long> keysAndWeights)
      Description copied from interface: CountMinSketchCommands
      CMS.MERGE Merges several sketches into one sketch. All sketches must have identical width and depth. Weights can be used to multiply certain sketches. Default weight is 1.
      Specified by:
      cmsMerge in interface CountMinSketchCommands
      Parameters:
      destKey - The name of destination sketch. Must be initialized.
      keysAndWeights - A map of keys and weights used to multiply the sketch.
      Returns:
      OK
    • cmsInfo

      public Map<String,Object> cmsInfo(String key)
      Description copied from interface: CountMinSketchCommands
      CMS.INFO Returns width, depth and total count of the sketch.
      Specified by:
      cmsInfo in interface CountMinSketchCommands
      Parameters:
      key - The name of the sketch
      Returns:
      A Map with width, depth and total count.
    • topkReserve

      public String topkReserve(String key, long topk)
      Description copied from interface: TopKFilterCommands
      TOPK.RESERVE {key} {topk}
      Specified by:
      topkReserve in interface TopKFilterCommands
      Parameters:
      key -
      topk -
      Returns:
      OK
    • topkReserve

      public String topkReserve(String key, long topk, long width, long depth, double decay)
      Description copied from interface: TopKFilterCommands
      TOPK.RESERVE {key} {topk} [{width} {depth} {decay}]
      Specified by:
      topkReserve in interface TopKFilterCommands
      Parameters:
      key -
      topk -
      width -
      depth -
      decay -
      Returns:
      OK
    • topkAdd

      public List<String> topkAdd(String key, String... items)
      Description copied from interface: TopKFilterCommands
      TOPK.ADD {key} {item ...}
      Specified by:
      topkAdd in interface TopKFilterCommands
      Parameters:
      key -
      items -
      Returns:
      items dropped from list
    • topkIncrBy

      public List<String> topkIncrBy(String key, Map<String,Long> itemIncrements)
      Description copied from interface: TopKFilterCommands
      TOPK.INCRBY {key} {item} {increment} [{item} {increment} ...]
      Specified by:
      topkIncrBy in interface TopKFilterCommands
      Parameters:
      key -
      itemIncrements - item and increment pairs
      Returns:
      item dropped from list
    • topkQuery

      public List<Boolean> topkQuery(String key, String... items)
      Description copied from interface: TopKFilterCommands
      TOPK.QUERY {key} {item ...}
      Specified by:
      topkQuery in interface TopKFilterCommands
      Parameters:
      key -
      items -
      Returns:
      if item is in Top-K
    • topkCount

      @Deprecated public List<Long> topkCount(String key, String... items)
      Deprecated.
      Description copied from interface: TopKFilterCommands
      TOPK.COUNT {key} {item ...}
      Specified by:
      topkCount in interface TopKFilterCommands
      Parameters:
      key -
      items -
      Returns:
      count for item
    • topkList

      public List<String> topkList(String key)
      Description copied from interface: TopKFilterCommands
      TOPK.LIST {key}
      Specified by:
      topkList in interface TopKFilterCommands
      Parameters:
      key -
      Returns:
      k (or less) items in Top K list
    • topkListWithCount

      public Map<String,Long> topkListWithCount(String key)
      Description copied from interface: TopKFilterCommands
      TOPK.LIST {key} WITHCOUNT
      Specified by:
      topkListWithCount in interface TopKFilterCommands
      Parameters:
      key -
      Returns:
      k (or less) items in Top K list
    • topkInfo

      public Map<String,Object> topkInfo(String key)
      Description copied from interface: TopKFilterCommands
      TOPK.INFO {key}
      Specified by:
      topkInfo in interface TopKFilterCommands
      Parameters:
      key -
      Returns:
      information
    • tdigestCreate

      public String tdigestCreate(String key)
      Description copied from interface: TDigestSketchCommands
      TDIGEST.CREATE key
      Specified by:
      tdigestCreate in interface TDigestSketchCommands
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      Returns:
      OK
    • tdigestCreate

      public String tdigestCreate(String key, int compression)
      Description copied from interface: TDigestSketchCommands
      TDIGEST.CREATE key [compression]
      Specified by:
      tdigestCreate in interface TDigestSketchCommands
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      compression - The compression parameter. 100 is a common value for normal uses. 1000 is extremely large.
      Returns:
      OK
    • tdigestReset

      public String tdigestReset(String key)
      Description copied from interface: TDigestSketchCommands
      TDIGEST.RESET key
      Specified by:
      tdigestReset in interface TDigestSketchCommands
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      Returns:
      OK
    • tdigestMerge

      public String tdigestMerge(String destinationKey, String... sourceKeys)
      Description copied from interface: TDigestSketchCommands
      TDIGEST.MERGE destination-key numkeys source-key [source-key ...]
      Specified by:
      tdigestMerge in interface TDigestSketchCommands
      Parameters:
      destinationKey - Sketch to copy observation values to (a t-digest data structure)
      sourceKeys - Sketch(es) to copy observation values from (a t-digest data structure)
      Returns:
      OK
    • tdigestMerge

      public String tdigestMerge(TDigestMergeParams mergeParams, String destinationKey, String... sourceKeys)
      Description copied from interface: TDigestSketchCommands
      TDIGEST.MERGE destination-key numkeys source-key [source-key ...] [COMPRESSION compression] [OVERRIDE]
      Specified by:
      tdigestMerge in interface TDigestSketchCommands
      Parameters:
      mergeParams - compression and override options
      destinationKey - Sketch to copy observation values to (a t-digest data structure)
      sourceKeys - Sketch(es) to copy observation values from (a t-digest data structure)
      Returns:
      OK
    • tdigestInfo

      public Map<String,Object> tdigestInfo(String key)
      Description copied from interface: TDigestSketchCommands
      TDIGEST.INFO key
      Specified by:
      tdigestInfo in interface TDigestSketchCommands
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      Returns:
      information about the sketch
    • tdigestAdd

      public String tdigestAdd(String key, double... values)
      Description copied from interface: TDigestSketchCommands
      TDIGEST.ADD key value weight [ value weight ...]
      Specified by:
      tdigestAdd in interface TDigestSketchCommands
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      values - The value of the observation (floating-point)
      Returns:
      OK
    • tdigestCDF

      public List<Double> tdigestCDF(String key, double... values)
      Description copied from interface: TDigestSketchCommands
      TDIGEST.CDF key value [value ...]
      Specified by:
      tdigestCDF in interface TDigestSketchCommands
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      values - upper limit of observation value, for which the fraction of all observations added which are ≤ value
      Returns:
      estimation of the fraction of all observations added which are ≤ value
    • tdigestQuantile

      public List<Double> tdigestQuantile(String key, double... quantiles)
      Description copied from interface: TDigestSketchCommands
      TDIGEST.QUANTILE key quantile [quantile ...]
      Specified by:
      tdigestQuantile in interface TDigestSketchCommands
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      quantiles - The desired fraction(s) (between 0 and 1 inclusively)
      Returns:
      results
    • tdigestMin

      public double tdigestMin(String key)
      Description copied from interface: TDigestSketchCommands
      TDIGEST.MIN key
      Specified by:
      tdigestMin in interface TDigestSketchCommands
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      Returns:
      minimum observation value from the sketch
    • tdigestMax

      public double tdigestMax(String key)
      Description copied from interface: TDigestSketchCommands
      TDIGEST.MAX key
      Specified by:
      tdigestMax in interface TDigestSketchCommands
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      Returns:
      maximum observation value from the sketch
    • tdigestTrimmedMean

      public double tdigestTrimmedMean(String key, double lowCutQuantile, double highCutQuantile)
      Description copied from interface: TDigestSketchCommands
      TDIGEST.TRIMMED_MEAN key low_cut_quantile high_cut_quantile
      Specified by:
      tdigestTrimmedMean in interface TDigestSketchCommands
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      lowCutQuantile - Exclude observation values lower than this quantile
      highCutQuantile - Exclude observation values higher than this quantile
      Returns:
      estimation of the mean value
    • tdigestRank

      public List<Long> tdigestRank(String key, double... values)
      Specified by:
      tdigestRank in interface TDigestSketchCommands
    • tdigestRevRank

      public List<Long> tdigestRevRank(String key, double... values)
      Specified by:
      tdigestRevRank in interface TDigestSketchCommands
    • tdigestByRank

      public List<Double> tdigestByRank(String key, long... ranks)
      Specified by:
      tdigestByRank in interface TDigestSketchCommands
    • tdigestByRevRank

      public List<Double> tdigestByRevRank(String key, long... ranks)
      Specified by:
      tdigestByRevRank in interface TDigestSketchCommands
    • graphQuery

      public ResultSet graphQuery(String name, String query)
      Description copied from interface: RedisGraphCommands
      Execute a Cypher query.
      Specified by:
      graphQuery in interface RedisGraphCommands
      Parameters:
      name - a graph to perform the query on
      query - Cypher query
      Returns:
      a result set
    • graphReadonlyQuery

      public ResultSet graphReadonlyQuery(String name, String query)
      Description copied from interface: RedisGraphCommands
      Execute a Cypher read-only query.
      Specified by:
      graphReadonlyQuery in interface RedisGraphCommands
      Parameters:
      name - a graph to perform the query on
      query - Cypher query
      Returns:
      a result set
    • graphQuery

      public ResultSet graphQuery(String name, String query, long timeout)
      Description copied from interface: RedisGraphCommands
      Execute a Cypher query with timeout.
      Specified by:
      graphQuery in interface RedisGraphCommands
      Parameters:
      name - a graph to perform the query on
      query - Cypher query
      timeout -
      Returns:
      a result set
    • graphReadonlyQuery

      public ResultSet graphReadonlyQuery(String name, String query, long timeout)
      Description copied from interface: RedisGraphCommands
      Execute a Cypher read-only query with timeout.
      Specified by:
      graphReadonlyQuery in interface RedisGraphCommands
      Parameters:
      name - a graph to perform the query on
      query - Cypher query
      timeout -
      Returns:
      a result set
    • graphQuery

      public ResultSet graphQuery(String name, String query, Map<String,Object> params)
      Description copied from interface: RedisGraphCommands
      Executes a cypher query with parameters.
      Specified by:
      graphQuery in interface RedisGraphCommands
      Parameters:
      name - a graph to perform the query on.
      query - Cypher query.
      params - parameters map.
      Returns:
      a result set.
    • graphReadonlyQuery

      public ResultSet graphReadonlyQuery(String name, String query, Map<String,Object> params)
      Description copied from interface: RedisGraphCommands
      Executes a cypher read-only query with parameters.
      Specified by:
      graphReadonlyQuery in interface RedisGraphCommands
      Parameters:
      name - a graph to perform the query on.
      query - Cypher query.
      params - parameters map.
      Returns:
      a result set.
    • graphQuery

      public ResultSet graphQuery(String name, String query, Map<String,Object> params, long timeout)
      Description copied from interface: RedisGraphCommands
      Executes a cypher query with parameters and timeout.
      Specified by:
      graphQuery in interface RedisGraphCommands
      Parameters:
      name - a graph to perform the query on.
      query - Cypher query.
      params - parameters map.
      timeout -
      Returns:
      a result set.
    • graphReadonlyQuery

      public ResultSet graphReadonlyQuery(String name, String query, Map<String,Object> params, long timeout)
      Description copied from interface: RedisGraphCommands
      Executes a cypher read-only query with parameters and timeout.
      Specified by:
      graphReadonlyQuery in interface RedisGraphCommands
      Parameters:
      name - a graph to perform the query on.
      query - Cypher query.
      params - parameters map.
      timeout -
      Returns:
      a result set.
    • graphDelete

      public String graphDelete(String name)
      Description copied from interface: RedisGraphCommands
      Deletes the entire graph
      Specified by:
      graphDelete in interface RedisGraphCommands
      Parameters:
      name - graph to delete
      Returns:
      delete running time statistics
    • graphList

      public List<String> graphList()
      Description copied from interface: RedisGraphCommands
      Lists all graph keys in the keyspace.
      Specified by:
      graphList in interface RedisGraphCommands
      Returns:
      graph keys
    • graphProfile

      public List<String> graphProfile(String graphName, String query)
      Description copied from interface: RedisGraphCommands
      Executes a query and produces an execution plan augmented with metrics for each operation's execution.
      Specified by:
      graphProfile in interface RedisGraphCommands
    • graphExplain

      public List<String> graphExplain(String graphName, String query)
      Description copied from interface: RedisGraphCommands
      Constructs a query execution plan but does not run it. Inspect this execution plan to better understand how your query will get executed.
      Specified by:
      graphExplain in interface RedisGraphCommands
    • graphSlowlog

      public List<List<String>> graphSlowlog(String graphName)
      Description copied from interface: RedisGraphCommands
      Returns a list containing up to 10 of the slowest queries issued against the given graph ID.
      Specified by:
      graphSlowlog in interface RedisGraphCommands
    • graphConfigSet

      public String graphConfigSet(String configName, Object value)
      Specified by:
      graphConfigSet in interface RedisGraphCommands
    • graphConfigGet

      public Map<String,Object> graphConfigGet(String configName)
      Specified by:
      graphConfigGet in interface RedisGraphCommands
    • pipelined

      public Object pipelined()
    • multi

      public Transaction multi()
    • sendCommand

      public Object sendCommand(ProtocolCommand cmd)
    • sendCommand

      public Object sendCommand(ProtocolCommand cmd, byte[]... args)
    • sendBlockingCommand

      public Object sendBlockingCommand(ProtocolCommand cmd, byte[]... args)
    • sendCommand

      public Object sendCommand(ProtocolCommand cmd, String... args)
    • sendBlockingCommand

      public Object sendBlockingCommand(ProtocolCommand cmd, String... args)
    • sendCommand

      public Object sendCommand(byte[] sampleKey, ProtocolCommand cmd, byte[]... args)
    • sendBlockingCommand

      public Object sendBlockingCommand(byte[] sampleKey, ProtocolCommand cmd, byte[]... args)
    • sendCommand

      public Object sendCommand(String sampleKey, ProtocolCommand cmd, String... args)
    • sendBlockingCommand

      public Object sendBlockingCommand(String sampleKey, ProtocolCommand cmd, String... args)
    • executeCommand

      public Object executeCommand(CommandArguments args)
    • setJsonObjectMapper

      public void setJsonObjectMapper(JsonObjectMapper jsonObjectMapper)