Class SetOptions.Expiry

  • Enclosing class:
    SetOptions

    public static final class SetOptions.Expiry
    extends java.lang.Object
    Configuration of value lifetime.
    • Method Detail

      • KeepExisting

        public static SetOptions.Expiry KeepExisting()
        Retain the time to live associated with the key. Equivalent to KEEPTTL in the Valkey API.
      • Seconds

        public static SetOptions.Expiry Seconds​(java.lang.Long seconds)
        Set the specified expire time, in seconds. Equivalent to EX in the Valkey API.
        Parameters:
        seconds - time to expire, in seconds
        Returns:
        Expiry
      • Milliseconds

        public static SetOptions.Expiry Milliseconds​(java.lang.Long milliseconds)
        Set the specified expire time, in milliseconds. Equivalent to PX in the Valkey API.
        Parameters:
        milliseconds - time to expire, in milliseconds
        Returns:
        Expiry
      • UnixSeconds

        public static SetOptions.Expiry UnixSeconds​(java.lang.Long unixSeconds)
        Set the specified Unix time at which the key will expire, in seconds. Equivalent to EXAT in the Valkey API.
        Parameters:
        unixSeconds - UNIX TIME to expire, in seconds.
        Returns:
        Expiry
      • UnixMilliseconds

        public static SetOptions.Expiry UnixMilliseconds​(java.lang.Long unixMilliseconds)
        Set the specified Unix time at which the key will expire, in milliseconds. Equivalent to PXAT in the Valkey API.
        Parameters:
        unixMilliseconds - UNIX TIME to expire, in milliseconds.
        Returns:
        Expiry