public SpaceViolationPolicyEnforcement create(RegionServerServices rss, TableName tableName,
    SpaceQuotaSnapshot snapshot) {
    SpaceViolationPolicyEnforcement enforcement;
    SpaceQuotaStatus status = snapshot.getQuotaStatus();
    if (!status.isInViolation()) {
      throw new IllegalArgumentException(tableName + " is not in violation. Snapshot=" + snapshot);
    }
    switch (status.getPolicy().get()) {
      case DISABLE:
        enforcement = new DisableTableViolationPolicyEnforcement();
        break;
      case NO_WRITES_COMPACTIONS:
        enforcement = new NoWritesCompactionsViolationPolicyEnforcement();
        break;
      case NO_WRITES:
        enforcement = new NoWritesViolationPolicyEnforcement();
        break;
      case NO_INSERTS:
        enforcement = new NoInsertsViolationPolicyEnforcement();
        break;
      default:
        throw new IllegalArgumentException("Unhandled SpaceViolationPolicy: " + status.getPolicy());
    }
    enforcement.initialize(rss, tableName, snapshot);
    return enforcement;
  }
Constructs the appropriate {@link SpaceViolationPolicyEnforcement} for tables that are in
violation of their space quota.
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/SpaceViolationPolicyEnforcementFactory.java