@InterfaceAudience.Private public static class SpaceQuotaSnapshot.SpaceQuotaStatus extends java.lang.Object
| Constructor and Description |
|---|
SpaceQuotaStatus(SpaceViolationPolicy policy)
Constructs a
SpaceQuotaSnapshot which is in violation of the provided policy. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
SpaceViolationPolicy |
getPolicy()
Returns the violation policy, which may be null.
|
int |
hashCode() |
boolean |
isInViolation() |
static SpaceQuotaSnapshot.SpaceQuotaStatus |
notInViolation()
Returns a singleton referring to a quota which is not in violation.
|
static QuotaProtos.SpaceQuotaStatus |
toProto(SpaceQuotaSnapshot.SpaceQuotaStatus status) |
static SpaceQuotaSnapshot.SpaceQuotaStatus |
toStatus(QuotaProtos.SpaceQuotaStatus proto) |
java.lang.String |
toString() |
public SpaceQuotaStatus(SpaceViolationPolicy policy)
SpaceQuotaSnapshot which is in violation of the provided policy.
Use notInViolation() to obtain an instance of this class for the cases when the
quota is not in violation.policy - The non-null policy being violated.public SpaceViolationPolicy getPolicy()
isInViolation() is true, but may be null otherwise.public boolean isInViolation()
true if the quota is being violated, false otherwise.public static SpaceQuotaSnapshot.SpaceQuotaStatus notInViolation()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic static QuotaProtos.SpaceQuotaStatus toProto(SpaceQuotaSnapshot.SpaceQuotaStatus status)
public static SpaceQuotaSnapshot.SpaceQuotaStatus toStatus(QuotaProtos.SpaceQuotaStatus proto)