Enum CacheAwareResponse.CacheStatus
java.lang.Object
java.lang.Enum<CacheAwareResponse.CacheStatus>
com.github.mizosoft.methanol.CacheAwareResponse.CacheStatus
- All Implemented Interfaces:
Serializable, Comparable<CacheAwareResponse.CacheStatus>, java.lang.constant.Constable
- Enclosing interface:
CacheAwareResponse<T>
The status of an attempt to retrieve an HTTP response from cache.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe response was constructed from cache but a conditionalGEThad to be made to validate it with the server.The response was entirely constructed from cache and no network was used.Either the cache lacked a matching response or the matching response was stale but failed validation with the server and thus had to be re-downloaded.The response was generated by the cache to serve an unsatisfiable request that prohibited network use despite being necessary to serve a valid response. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.static CacheAwareResponse.CacheStatus[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
MISS
Either the cache lacked a matching response or the matching response was stale but failed validation with the server and thus had to be re-downloaded. -
HIT
The response was entirely constructed from cache and no network was used. -
CONDITIONAL_HIT
The response was constructed from cache but a conditionalGEThad to be made to validate it with the server. -
UNSATISFIABLE
The response was generated by the cache to serve an unsatisfiable request that prohibited network use despite being necessary to serve a valid response. The resulted response code is normallyGateway Timeout.
-
-
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
-