Enum CachedSupplier.StaleValueBehavior
java.lang.Object
java.lang.Enum<CachedSupplier.StaleValueBehavior>
software.amazon.awssdk.utils.cache.CachedSupplier.StaleValueBehavior
- All Implemented Interfaces:
Serializable
,Comparable<CachedSupplier.StaleValueBehavior>
- Enclosing class:
CachedSupplier<T>
public static enum CachedSupplier.StaleValueBehavior
extends Enum<CachedSupplier.StaleValueBehavior>
How the cached supplier should behave when a stale value is retrieved from the underlying supplier or the underlying
supplier fails while the cached value is stale.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.static CachedSupplier.StaleValueBehavior[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
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
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 Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException
- if the argument is null
-