java.lang.Object
java.lang.Enum<CacheAwareResponse.CacheStatus>
com.github.mizosoft.methanol.CacheAwareResponse.CacheStatus
- All Implemented Interfaces:
Serializable
,Comparable<CacheAwareResponse.CacheStatus>
,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 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe response was constructed from cache but a conditionalGET
had 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 class with the specified name.static CacheAwareResponse.CacheStatus[]
values()
Returns an array containing the constants of this enum class, 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 conditionalGET
had 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 class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-