Package org.apache.hadoop.hbase.quotas
Class SpaceQuotaSnapshot.SpaceQuotaStatus
java.lang.Object
org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot.SpaceQuotaStatus
- All Implemented Interfaces:
SpaceQuotaSnapshotView.SpaceQuotaStatusView
- Enclosing class:
- SpaceQuotaSnapshot
@Private
public static class SpaceQuotaSnapshot.SpaceQuotaStatus
extends Object
implements SpaceQuotaSnapshotView.SpaceQuotaStatusView
Encapsulates the state of a quota on a table. The quota may or may not be in violation. If the
quota is not in violation, the violation may be null. If the quota is in violation, there is
guaranteed to be a non-null violation policy.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final booleanprivate static final SpaceQuotaSnapshot.SpaceQuotaStatus(package private) final Optional<SpaceViolationPolicy> -
Constructor Summary
ConstructorsModifierConstructorDescriptionSpaceQuotaStatus(SpaceViolationPolicy policy) Constructs aSpaceQuotaSnapshotwhich is in violation of the providedpolicy.privateSpaceQuotaStatus(SpaceViolationPolicy policy, boolean inViolation) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the violation policy, which may be null.inthashCode()booleanReturnstrueif the quota is being violated,falseotherwise.Returns a singleton referring to a quota which is not in violation.static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuotaStatustoStatus(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuotaStatus proto) toString()
-
Field Details
-
NOT_IN_VIOLATION
-
policy
-
inViolation
-
-
Constructor Details
-
SpaceQuotaStatus
Constructs aSpaceQuotaSnapshotwhich is in violation of the providedpolicy. UsenotInViolation()to obtain an instance of this class for the cases when the quota is not in violation.- Parameters:
policy- The non-null policy being violated.
-
SpaceQuotaStatus
-
-
Method Details
-
getPolicy
Returns the violation policy, which may be null. It is guaranteed to be non-null ifisInViolation()istrue, but may be null otherwise.- Specified by:
getPolicyin interfaceSpaceQuotaSnapshotView.SpaceQuotaStatusView
-
isInViolation
Returnstrueif the quota is being violated,falseotherwise.- Specified by:
isInViolationin interfaceSpaceQuotaSnapshotView.SpaceQuotaStatusView
-
notInViolation
Returns a singleton referring to a quota which is not in violation. -
hashCode
-
equals
-
toString
-
toProto
public static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuotaStatus toProto(SpaceQuotaSnapshot.SpaceQuotaStatus status) -
toStatus
public static SpaceQuotaSnapshot.SpaceQuotaStatus toStatus(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuotaStatus proto)
-