Enum CachedSupplier.StaleValueBehavior

    • Enum Constant Detail

      • STRICT

        public static final CachedSupplier.StaleValueBehavior STRICT
        Strictly treat the stale time. Never return a stale cached value (except when the supplier returns an expired value, in which case the supplier will return the value but only for a very short period of time to prevent overloading the underlying supplier).
      • ALLOW

        public static final CachedSupplier.StaleValueBehavior ALLOW
        Allow stale values to be returned from the cache. Value retrieval will never fail, as long as the cache has succeeded when calling the underlying supplier at least once.
    • Method Detail

      • values

        public static CachedSupplier.StaleValueBehavior[] 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 (CachedSupplier.StaleValueBehavior c : CachedSupplier.StaleValueBehavior.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CachedSupplier.StaleValueBehavior valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null