Package com.google.gerrit.server.cache
Enum CacheBackend
- java.lang.Object
-
- java.lang.Enum<CacheBackend>
-
- com.google.gerrit.server.cache.CacheBackend
-
- All Implemented Interfaces:
Serializable
,Comparable<CacheBackend>
public enum CacheBackend extends Enum<CacheBackend>
Caffeine is used as default cache backend, but can be overridden with Guava backend.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isLegacyBackend()
static CacheBackend
valueOf(String name)
Returns the enum constant of this type with the specified name.static CacheBackend[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CAFFEINE
public static final CacheBackend CAFFEINE
-
GUAVA
public static final CacheBackend GUAVA
-
-
Method Detail
-
values
public static CacheBackend[] 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 (CacheBackend c : CacheBackend.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CacheBackend valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isLegacyBackend
public boolean isLegacyBackend()
-
-