Package com.google.gerrit.server.quota
Enum QuotaResponse.Status
- java.lang.Object
-
- java.lang.Enum<QuotaResponse.Status>
-
- com.google.gerrit.server.quota.QuotaResponse.Status
-
- All Implemented Interfaces:
Serializable
,Comparable<QuotaResponse.Status>
- Enclosing class:
- QuotaResponse
public static enum QuotaResponse.Status extends Enum<QuotaResponse.Status>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isError()
boolean
isOk()
static QuotaResponse.Status
valueOf(String name)
Returns the enum constant of this type with the specified name.static QuotaResponse.Status[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OK
public static final QuotaResponse.Status OK
The quota requests succeeded.
-
NO_OP
public static final QuotaResponse.Status NO_OP
The quota succeeded, but was a no-op because the plugin does not enforce this quota group (equivalent to OK, but relevant for debugging).
-
ERROR
public static final QuotaResponse.Status ERROR
The requested quota could not be allocated. This status code is not used to indicate processing failures as these are propagated asRuntimeException
s.
-
-
Method Detail
-
values
public static QuotaResponse.Status[] 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 (QuotaResponse.Status c : QuotaResponse.Status.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static QuotaResponse.Status 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
-
isOk
public boolean isOk()
-
isError
public boolean isError()
-
-