Enum TimeToLiveResetPolicy

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TimeToLiveResetPolicy>

    public enum TimeToLiveResetPolicy
    extends java.lang.Enum<TimeToLiveResetPolicy>
    An enum that specifies whether TTL-based expiration should be relative to the creation time or the last modified time of a given entry.
    See Also:
    ExpirationAttributes
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      LAST_MODIFIED
      Expiration is relative to the last time that the entry was accessed or modified.
      NEVER
      Expiration is relative to the creation time of the entry.
    • Enum Constant Detail

      • LAST_MODIFIED

        public static final TimeToLiveResetPolicy LAST_MODIFIED
        Expiration is relative to the last time that the entry was accessed or modified. This is the default if not explicitly set in various ExpirationAttributes constructors.
      • NEVER

        public static final TimeToLiveResetPolicy NEVER
        Expiration is relative to the creation time of the entry. This ensures that the entry is expired with a fixed timeout, regardless of whether it is accessed or modified.
    • Method Detail

      • values

        public static TimeToLiveResetPolicy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TimeToLiveResetPolicy c : TimeToLiveResetPolicy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TimeToLiveResetPolicy valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • toXmlString

        public java.lang.String toXmlString()