Package org.apache.hadoop.hbase.quotas
Class ActivePolicyEnforcement
java.lang.Object
org.apache.hadoop.hbase.quotas.ActivePolicyEnforcement
A class to ease dealing with tables that have and do not have violation policies being enforced.
 This class is immutable, expect for 
locallyCachedPolicies. The
 locallyCachedPolicies are mutable given the current activePolicies and
 snapshots. It is expected that when a new instance of this class is instantiated, we also
 want to invalidate those previously cached policies (as they may now be invalidate if we received
 new quota usage information).- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final Map<TableName,SpaceViolationPolicyEnforcement> private final SpaceViolationPolicyEnforcementFactoryprivate final Map<TableName,SpaceViolationPolicyEnforcement> private final RegionServerServicesprivate final Map<TableName,SpaceQuotaSnapshot> 
- 
Constructor SummaryConstructorsConstructorDescriptionActivePolicyEnforcement(Map<TableName, SpaceViolationPolicyEnforcement> activePolicies, Map<TableName, SpaceQuotaSnapshot> snapshots, RegionServerServices rss) ActivePolicyEnforcement(Map<TableName, SpaceViolationPolicyEnforcement> activePolicies, Map<TableName, SpaceQuotaSnapshot> snapshots, RegionServerServices rss, SpaceViolationPolicyEnforcementFactory factory) 
- 
Method SummaryModifier and TypeMethodDescription(package private) Map<TableName,SpaceViolationPolicyEnforcement> Returns an unmodifiable version of the policy enforcements that were cached because they are not in violation of their quota.Returns an unmodifiable version of the activeSpaceViolationPolicyEnforcements.Returns the properSpaceViolationPolicyEnforcementimplementation for the given table.getPolicyEnforcement(TableName tableName) Returns the properSpaceViolationPolicyEnforcementimplementation for the given table.toString()
- 
Field Details- 
activePolicies
- 
snapshots
- 
rss
- 
factory
- 
locallyCachedPolicies
 
- 
- 
Constructor Details- 
ActivePolicyEnforcementpublic ActivePolicyEnforcement(Map<TableName, SpaceViolationPolicyEnforcement> activePolicies, Map<TableName, SpaceQuotaSnapshot> snapshots, RegionServerServices rss) 
- 
ActivePolicyEnforcementpublic ActivePolicyEnforcement(Map<TableName, SpaceViolationPolicyEnforcement> activePolicies, Map<TableName, SpaceQuotaSnapshot> snapshots, RegionServerServices rss, SpaceViolationPolicyEnforcementFactory factory) 
 
- 
- 
Method Details- 
getPolicyEnforcementReturns the properSpaceViolationPolicyEnforcementimplementation for the given table. If the given table does not have a violation policy enforced, a "no-op" policy will be returned which always allows an action.- See Also:
 
- 
getPolicyEnforcementReturns the properSpaceViolationPolicyEnforcementimplementation for the given table. If the given table does not have a violation policy enforced, a "no-op" policy will be returned which always allows an action.- Parameters:
- tableName- The table to fetch the policy for.
- Returns:
- A non-null SpaceViolationPolicyEnforcementinstance.
 
- 
getPoliciesReturns an unmodifiable version of the activeSpaceViolationPolicyEnforcements.
- 
getLocallyCachedPoliciesReturns an unmodifiable version of the policy enforcements that were cached because they are not in violation of their quota.
- 
toString
 
-