Interface RBucketReactive<V>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      reactor.core.publisher.Mono<> compareAndSet​(V expect, V update)
      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.
      reactor.core.publisher.Mono<V> get()
      Retrieves element stored in the holder.
      reactor.core.publisher.Mono<V> getAndDelete()
      Retrieves element in the holder and removes it.
      reactor.core.publisher.Mono<V> getAndSet​(V newValue)
      Retrieves current element in the holder and replaces it with newValue.
      reactor.core.publisher.Mono<V> getAndSet​(V value, long timeToLive,  timeUnit)
      Retrieves current element in the holder and replaces it with newValue with defined timeToLive interval.
      reactor.core.publisher.Mono<> set​(V value)
      Stores element into the holder.
      reactor.core.publisher.Mono<> set​(V value, long timeToLive,  timeUnit)
      Stores element into the holder with defined timeToLive interval.
      reactor.core.publisher.Mono<> setAndKeepTTL​(V value)
      Set value and keep existing TTL.
      reactor.core.publisher.Mono<> setIfExists​(V value)
      Sets value only if it's already exists.
      reactor.core.publisher.Mono<> setIfExists​(V value, long timeToLive,  timeUnit)
      Sets value only if it's already exists.
      reactor.core.publisher.Mono<> size()
      Returns size of object in bytes
      reactor.core.publisher.Mono<> trySet​(V value)
      Tries to set element atomically into empty holder.
      reactor.core.publisher.Mono<> trySet​(V value, long timeToLive,  timeUnit)
      Tries to set element atomically into empty holder with defined timeToLive interval.
    • Method Detail

      • size

        reactor.core.publisher.Mono<> size()
        Returns size of object in bytes
        Returns:
        object size
      • trySet

        reactor.core.publisher.Mono<> trySet​(V value)
        Tries to set element atomically into empty holder.
        Parameters:
        value - - value to set
        Returns:
        true if successful, or false if element was already set
      • trySet

        reactor.core.publisher.Mono<> trySet​(V value,
                                                    long timeToLive,
                                                     timeUnit)
        Tries to set element atomically into empty holder with defined timeToLive interval.
        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

        reactor.core.publisher.Mono<> setIfExists​(V value)
        Sets value only if it's already exists.
        Parameters:
        value - - value to set
        Returns:
        true if successful, or false if element wasn't set
      • setIfExists

        reactor.core.publisher.Mono<> setIfExists​(V value,
                                                         long timeToLive,
                                                          timeUnit)
        Sets value only if it's already exists.
        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
      • compareAndSet

        reactor.core.publisher.Mono<> compareAndSet​(V expect,
                                                           V update)
        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.
        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.
      • getAndSet

        reactor.core.publisher.Mono<V> getAndSet​(V newValue)
        Retrieves current element in the holder and replaces it with newValue.
        Parameters:
        newValue - - value to set
        Returns:
        previous value
      • getAndSet

        reactor.core.publisher.Mono<V> getAndSet​(V value,
                                                 long timeToLive,
                                                  timeUnit)
        Retrieves current element in the holder and replaces it with newValue with defined timeToLive interval.
        Parameters:
        value - - value to set
        timeToLive - - time to live interval
        timeUnit - - unit of time to live interval
        Returns:
        previous value
      • get

        reactor.core.publisher.Mono<V> get()
        Retrieves element stored in the holder.
        Returns:
        element
      • getAndDelete

        reactor.core.publisher.Mono<V> getAndDelete()
        Retrieves element in the holder and removes it.
        Returns:
        element
      • set

        reactor.core.publisher.Mono<> set​(V value)
        Stores element into the holder.
        Parameters:
        value - - value to set
        Returns:
        void
      • set

        reactor.core.publisher.Mono<> set​(V value,
                                              long timeToLive,
                                               timeUnit)
        Stores element into the holder with defined timeToLive interval.
        Parameters:
        value - - value to set
        timeToLive - - time to live interval
        timeUnit - - unit of time to live interval
        Returns:
        void
      • setAndKeepTTL

        reactor.core.publisher.Mono<> setAndKeepTTL​(V value)
        Set value and keep existing TTL.

        Requires Redis 6.0.0 and higher.

        Parameters:
        value - - value to set
        Returns:
        void