Package org.redisson

Class RedissonJsonBucket<V>

java.lang.Object
org.redisson.RedissonObject
org.redisson.RedissonJsonBucket<V>
All Implemented Interfaces:
RBucket<V>, RBucketAsync<V>, RExpirable, RExpirableAsync, RJsonBucket<V>, RJsonBucketAsync<V>, RObject, RObjectAsync

public class RedissonJsonBucket<V> extends RedissonObject implements RJsonBucket<V>
Json data holder
Author:
Nikita Koksharov
  • Constructor Details

  • Method Details

    • size

      public long size()
      Description copied from interface: RBucket
      Returns size of object in bytes.
      Specified by:
      size in interface RBucket<V>
      Returns:
      object size
    • sizeAsync

      public RFuture<Long> sizeAsync()
      Description copied from interface: RBucketAsync
      Returns size of object in bytes
      Specified by:
      sizeAsync in interface RBucketAsync<V>
      Returns:
      object size
    • stringSizeMulti

      public List<Long> stringSizeMulti(String path)
      Description copied from interface: RJsonBucket
      Returns list of string data size by JSONPath. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      stringSizeMulti in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      Returns:
      list of string data sizes
    • stringSizeMultiAsync

      public RFuture<List<Long>> stringSizeMultiAsync(String path)
      Description copied from interface: RJsonBucketAsync
      Returns list of string data size by JSONPath. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      stringSizeMultiAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      Returns:
      list of string data sizes
    • stringSize

      public Long stringSize(String path)
      Description copied from interface: RJsonBucket
      Returns size of string data by JSONPath
      Specified by:
      stringSize in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      Returns:
      size of string
    • stringSizeAsync

      public RFuture<Long> stringSizeAsync(String path)
      Description copied from interface: RJsonBucketAsync
      Returns size of string data by JSONPath
      Specified by:
      stringSizeAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      Returns:
      size of string
    • get

      public V get()
      Description copied from interface: RBucket
      Retrieves element stored in the holder.
      Specified by:
      get in interface RBucket<V>
      Returns:
      element
    • getAsync

      public RFuture<V> getAsync()
      Description copied from interface: RBucketAsync
      Retrieves element stored in the holder.
      Specified by:
      getAsync in interface RBucketAsync<V>
      Returns:
      element
    • get

      public <T> T get(JsonCodec<T> codec, String... paths)
      Description copied from interface: RJsonBucket
      Get Json object/objects by JSONPath
      Specified by:
      get in interface RJsonBucket<V>
      Type Parameters:
      T - the type of object
      Parameters:
      codec - object codec
      paths - JSON paths
      Returns:
      object
    • getAsync

      public <T> RFuture<T> getAsync(JsonCodec<T> codec, String... paths)
      Description copied from interface: RJsonBucketAsync
      Get Json object/objects by JSONPath
      Specified by:
      getAsync in interface RJsonBucketAsync<V>
      Type Parameters:
      T - the type of object
      Parameters:
      codec - object codec
      paths - JSON paths
      Returns:
      object
    • getAndDelete

      public V getAndDelete()
      Description copied from interface: RBucket
      Retrieves element in the holder and removes it.
      Specified by:
      getAndDelete in interface RBucket<V>
      Returns:
      element
    • getAndDeleteAsync

      public RFuture<V> getAndDeleteAsync()
      Description copied from interface: RBucketAsync
      Retrieves element in the holder and removes it.
      Specified by:
      getAndDeleteAsync in interface RBucketAsync<V>
      Returns:
      element
    • setIfAbsent

      public boolean setIfAbsent(V value)
      Description copied from interface: RBucket
      Sets value only if object holder doesn't exist.
      Specified by:
      setIfAbsent in interface RBucket<V>
      Parameters:
      value - - value to set
      Returns:
      true if successful, or false if element was already set
    • setIfAbsent

      public boolean setIfAbsent(V value, Duration duration)
      Description copied from interface: RBucket
      Sets value with defined duration only if object holder doesn't exist.
      Specified by:
      setIfAbsent in interface RBucket<V>
      Parameters:
      value - value to set
      duration - expiration duration
      Returns:
      true if successful, or false if element was already set
    • setIfAbsentAsync

      public RFuture<Boolean> setIfAbsentAsync(V value)
      Description copied from interface: RBucketAsync
      Sets value only if object holder doesn't exist.
      Specified by:
      setIfAbsentAsync in interface RBucketAsync<V>
      Parameters:
      value - - value to set
      Returns:
      true if successful, or false if element was already set
    • setIfAbsentAsync

      public RFuture<Boolean> setIfAbsentAsync(V value, Duration duration)
      Description copied from interface: RBucketAsync
      Sets value with defined duration only if object holder doesn't exist.
      Specified by:
      setIfAbsentAsync in interface RBucketAsync<V>
      Parameters:
      value - value to set
      duration - expiration duration
      Returns:
      true if successful, or false if element was already set
    • trySet

      public boolean trySet(V value)
      Description copied from interface: RBucket
      Specified by:
      trySet in interface RBucket<V>
      Parameters:
      value - - value to set
      Returns:
      true if successful, or false if element was already set
    • trySetAsync

      public RFuture<Boolean> trySetAsync(V value)
      Description copied from interface: RBucketAsync
      Specified by:
      trySetAsync in interface RBucketAsync<V>
      Parameters:
      value - - value to set
      Returns:
      true if successful, or false if element was already set
    • setIfAbsent

      public boolean setIfAbsent(String path, Object value)
      Description copied from interface: RJsonBucket
      Sets Json object by JSONPath only if previous value is empty
      Specified by:
      setIfAbsent in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      value - object
      Returns:
      true if successful, or false if value was already set
    • setIfAbsentAsync

      public RFuture<Boolean> setIfAbsentAsync(String path, Object value)
      Description copied from interface: RJsonBucketAsync
      Sets Json object by JSONPath only if previous value is empty
      Specified by:
      setIfAbsentAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      value - object
      Returns:
      true if successful, or false if value was already set
    • trySet

      public boolean trySet(String path, Object value)
      Description copied from interface: RJsonBucket
      Specified by:
      trySet in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      value - object
      Returns:
      true if successful, or false if value was already set
    • trySetAsync

      public RFuture<Boolean> trySetAsync(String path, Object value)
      Description copied from interface: RJsonBucketAsync
      Specified by:
      trySetAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      value - object
      Returns:
      true if successful, or false if value was already set
    • trySet

      public boolean trySet(V value, long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RBucket
      Specified by:
      trySet in interface RBucket<V>
      Parameters:
      value - - value to set
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
      Returns:
      true if successful, or false if element was already set
    • trySetAsync

      public RFuture<Boolean> trySetAsync(V value, long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RBucketAsync
      Specified by:
      trySetAsync in interface RBucketAsync<V>
      Parameters:
      value - - value to set
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
      Returns:
      true if successful, or false if element was already set
    • setIfExists

      public boolean setIfExists(V value)
      Description copied from interface: RBucket
      Sets value only if object holder already exists.
      Specified by:
      setIfExists in interface RBucket<V>
      Parameters:
      value - - value to set
      Returns:
      true if successful, or false if element wasn't set
    • setIfExistsAsync

      public RFuture<Boolean> setIfExistsAsync(V value)
      Description copied from interface: RBucketAsync
      Sets value only if it's already exists.
      Specified by:
      setIfExistsAsync in interface RBucketAsync<V>
      Parameters:
      value - - value to set
      Returns:
      true if successful, or false if element wasn't set
    • setIfExists

      public boolean setIfExists(String path, Object value)
      Description copied from interface: RJsonBucket
      Sets Json object by JSONPath only if previous value is non-empty
      Specified by:
      setIfExists in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      value - object
      Returns:
      true if successful, or false if element wasn't set
    • setIfExistsAsync

      public RFuture<Boolean> setIfExistsAsync(String path, Object value)
      Description copied from interface: RJsonBucketAsync
      Sets Json object by JSONPath only if previous value is non-empty
      Specified by:
      setIfExistsAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      value - object
      Returns:
      true if successful, or false if element wasn't set
    • setIfExists

      public boolean setIfExists(V value, long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RBucket
      Specified by:
      setIfExists in interface RBucket<V>
      Parameters:
      value - - value to set
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
      Returns:
      true if successful, or false if element wasn't set
    • setIfExistsAsync

      public RFuture<Boolean> setIfExistsAsync(V value, long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RBucketAsync
      Specified by:
      setIfExistsAsync in interface RBucketAsync<V>
      Parameters:
      value - - value to set
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
      Returns:
      true if successful, or false if element wasn't set
    • setIfExists

      public boolean setIfExists(V value, Duration duration)
      Description copied from interface: RBucket
      Sets value with expiration duration only if object holder already exists.
      Specified by:
      setIfExists in interface RBucket<V>
      Parameters:
      value - value to set
      duration - expiration duration
      Returns:
      true if successful, or false if element wasn't set
    • setIfExistsAsync

      public RFuture<Boolean> setIfExistsAsync(V value, Duration duration)
      Description copied from interface: RBucketAsync
      Sets value with expiration duration only if object holder already exists.
      Specified by:
      setIfExistsAsync in interface RBucketAsync<V>
      Parameters:
      value - value to set
      duration - expiration duration
      Returns:
      true if successful, or false if element wasn't set
    • compareAndSet

      public boolean compareAndSet(V expect, V update)
      Description copied from interface: RBucket
      Atomically sets the value to the given updated value only if serialized state of the current value equals to serialized state of the expected value.
      Specified by:
      compareAndSet in interface RBucket<V>
      Parameters:
      expect - the expected value
      update - the new value
      Returns:
      true if successful; or false if the actual value was not equal to the expected value.
    • compareAndSetAsync

      public RFuture<Boolean> compareAndSetAsync(V expect, V update)
      Description copied from interface: RBucketAsync
      Atomically sets the value to the given updated value only if serialized state of the current value equals to serialized state of the expected value.
      Specified by:
      compareAndSetAsync in interface RBucketAsync<V>
      Parameters:
      expect - the expected value
      update - the new value
      Returns:
      true if successful; or false if the actual value was not equal to the expected value.
    • compareAndSet

      public boolean compareAndSet(String path, Object expect, Object update)
      Description copied from interface: RJsonBucket
      Atomically sets the value to the given updated value by given JSONPath, only if serialized state of the current value equals to serialized state of the expected value.
      Specified by:
      compareAndSet in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      expect - the expected value
      update - the new value
      Returns:
      true if successful; or false if the actual value was not equal to the expected value.
    • compareAndSetAsync

      public RFuture<Boolean> compareAndSetAsync(String path, Object expect, Object update)
      Description copied from interface: RJsonBucketAsync
      Atomically sets the value to the given updated value by given JSONPath, only if serialized state of the current value equals to serialized state of the expected value.
      Specified by:
      compareAndSetAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      expect - the expected value
      update - the new value
      Returns:
      true if successful; or false if the actual value was not equal to the expected value.
    • compareAndSetUpdateAsync

      protected RFuture<Boolean> compareAndSetUpdateAsync(String path, Object expect, Object update)
    • getAndSet

      public V getAndSet(V newValue)
      Description copied from interface: RBucket
      Retrieves current element in the holder and replaces it with newValue.
      Specified by:
      getAndSet in interface RBucket<V>
      Parameters:
      newValue - - value to set
      Returns:
      previous value
    • getAndSetAsync

      public RFuture<V> getAndSetAsync(V newValue)
      Description copied from interface: RBucketAsync
      Retrieves current element in the holder and replaces it with newValue.
      Specified by:
      getAndSetAsync in interface RBucketAsync<V>
      Parameters:
      newValue - - value to set
      Returns:
      previous value
    • getAndSet

      public <T> T getAndSet(JsonCodec<T> codec, String path, Object newValue)
      Description copied from interface: RJsonBucket
      Retrieves current value of element specified by JSONPath and replaces it with newValue.
      Specified by:
      getAndSet in interface RJsonBucket<V>
      Parameters:
      codec - object codec
      path - JSON path
      newValue - value to set
      Returns:
      previous value
    • getAndSetAsync

      public <T> RFuture<T> getAndSetAsync(JsonCodec<T> codec, String path, Object newValue)
      Description copied from interface: RJsonBucketAsync
      Retrieves current value of element specified by JSONPath and replaces it with newValue.
      Specified by:
      getAndSetAsync in interface RJsonBucketAsync<V>
      Parameters:
      codec - object codec
      path - JSON path
      newValue - value to set
      Returns:
      previous value
    • getAndSet

      public V getAndSet(V value, long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RBucket
      Specified by:
      getAndSet in interface RBucket<V>
      Parameters:
      value - - value to set
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
      Returns:
      previous value
    • getAndSetAsync

      public RFuture<V> getAndSetAsync(V value, long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RBucketAsync
      Specified by:
      getAndSetAsync in interface RBucketAsync<V>
      Parameters:
      value - - value to set
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
      Returns:
      previous value
    • getAndSet

      public V getAndSet(V value, Duration duration)
      Description copied from interface: RBucket
      Retrieves current element in the holder and replaces it with value with defined expiration duration.
      Specified by:
      getAndSet in interface RBucket<V>
      Parameters:
      value - value to set
      duration - expiration duration
      Returns:
      previous value
    • getAndSetAsync

      public RFuture<V> getAndSetAsync(V value, Duration duration)
      Description copied from interface: RBucketAsync
      Retrieves current element in the holder and replaces it with value with defined expiration duration.
      Specified by:
      getAndSetAsync in interface RBucketAsync<V>
      Parameters:
      value - value to set
      duration - expiration duration
      Returns:
      previous value
    • getAndExpire

      public V getAndExpire(Duration duration)
      Description copied from interface: RBucket
      Retrieves current element in the holder and sets an expiration duration for it.

      Requires Redis 6.2.0 and higher.

      Specified by:
      getAndExpire in interface RBucket<V>
      Parameters:
      duration - of object time to live interval
      Returns:
      element
    • getAndExpireAsync

      public RFuture<V> getAndExpireAsync(Duration duration)
      Description copied from interface: RBucketAsync
      Retrieves current element in the holder and sets an expiration duration for it.

      Requires Redis 6.2.0 and higher.

      Specified by:
      getAndExpireAsync in interface RBucketAsync<V>
      Parameters:
      duration - of object time to live interval
      Returns:
      element
    • getAndExpire

      public V getAndExpire(Instant time)
      Description copied from interface: RBucket
      Retrieves current element in the holder and sets an expiration date for it.

      Requires Redis 6.2.0 and higher.

      Specified by:
      getAndExpire in interface RBucket<V>
      Parameters:
      time - of exact object expiration moment
      Returns:
      element
    • getAndExpireAsync

      public RFuture<V> getAndExpireAsync(Instant time)
      Description copied from interface: RBucketAsync
      Retrieves current element in the holder and sets an expiration date for it.

      Requires Redis 6.2.0 and higher.

      Specified by:
      getAndExpireAsync in interface RBucketAsync<V>
      Parameters:
      time - of exact object expiration moment
      Returns:
      element
    • getAndClearExpire

      public V getAndClearExpire()
      Description copied from interface: RBucket
      Retrieves current element in the holder and clears expiration date set before.

      Requires Redis 6.2.0 and higher.

      Specified by:
      getAndClearExpire in interface RBucket<V>
      Returns:
      element
    • getAndClearExpireAsync

      public RFuture<V> getAndClearExpireAsync()
      Description copied from interface: RBucketAsync
      Retrieves current element in the holder and clears expiration date set before.

      Requires Redis 6.2.0 and higher.

      Specified by:
      getAndClearExpireAsync in interface RBucketAsync<V>
      Returns:
      element
    • set

      public void set(V value)
      Description copied from interface: RBucket
      Stores element into the holder.
      Specified by:
      set in interface RBucket<V>
      Parameters:
      value - - value to set
    • setAsync

      public RFuture<Void> setAsync(V value)
      Description copied from interface: RBucketAsync
      Stores element into the holder.
      Specified by:
      setAsync in interface RBucketAsync<V>
      Parameters:
      value - - value to set
      Returns:
      void
    • set

      public void set(String path, Object value)
      Description copied from interface: RJsonBucket
      Stores object into element by specified JSONPath.
      Specified by:
      set in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      value - value to set
    • setAsync

      public RFuture<Void> setAsync(String path, Object value)
      Description copied from interface: RJsonBucketAsync
      Stores object into element by specified JSONPath.
      Specified by:
      setAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      value - value to set
      Returns:
      void
    • set

      public void set(V value, long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RBucket
      Specified by:
      set in interface RBucket<V>
      Parameters:
      value - - value to set
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
    • setAsync

      public RFuture<Void> setAsync(V value, long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RBucketAsync
      Specified by:
      setAsync in interface RBucketAsync<V>
      Parameters:
      value - - value to set
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
      Returns:
      void
    • set

      public void set(V value, Duration duration)
      Description copied from interface: RBucket
      Stores value into the holder with defined expiration duration.
      Specified by:
      set in interface RBucket<V>
      Parameters:
      value - value to set
      duration - expiration duration
    • setAsync

      public RFuture<Void> setAsync(V value, Duration duration)
      Description copied from interface: RBucketAsync
      Stores value into the holder with defined expiration duration.
      Specified by:
      setAsync in interface RBucketAsync<V>
      Parameters:
      value - value to set
      duration - expiration duration
    • setAndKeepTTL

      public void setAndKeepTTL(V value)
      Description copied from interface: RBucket
      Set value and keep existing TTL.

      Requires Redis 6.0.0 and higher.

      Specified by:
      setAndKeepTTL in interface RBucket<V>
      Parameters:
      value - - value to set
    • setAndKeepTTLAsync

      public RFuture<Void> setAndKeepTTLAsync(V value)
      Description copied from interface: RBucketAsync
      Set value and keep existing TTL.

      Requires Redis 6.0.0 and higher.

      Specified by:
      setAndKeepTTLAsync in interface RBucketAsync<V>
      Parameters:
      value - - value to set
      Returns:
      void
    • deleteAsync

      public RFuture<Boolean> deleteAsync()
      Description copied from interface: RObjectAsync
      Delete object in async mode
      Specified by:
      deleteAsync in interface RObjectAsync
      Overrides:
      deleteAsync in class RedissonObject
      Returns:
      true if object was deleted false if not
    • stringAppend

      public long stringAppend(String path, Object value)
      Description copied from interface: RJsonBucket
      Appends string data to element specified by JSONPath. Returns new size of string data.
      Specified by:
      stringAppend in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      value - data
      Returns:
      size of string data
    • stringAppendAsync

      public RFuture<Long> stringAppendAsync(String path, Object value)
      Description copied from interface: RJsonBucketAsync
      Appends string data to element specified by JSONPath. Returns new size of string data.
      Specified by:
      stringAppendAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      value - data
      Returns:
      size of string data
    • stringAppendMulti

      public List<Long> stringAppendMulti(String path, Object value)
      Description copied from interface: RJsonBucket
      Appends string data to elements specified by JSONPath. Returns new size of string data. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      stringAppendMulti in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      value - data
      Returns:
      list of string data sizes
    • stringAppendMultiAsync

      public RFuture<List<Long>> stringAppendMultiAsync(String path, Object value)
      Description copied from interface: RJsonBucketAsync
      Appends string data to elements specified by JSONPath. Returns new size of string data. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      stringAppendMultiAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      value - data
      Returns:
      list of string data sizes
    • arrayAppend

      public long arrayAppend(String path, Object... values)
      Description copied from interface: RJsonBucket
      Appends values to array specified by JSONPath. Returns new size of array.
      Specified by:
      arrayAppend in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      values - values to append
      Returns:
      size of array
    • arrayAppendAsync

      public RFuture<Long> arrayAppendAsync(String path, Object... values)
      Description copied from interface: RJsonBucketAsync
      Appends values to array specified by JSONPath. Returns new size of array.
      Specified by:
      arrayAppendAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      values - values to append
      Returns:
      size of array
    • arrayAppendMulti

      public List<Long> arrayAppendMulti(String path, Object... values)
      Description copied from interface: RJsonBucket
      Appends values to arrays specified by JSONPath. Returns new size of arrays. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayAppendMulti in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      values - values to append
      Returns:
      list of arrays size
    • arrayAppendMultiAsync

      public RFuture<List<Long>> arrayAppendMultiAsync(String path, Object... values)
      Description copied from interface: RJsonBucketAsync
      Appends values to arrays specified by JSONPath. Returns new size of arrays. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayAppendMultiAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      values - values to append
      Returns:
      list of arrays size
    • arrayIndex

      public long arrayIndex(String path, Object value)
      Description copied from interface: RJsonBucket
      Returns index of object in array specified by JSONPath. -1 means object not found.
      Specified by:
      arrayIndex in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      value - value to search
      Returns:
      index in array
    • arrayIndexAsync

      public RFuture<Long> arrayIndexAsync(String path, Object value)
      Description copied from interface: RJsonBucketAsync
      Returns index of object in array specified by JSONPath. -1 means object not found.
      Specified by:
      arrayIndexAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      value - value to search
      Returns:
      index in array
    • arrayIndexMulti

      public List<Long> arrayIndexMulti(String path, Object value)
      Description copied from interface: RJsonBucket
      Returns index of object in arrays specified by JSONPath. -1 means object not found. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayIndexMulti in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      value - value to search
      Returns:
      list of index in arrays
    • arrayIndexMultiAsync

      public RFuture<List<Long>> arrayIndexMultiAsync(String path, Object value)
      Description copied from interface: RJsonBucketAsync
      Returns index of object in arrays specified by JSONPath. -1 means object not found. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayIndexMultiAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      value - value to search
      Returns:
      list of index in arrays
    • arrayIndex

      public long arrayIndex(String path, Object value, long start, long end)
      Description copied from interface: RJsonBucket
      Returns index of object in array specified by JSONPath in range between start (inclusive) and end (exclusive) indexes. -1 means object not found.
      Specified by:
      arrayIndex in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      value - value to search
      start - start index, inclusive
      end - end index, exclusive
      Returns:
      index in array
    • arrayIndexAsync

      public RFuture<Long> arrayIndexAsync(String path, Object value, long start, long end)
      Description copied from interface: RJsonBucketAsync
      Returns index of object in array specified by JSONPath in range between start (inclusive) and end (exclusive) indexes. -1 means object not found.
      Specified by:
      arrayIndexAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      value - value to search
      start - start index, inclusive
      end - end index, exclusive
      Returns:
      index in array
    • arrayIndexMulti

      public List<Long> arrayIndexMulti(String path, Object value, long start, long end)
      Description copied from interface: RJsonBucket
      Returns index of object in arrays specified by JSONPath in range between start (inclusive) and end (exclusive) indexes. -1 means object not found. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayIndexMulti in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      value - value to search
      start - start index, inclusive
      end - end index, exclusive
      Returns:
      list of index in arrays
    • arrayIndexMultiAsync

      public RFuture<List<Long>> arrayIndexMultiAsync(String path, Object value, long start, long end)
      Description copied from interface: RJsonBucketAsync
      Returns index of object in arrays specified by JSONPath in range between start (inclusive) and end (exclusive) indexes. -1 means object not found. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayIndexMultiAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      value - value to search
      start - start index, inclusive
      end - end index, exclusive
      Returns:
      list of index in arrays
    • arrayInsert

      public long arrayInsert(String path, long index, Object... values)
      Description copied from interface: RJsonBucket
      Inserts values into array specified by JSONPath. Values are inserted at defined index.
      Specified by:
      arrayInsert in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      index - array index at which values are inserted
      values - values to insert
      Returns:
      size of array
    • arrayInsertAsync

      public RFuture<Long> arrayInsertAsync(String path, long index, Object... values)
      Description copied from interface: RJsonBucketAsync
      Inserts values into array specified by JSONPath. Values are inserted at defined index.
      Specified by:
      arrayInsertAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      index - array index at which values are inserted
      values - values to insert
      Returns:
      size of array
    • arrayInsertMulti

      public List<Long> arrayInsertMulti(String path, long index, Object... values)
      Description copied from interface: RJsonBucket
      Inserts values into arrays specified by JSONPath. Values are inserted at defined index. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayInsertMulti in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      index - array index at which values are inserted
      values - values to insert
      Returns:
      list of arrays size
    • arrayInsertMultiAsync

      public RFuture<List<Long>> arrayInsertMultiAsync(String path, long index, Object... values)
      Description copied from interface: RJsonBucketAsync
      Inserts values into arrays specified by JSONPath. Values are inserted at defined index. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayInsertMultiAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      index - array index at which values are inserted
      values - values to insert
      Returns:
      list of arrays size
    • arraySize

      public long arraySize(String path)
      Description copied from interface: RJsonBucket
      Returns size of array specified by JSONPath.
      Specified by:
      arraySize in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      Returns:
      size of array
    • arraySizeAsync

      public RFuture<Long> arraySizeAsync(String path)
      Description copied from interface: RJsonBucketAsync
      Returns size of array specified by JSONPath.
      Specified by:
      arraySizeAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      Returns:
      size of array
    • arraySizeMulti

      public List<Long> arraySizeMulti(String path)
      Description copied from interface: RJsonBucket
      Returns size of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arraySizeMulti in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      Returns:
      list of arrays size
    • arraySizeMultiAsync

      public RFuture<List<Long>> arraySizeMultiAsync(String path)
      Description copied from interface: RJsonBucketAsync
      Returns size of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arraySizeMultiAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      Returns:
      list of arrays size
    • arrayPollLast

      public <T> T arrayPollLast(JsonCodec<T> codec, String path)
      Description copied from interface: RJsonBucket
      Polls last element of array specified by JSONPath.
      Specified by:
      arrayPollLast in interface RJsonBucket<V>
      Type Parameters:
      T - the type of object
      Parameters:
      codec - object codec
      path - JSON path
      Returns:
      last element
    • arrayPollLastAsync

      public <T> RFuture<T> arrayPollLastAsync(JsonCodec<T> codec, String path)
      Description copied from interface: RJsonBucketAsync
      Polls last element of array specified by JSONPath.
      Specified by:
      arrayPollLastAsync in interface RJsonBucketAsync<V>
      Type Parameters:
      T - the type of object
      Parameters:
      codec - object codec
      path - JSON path
      Returns:
      last element
    • arrayPollLastMulti

      public <T> List<T> arrayPollLastMulti(JsonCodec<T> codec, String path)
      Description copied from interface: RJsonBucket
      Polls last element of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayPollLastMulti in interface RJsonBucket<V>
      Type Parameters:
      T - the type of object
      Parameters:
      codec - object codec
      path - JSON path
      Returns:
      list of last elements
    • arrayPollLastMultiAsync

      public <T> RFuture<List<T>> arrayPollLastMultiAsync(JsonCodec<T> codec, String path)
      Description copied from interface: RJsonBucketAsync
      Polls last element of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayPollLastMultiAsync in interface RJsonBucketAsync<V>
      Type Parameters:
      T - the type of object
      Parameters:
      codec - object codec
      path - JSON path
      Returns:
      list of last elements
    • arrayPollFirst

      public <T> T arrayPollFirst(JsonCodec<T> codec, String path)
      Description copied from interface: RJsonBucket
      Polls first element of array specified by JSONPath.
      Specified by:
      arrayPollFirst in interface RJsonBucket<V>
      Type Parameters:
      T - the type of object
      Parameters:
      codec - object codec
      path - JSON path
      Returns:
      first element
    • arrayPollFirstAsync

      public <T> RFuture<T> arrayPollFirstAsync(JsonCodec<T> codec, String path)
      Description copied from interface: RJsonBucketAsync
      Polls first element of array specified by JSONPath.
      Specified by:
      arrayPollFirstAsync in interface RJsonBucketAsync<V>
      Type Parameters:
      T - the type of object
      Parameters:
      codec - object codec
      path - JSON path
      Returns:
      first element
    • arrayPollFirstMulti

      public <T> List<T> arrayPollFirstMulti(JsonCodec<T> codec, String path)
      Description copied from interface: RJsonBucket
      Polls first element of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayPollFirstMulti in interface RJsonBucket<V>
      Type Parameters:
      T - the type of object
      Parameters:
      codec - object codec
      path - JSON path
      Returns:
      list of first elements
    • arrayPollFirstMultiAsync

      public <T> RFuture<List<T>> arrayPollFirstMultiAsync(JsonCodec<T> codec, String path)
      Description copied from interface: RJsonBucketAsync
      Polls first element of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayPollFirstMultiAsync in interface RJsonBucketAsync<V>
      Type Parameters:
      T - the type of object
      Parameters:
      codec - object codec
      path - JSON path
      Returns:
      list of first elements
    • arrayPop

      public <T> T arrayPop(JsonCodec<T> codec, String path, long index)
      Description copied from interface: RJsonBucket
      Pops element located at index of array specified by JSONPath.
      Specified by:
      arrayPop in interface RJsonBucket<V>
      Type Parameters:
      T - the type of object
      Parameters:
      codec - object codec
      path - JSON path
      index - array index
      Returns:
      element
    • arrayPopAsync

      public <T> RFuture<T> arrayPopAsync(JsonCodec<T> codec, String path, long index)
      Description copied from interface: RJsonBucketAsync
      Pops element located at index of array specified by JSONPath.
      Specified by:
      arrayPopAsync in interface RJsonBucketAsync<V>
      Type Parameters:
      T - the type of object
      Parameters:
      codec - object codec
      path - JSON path
      index - array index
      Returns:
      element
    • arrayPopMulti

      public <T> List<T> arrayPopMulti(JsonCodec<T> codec, String path, long index)
      Description copied from interface: RJsonBucket
      Pops elements located at index of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayPopMulti in interface RJsonBucket<V>
      Type Parameters:
      T - the type of object
      Parameters:
      codec - object codec
      path - JSON path
      index - array index
      Returns:
      list of elements
    • arrayPopMultiAsync

      public <T> RFuture<List<T>> arrayPopMultiAsync(JsonCodec<T> codec, String path, long index)
      Description copied from interface: RJsonBucketAsync
      Pops elements located at index of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayPopMultiAsync in interface RJsonBucketAsync<V>
      Type Parameters:
      T - the type of object
      Parameters:
      codec - object codec
      path - JSON path
      index - array index
      Returns:
      list of elements
    • arrayTrim

      public long arrayTrim(String path, long start, long end)
      Description copied from interface: RJsonBucket
      Trims array specified by JSONPath in range between start (inclusive) and end (inclusive) indexes.
      Specified by:
      arrayTrim in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      start - start index, inclusive
      end - end index, inclusive
      Returns:
      length of array
    • arrayTrimAsync

      public RFuture<Long> arrayTrimAsync(String path, long start, long end)
      Description copied from interface: RJsonBucketAsync
      Trims array specified by JSONPath in range between start (inclusive) and end (inclusive) indexes.
      Specified by:
      arrayTrimAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      start - start index, inclusive
      end - end index, inclusive
      Returns:
      length of array
    • arrayTrimMulti

      public List<Long> arrayTrimMulti(String path, long start, long end)
      Description copied from interface: RJsonBucket
      Trims arrays specified by JSONPath in range between start (inclusive) and end (inclusive) indexes. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayTrimMulti in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      start - start index, inclusive
      end - end index, inclusive
      Returns:
      length of array
    • arrayTrimMultiAsync

      public RFuture<List<Long>> arrayTrimMultiAsync(String path, long start, long end)
      Description copied from interface: RJsonBucketAsync
      Trims arrays specified by JSONPath in range between start (inclusive) and end (inclusive) indexes. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      arrayTrimMultiAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      start - start index, inclusive
      end - end index, inclusive
      Returns:
      length of array
    • clear

      public long clear()
      Description copied from interface: RJsonBucket
      Clears json container.
      Specified by:
      clear in interface RJsonBucket<V>
      Returns:
      number of cleared containers
    • clearAsync

      public RFuture<Long> clearAsync()
      Description copied from interface: RJsonBucketAsync
      Clears json container.
      Specified by:
      clearAsync in interface RJsonBucketAsync<V>
      Returns:
      number of cleared containers
    • clear

      public long clear(String path)
      Description copied from interface: RJsonBucket
      Clears json container specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      clear in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      Returns:
      number of cleared containers
    • clearAsync

      public RFuture<Long> clearAsync(String path)
      Description copied from interface: RJsonBucketAsync
      Clears json container specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      clearAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      Returns:
      number of cleared containers
    • incrementAndGet

      public <T extends Number> T incrementAndGet(String path, T delta)
      Description copied from interface: RJsonBucket
      Increments the current value specified by JSONPath by delta.
      Specified by:
      incrementAndGet in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      delta - increment value
      Returns:
      the updated value
    • incrementAndGetAsync

      public <T extends Number> RFuture<T> incrementAndGetAsync(String path, T delta)
      Description copied from interface: RJsonBucketAsync
      Increments the current value specified by JSONPath by delta.
      Specified by:
      incrementAndGetAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      delta - increment value
      Returns:
      the updated value
    • incrementAndGetMulti

      public <T extends Number> List<T> incrementAndGetMulti(String path, T delta)
      Description copied from interface: RJsonBucket
      Increments the current values specified by JSONPath by delta. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      incrementAndGetMulti in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      delta - increment value
      Returns:
      list of updated value
    • incrementAndGetMultiAsync

      public <T extends Number> RFuture<List<T>> incrementAndGetMultiAsync(String path, T delta)
      Description copied from interface: RJsonBucketAsync
      Increments the current values specified by JSONPath by delta. Compatible only with enhanced syntax starting with '$' character.
      Specified by:
      incrementAndGetMultiAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      delta - increment value
      Returns:
      list of updated value
    • countKeys

      public long countKeys()
      Description copied from interface: RJsonBucket
      Returns keys amount in JSON container
      Specified by:
      countKeys in interface RJsonBucket<V>
      Returns:
      keys amount
    • countKeysAsync

      public RFuture<Long> countKeysAsync()
      Description copied from interface: RJsonBucketAsync
      Returns keys amount in JSON container
      Specified by:
      countKeysAsync in interface RJsonBucketAsync<V>
      Returns:
      keys amount
    • countKeys

      public long countKeys(String path)
      Description copied from interface: RJsonBucket
      Returns keys amount in JSON container specified by JSONPath
      Specified by:
      countKeys in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      Returns:
      keys amount
    • countKeysAsync

      public RFuture<Long> countKeysAsync(String path)
      Description copied from interface: RJsonBucketAsync
      Returns keys amount in JSON container specified by JSONPath
      Specified by:
      countKeysAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      Returns:
      keys amount
    • countKeysMulti

      public List<Long> countKeysMulti(String path)
      Description copied from interface: RJsonBucket
      Returns list of keys amount in JSON containers specified by JSONPath
      Specified by:
      countKeysMulti in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      Returns:
      list of keys amount
    • countKeysMultiAsync

      public RFuture<List<Long>> countKeysMultiAsync(String path)
      Description copied from interface: RJsonBucketAsync
      Returns list of keys amount in JSON containers specified by JSONPath
      Specified by:
      countKeysMultiAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      Returns:
      list of keys amount
    • getKeys

      public List<String> getKeys()
      Description copied from interface: RJsonBucket
      Returns list of keys in JSON container
      Specified by:
      getKeys in interface RJsonBucket<V>
      Returns:
      list of keys
    • getKeysAsync

      public RFuture<List<String>> getKeysAsync()
      Description copied from interface: RJsonBucketAsync
      Returns list of keys in JSON container
      Specified by:
      getKeysAsync in interface RJsonBucketAsync<V>
      Returns:
      list of keys
    • getKeys

      public List<String> getKeys(String path)
      Description copied from interface: RJsonBucket
      Returns list of keys in JSON container specified by JSONPath
      Specified by:
      getKeys in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      Returns:
      list of keys
    • getKeysAsync

      public RFuture<List<String>> getKeysAsync(String path)
      Description copied from interface: RJsonBucketAsync
      Returns list of keys in JSON container specified by JSONPath
      Specified by:
      getKeysAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      Returns:
      list of keys
    • getKeysMulti

      public List<List<String>> getKeysMulti(String path)
      Description copied from interface: RJsonBucket
      Returns list of keys in JSON containers specified by JSONPath
      Specified by:
      getKeysMulti in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      Returns:
      list of keys
    • getKeysMultiAsync

      public RFuture<List<List<String>>> getKeysMultiAsync(String path)
      Description copied from interface: RJsonBucketAsync
      Returns list of keys in JSON containers specified by JSONPath
      Specified by:
      getKeysMultiAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      Returns:
      list of keys
    • toggle

      public boolean toggle(String path)
      Description copied from interface: RJsonBucket
      Toggle boolean value specified by JSONPath
      Specified by:
      toggle in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      Returns:
      new boolean value
    • toggleAsync

      public RFuture<Boolean> toggleAsync(String path)
      Description copied from interface: RJsonBucketAsync
      Toggle boolean value specified by JSONPath
      Specified by:
      toggleAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      Returns:
      new boolean value
    • toggleMulti

      public List<Boolean> toggleMulti(String path)
      Description copied from interface: RJsonBucket
      Toggle boolean values specified by JSONPath
      Specified by:
      toggleMulti in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      Returns:
      list of boolean values
    • toggleMultiAsync

      public RFuture<List<Boolean>> toggleMultiAsync(String path)
      Description copied from interface: RJsonBucketAsync
      Toggle boolean values specified by JSONPath
      Specified by:
      toggleMultiAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      Returns:
      list of boolean values
    • getType

      public JsonType getType()
      Description copied from interface: RJsonBucket
      Returns type of element
      Specified by:
      getType in interface RJsonBucket<V>
      Returns:
      type of element
    • getTypeAsync

      public RFuture<JsonType> getTypeAsync()
      Description copied from interface: RJsonBucketAsync
      Returns type of element
      Specified by:
      getTypeAsync in interface RJsonBucketAsync<V>
      Returns:
      type of element
    • getType

      public JsonType getType(String path)
      Description copied from interface: RJsonBucket
      Returns type of element specified by JSONPath
      Specified by:
      getType in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      Returns:
      type of element
    • getTypeAsync

      public RFuture<JsonType> getTypeAsync(String path)
      Description copied from interface: RJsonBucketAsync
      Returns type of element specified by JSONPath
      Specified by:
      getTypeAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      Returns:
      type of element
    • delete

      public long delete(String path)
      Description copied from interface: RJsonBucket
      Deletes JSON elements specified by JSONPath
      Specified by:
      delete in interface RJsonBucket<V>
      Parameters:
      path - JSON path
      Returns:
      number of deleted elements
    • deleteAsync

      public RFuture<Long> deleteAsync(String path)
      Description copied from interface: RJsonBucketAsync
      Deletes JSON elements specified by JSONPath
      Specified by:
      deleteAsync in interface RJsonBucketAsync<V>
      Parameters:
      path - JSON path
      Returns:
      number of deleted elements
    • expire

      public boolean expire(long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RExpirable
      Specified by:
      expire in interface RExpirable
      Parameters:
      timeToLive - - timeout before object will be deleted
      timeUnit - - timeout time unit
      Returns:
      true if the timeout was set and false if not
    • expireAsync

      public RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RExpirableAsync
      Specified by:
      expireAsync in interface RExpirableAsync
      Parameters:
      timeToLive - - timeout before object will be deleted
      timeUnit - - timeout time unit
      Returns:
      true if the timeout was set and false if not
    • expireAt

      public boolean expireAt(long timestamp)
      Description copied from interface: RExpirable
      Specified by:
      expireAt in interface RExpirable
      Parameters:
      timestamp - - expire date in milliseconds (Unix timestamp)
      Returns:
      true if the timeout was set and false if not
    • expireAtAsync

      public RFuture<Boolean> expireAtAsync(long timestamp)
      Description copied from interface: RExpirableAsync
      Specified by:
      expireAtAsync in interface RExpirableAsync
      Parameters:
      timestamp - - expire date in milliseconds (Unix timestamp)
      Returns:
      true if the timeout was set and false if not
    • expire

      public boolean expire(Instant instant)
      Description copied from interface: RExpirable
      Sets an expiration date for this object. When expire date comes the key will automatically be deleted.
      Specified by:
      expire in interface RExpirable
      Parameters:
      instant - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfSet

      public boolean expireIfSet(Instant time)
      Description copied from interface: RExpirable
      Sets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfSet in interface RExpirable
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfSetAsync

      public RFuture<Boolean> expireIfSetAsync(Instant time)
      Description copied from interface: RExpirableAsync
      Sets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfSetAsync in interface RExpirableAsync
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfNotSet

      public boolean expireIfNotSet(Instant time)
      Description copied from interface: RExpirable
      Sets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfNotSet in interface RExpirable
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfNotSetAsync

      public RFuture<Boolean> expireIfNotSetAsync(Instant time)
      Description copied from interface: RExpirableAsync
      Sets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfNotSetAsync in interface RExpirableAsync
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfGreater

      public boolean expireIfGreater(Instant time)
      Description copied from interface: RExpirable
      Sets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfGreater in interface RExpirable
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfGreaterAsync

      public RFuture<Boolean> expireIfGreaterAsync(Instant time)
      Description copied from interface: RExpirableAsync
      Sets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfGreaterAsync in interface RExpirableAsync
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfLess

      public boolean expireIfLess(Instant time)
      Description copied from interface: RExpirable
      Sets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfLess in interface RExpirable
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfLessAsync

      public RFuture<Boolean> expireIfLessAsync(Instant time)
      Description copied from interface: RExpirableAsync
      Sets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfLessAsync in interface RExpirableAsync
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireAsync

      public RFuture<Boolean> expireAsync(Instant instant)
      Description copied from interface: RExpirableAsync
      Set an expire date for object. When expire date comes the key will automatically be deleted.
      Specified by:
      expireAsync in interface RExpirableAsync
      Parameters:
      instant - - expire date
      Returns:
      true if the timeout was set and false if not
    • expire

      public boolean expire(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object. After the timeout has expired, the key will automatically be deleted.
      Specified by:
      expire in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireAsync

      public RFuture<Boolean> expireAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Set a timeout for object. After the timeout has expired, the key will automatically be deleted.
      Specified by:
      expireAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireAt

      public boolean expireAt(Date timestamp)
      Description copied from interface: RExpirable
      Specified by:
      expireAt in interface RExpirable
      Parameters:
      timestamp - - expire date
      Returns:
      true if the timeout was set and false if not
    • expireAtAsync

      public RFuture<Boolean> expireAtAsync(Date timestamp)
      Description copied from interface: RExpirableAsync
      Specified by:
      expireAtAsync in interface RExpirableAsync
      Parameters:
      timestamp - - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfSet

      public boolean expireIfSet(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfSet in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfSetAsync

      public RFuture<Boolean> expireIfSetAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Sets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfSetAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfNotSet

      public boolean expireIfNotSet(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfNotSet in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfNotSetAsync

      public RFuture<Boolean> expireIfNotSetAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Sets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfNotSetAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfGreater

      public boolean expireIfGreater(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfGreater in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfGreaterAsync

      public RFuture<Boolean> expireIfGreaterAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Sets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfGreaterAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfLess

      public boolean expireIfLess(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfLess in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfLessAsync

      public RFuture<Boolean> expireIfLessAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Sets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfLessAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • clearExpire

      public boolean clearExpire()
      Description copied from interface: RExpirable
      Clear an expire timeout or expire date for object.
      Specified by:
      clearExpire in interface RExpirable
      Returns:
      true if timeout was removed false if object does not exist or does not have an associated timeout
    • clearExpireAsync

      public RFuture<Boolean> clearExpireAsync()
      Description copied from interface: RExpirableAsync
      Clear an expire timeout or expire date for object in async mode. Object will not be deleted.
      Specified by:
      clearExpireAsync in interface RExpirableAsync
      Returns:
      true if the timeout was cleared and false if not
    • remainTimeToLive

      public long remainTimeToLive()
      Description copied from interface: RExpirable
      Remaining time to live of Redisson object that has a timeout
      Specified by:
      remainTimeToLive in interface RExpirable
      Returns:
      time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
    • remainTimeToLiveAsync

      public RFuture<Long> remainTimeToLiveAsync()
      Description copied from interface: RExpirableAsync
      Remaining time to live of Redisson object that has a timeout
      Specified by:
      remainTimeToLiveAsync in interface RExpirableAsync
      Returns:
      time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
    • getExpireTime

      public long getExpireTime()
      Description copied from interface: RExpirable
      Expiration time of Redisson object that has a timeout

      Requires Redis 7.0.0 and higher.

      Specified by:
      getExpireTime in interface RExpirable
      Returns:
      expiration time
    • getExpireTimeAsync

      public RFuture<Long> getExpireTimeAsync()
      Description copied from interface: RExpirableAsync
      Expiration time of Redisson object that has a timeout

      Requires Redis 7.0.0 and higher.

      Specified by:
      getExpireTimeAsync in interface RExpirableAsync
      Returns:
      expiration time
    • expireAsync

      protected RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String param, String... keys)
    • expireAtAsync

      protected RFuture<Boolean> expireAtAsync(long timestamp, String param, String... keys)
    • clearExpireAsync

      protected RFuture<Boolean> clearExpireAsync(String... keys)