Interface RExpirableReactive

    • Method Detail

      • expire

        @Deprecated
        reactor.core.publisher.Mono<Boolean> expire​(long timeToLive,
                                                    TimeUnit timeUnit)
        Deprecated.
        Use expire(Duration) instead
        Parameters:
        timeToLive - - timeout before object will be deleted
        timeUnit - - timeout time unit
        Returns:
        true if the timeout was set and false if not
      • expireAt

        @Deprecated
        reactor.core.publisher.Mono<Boolean> expireAt​(Date timestamp)
        Deprecated.
        Use expire(Instant) instead
        Parameters:
        timestamp - - expire date
        Returns:
        true if the timeout was set and false if not
      • expireAt

        @Deprecated
        reactor.core.publisher.Mono<Boolean> expireAt​(long timestamp)
        Deprecated.
        Use expire(Instant) instead
        Parameters:
        timestamp - - expire date in milliseconds (Unix timestamp)
        Returns:
        true if the timeout was set and false if not
      • expire

        reactor.core.publisher.Mono<Boolean> expire​(Instant instant)
        Set an expire date for object. When expire date comes the key will automatically be deleted.
        Parameters:
        instant - - expire date
        Returns:
        true if the timeout was set and false if not
      • expireIfSet

        reactor.core.publisher.Mono<Boolean> expireIfSet​(Instant time)
        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.

        Parameters:
        time - expire date
        Returns:
        true if the timeout was set and false if not
      • expireIfNotSet

        reactor.core.publisher.Mono<Boolean> expireIfNotSet​(Instant time)
        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.

        Parameters:
        time - expire date
        Returns:
        true if the timeout was set and false if not
      • expireIfGreater

        reactor.core.publisher.Mono<Boolean> expireIfGreater​(Instant time)
        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.

        Parameters:
        time - expire date
        Returns:
        true if the timeout was set and false if not
      • expireIfLess

        reactor.core.publisher.Mono<Boolean> expireIfLess​(Instant time)
        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.

        Parameters:
        time - expire date
        Returns:
        true if the timeout was set and false if not
      • expire

        reactor.core.publisher.Mono<Boolean> expire​(Duration duration)
        Sets a timeout for this object. After the timeout has expired, the key will automatically be deleted.
        Parameters:
        duration - timeout before object will be deleted
        Returns:
        true if the timeout was set and false if not
      • expireIfSet

        reactor.core.publisher.Mono<Boolean> expireIfSet​(Duration duration)
        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.

        Parameters:
        duration - timeout before object will be deleted
        Returns:
        true if the timeout was set and false if not
      • expireIfNotSet

        reactor.core.publisher.Mono<Boolean> expireIfNotSet​(Duration duration)
        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.

        Parameters:
        duration - timeout before object will be deleted
        Returns:
        true if the timeout was set and false if not
      • expireIfGreater

        reactor.core.publisher.Mono<Boolean> expireIfGreater​(Duration duration)
        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.

        Parameters:
        duration - timeout before object will be deleted
        Returns:
        true if the timeout was set and false if not
      • expireIfLess

        reactor.core.publisher.Mono<Boolean> expireIfLess​(Duration duration)
        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.

        Parameters:
        duration - timeout before object will be deleted
        Returns:
        true if the timeout was set and false if not
      • clearExpire

        reactor.core.publisher.Mono<Boolean> clearExpire()
        Clear an expire timeout or expire date for object in mode. Object will not be deleted.
        Returns:
        true if the timeout was cleared and false if not
      • remainTimeToLive

        reactor.core.publisher.Mono<Long> remainTimeToLive()
        Get remaining time to live of object in milliseconds.
        Returns:
        time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
      • getExpireTime

        reactor.core.publisher.Mono<Long> getExpireTime()
        Expiration time of Redisson object that has a timeout

        Requires Redis 7.0.0 and higher.

        Returns:
        expiration time