Package org.openstreetmap.josm.io
Enum Class CachedFile.CachingStrategy
- All Implemented Interfaces:
Serializable,Comparable<CachedFile.CachingStrategy>,Constable
- Enclosing class:
- CachedFile
Caching strategy.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSimilar to MaxAge, considers the cache stale when a certain age is exceeded.If cached file on disk is older than a certain time (7 days by default), consider the cache stale and try to download the file again. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CachedFile.CachingStrategyReturns the enum constant of this class with the specified name.static CachedFile.CachingStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MaxAge
If cached file on disk is older than a certain time (7 days by default), consider the cache stale and try to download the file again. -
IfModifiedSince
Similar to MaxAge, considers the cache stale when a certain age is exceeded. In addition, a If-Modified-Since HTTP header is added. When the server replies "304 Not Modified", this is considered the same as a full download.
-
-
Constructor Details
-
CachingStrategy
private CachingStrategy()
-
-
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
-