- java.lang.Object
-
- java.lang.Enum<CacheAwareResponse.CacheStatus>
-
- com.github.mizosoft.methanol.CacheAwareResponse.CacheStatus
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<CacheAwareResponse.CacheStatus>
- Enclosing interface:
- CacheAwareResponse<T>
public static enum CacheAwareResponse.CacheStatus extends java.lang.Enum<CacheAwareResponse.CacheStatus>
The status of an attempt to retrieve an HTTP response from cache.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONDITIONAL_HITThe response was constructed from cache but a conditionalGEThad to be made to validate it with the server.HITThe response was entirely constructed from cache and no network was used.MISSEither 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.UNSATISFIABLEThe 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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CacheAwareResponse.CacheStatusvalueOf(java.lang.String name)Returns 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 Detail
-
MISS
public static final CacheAwareResponse.CacheStatus 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
public static final CacheAwareResponse.CacheStatus HIT
The response was entirely constructed from cache and no network was used.
-
CONDITIONAL_HIT
public static final CacheAwareResponse.CacheStatus CONDITIONAL_HIT
The response was constructed from cache but a conditionalGEThad to be made to validate it with the server.
-
UNSATISFIABLE
public static final CacheAwareResponse.CacheStatus 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 Detail
-
values
public static CacheAwareResponse.CacheStatus[] 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 (CacheAwareResponse.CacheStatus c : CacheAwareResponse.CacheStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CacheAwareResponse.CacheStatus 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 namejava.lang.NullPointerException- if the argument is null
-
-