Class GetExOptions

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static class  GetExOptions.ExpiryType
      Types of value expiration configuration.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static GetExOptions Milliseconds​(java.lang.Long milliseconds)
      Set the specified expire time, in milliseconds.
      static GetExOptions Persist()
      Remove the time to live associated with the key.
      static GetExOptions Seconds​(java.lang.Long seconds)
      Set the specified expire time, in seconds.
      java.lang.String[] toArgs()
      Converts GetExOptions into a String[] to pass to the GETEX command.
      GlideString[] toGlideStringArgs()
      Converts GetExOptions into a GlideString[] to pass to the GETEX command.
      static GetExOptions UnixMilliseconds​(java.lang.Long unixMilliseconds)
      Set the specified Unix time at which the key will expire, in milliseconds.
      static GetExOptions UnixSeconds​(java.lang.Long unixSeconds)
      Set the specified Unix time at which the key will expire, in seconds.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • Seconds

        public static GetExOptions Seconds​(java.lang.Long seconds)
        Set the specified expire time, in seconds. Equivalent to EX in the Valkey API.
        Parameters:
        seconds - The time to expire, in seconds.
        Returns:
        The options specifying the given expiry.
      • Milliseconds

        public static GetExOptions Milliseconds​(java.lang.Long milliseconds)
        Set the specified expire time, in milliseconds. Equivalent to PX in the Valkey API.
        Parameters:
        milliseconds - The time to expire, in milliseconds.
        Returns:
        The options specifying the given expiry.
      • UnixSeconds

        public static GetExOptions 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 - The UNIX TIME to expire, in seconds.
        Returns:
        The options specifying the given expiry.
      • UnixMilliseconds

        public static GetExOptions 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 - The UNIX TIME to expire, in milliseconds.
        Returns:
        The options specifying the given expiry.
      • Persist

        public static GetExOptions Persist()
        Remove the time to live associated with the key.
      • toArgs

        public java.lang.String[] toArgs()
        Converts GetExOptions into a String[] to pass to the GETEX command.
        Returns:
        String[]
      • toGlideStringArgs

        public GlideString[] toGlideStringArgs()
        Converts GetExOptions into a GlideString[] to pass to the GETEX command.
        Returns:
        GlideString[]