Enum Class NetworkOptions.CacheStrategy
java.lang.Object
java.lang.Enum<NetworkOptions.CacheStrategy>
es.situm.sdk.configuration.network.NetworkOptions.CacheStrategy
- All Implemented Interfaces:
Serializable,Comparable<NetworkOptions.CacheStrategy>,Constable
- Enclosing interface:
- NetworkOptions
Supported SDK Cache Strategies.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionForce to use cache even if it's too old.Force download from server, the cache won't be used.Force download from server.Always return cached data immediately. -
Method Summary
Modifier and TypeMethodDescriptionstatic NetworkOptions.CacheStrategyReturns the enum constant of this class with the specified name.static NetworkOptions.CacheStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
TIMED_CACHE
Always return cached data immediately. If the cache has expired, a network request is triggered to refresh the data. This is the default option. -
CACHE_FIRST
Force to use cache even if it's too old. If there is not cache available it will try to download from server. -
IGNORE_CACHE
Force download from server, the cache won't be used. Recommended only for development. -
SERVER_FIRST
Force download from server. If the server is not responding or there is no internet connection it will use the cache. Recommended only for development.
-
-
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
-