Interface RExpirableRx

    • Method Detail

      • expire

        io.reactivex.rxjava3.core.Single<> expire​(long timeToLive,
                                                          timeUnit)
        Set a timeout for object in mode. After the timeout has expired, the key will automatically be deleted.
        Parameters:
        timeToLive - - timeout before object will be deleted
        timeUnit - - timeout time unit
        Returns:
        true if the timeout was set and false if not
      • expireAt

        io.reactivex.rxjava3.core.Single<> expireAt​( timestamp)
        Deprecated.
        Use expireAt(Instant) instead
        Parameters:
        timestamp - - expire date
        Returns:
        true if the timeout was set and false if not
      • expireAt

        io.reactivex.rxjava3.core.Single<> expireAt​(long timestamp)
        Deprecated.
        Use expireAt(Instant) instead
        Parameters:
        timestamp - - expire date in milliseconds (Unix timestamp)
        Returns:
        true if the timeout was set and false if not
      • expireAt

        io.reactivex.rxjava3.core.Single<> expireAt​( 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
      • clearExpire

        io.reactivex.rxjava3.core.Single<> 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

        io.reactivex.rxjava3.core.Single<> 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.