public enum CacheStrategy extends java.lang.Enum<CacheStrategy>
Enum Constant and Description |
---|
CACHEONLY
Never go online, use all content from cache.
|
IFEXIST
Use the cache if the cache exists.
|
IFFRESH
Use the cache if the cache exists and is fresh using the
proxy-fresh rules.
|
NIFTY
create a snippet that does not necessarily contain the searched word,
but has a pretty description of the content instead
|
NOCACHE
Never use the cache, all content from fresh internet source.
|
Modifier and Type | Field and Description |
---|---|
int |
code
the fifth case may be that the CacheStrategy object is assigned NULL.
|
Modifier and Type | Method and Description |
---|---|
static CacheStrategy |
decode(int code) |
boolean |
isAllowedToFetchOnline() |
boolean |
mustBeOffline() |
static CacheStrategy |
parse(java.lang.String name) |
java.lang.String |
toName() |
java.lang.String |
toString() |
static CacheStrategy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CacheStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CacheStrategy NOCACHE
public static final CacheStrategy IFFRESH
public static final CacheStrategy IFEXIST
public static final CacheStrategy CACHEONLY
public static final CacheStrategy NIFTY
public int code
public static CacheStrategy[] values()
for (CacheStrategy c : CacheStrategy.values()) System.out.println(c);
public static CacheStrategy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<CacheStrategy>
public static CacheStrategy decode(int code)
public static CacheStrategy parse(java.lang.String name)
public java.lang.String toName()
public boolean isAllowedToFetchOnline()
public boolean mustBeOffline()