@InterfaceAudience.Private public static class SpaceQuotaSnapshot.SpaceQuotaStatus extends Object implements SpaceQuotaSnapshotView.SpaceQuotaStatusView
| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
inViolation |
private static SpaceQuotaSnapshot.SpaceQuotaStatus |
NOT_IN_VIOLATION |
(package private) Optional<SpaceViolationPolicy> |
policy |
| Modifier | Constructor and Description |
|---|---|
|
SpaceQuotaStatus(SpaceViolationPolicy policy)
Constructs a
SpaceQuotaSnapshot which is in violation of the provided policy. |
private |
SpaceQuotaStatus(SpaceViolationPolicy policy,
boolean inViolation) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Optional<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 org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuotaStatus |
toProto(SpaceQuotaSnapshot.SpaceQuotaStatus status) |
static SpaceQuotaSnapshot.SpaceQuotaStatus |
toStatus(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuotaStatus proto) |
String |
toString() |
private static final SpaceQuotaSnapshot.SpaceQuotaStatus NOT_IN_VIOLATION
final Optional<SpaceViolationPolicy> policy
final boolean inViolation
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.private SpaceQuotaStatus(SpaceViolationPolicy policy, boolean inViolation)
public Optional<SpaceViolationPolicy> getPolicy()
isInViolation() is true, but may be null otherwise.getPolicy in interface SpaceQuotaSnapshotView.SpaceQuotaStatusViewpublic boolean isInViolation()
isInViolation in interface SpaceQuotaSnapshotView.SpaceQuotaStatusViewtrue if the quota is being violated, false otherwise.public static SpaceQuotaSnapshot.SpaceQuotaStatus notInViolation()
public static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuotaStatus toProto(SpaceQuotaSnapshot.SpaceQuotaStatus status)
public static SpaceQuotaSnapshot.SpaceQuotaStatus toStatus(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuotaStatus proto)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.