public interface QuotaSnapshotStore<T>
Modifier and Type | Interface and Description |
---|---|
static class |
QuotaSnapshotStore.ViolationState
The current state of a table with respect to the policy set forth by a quota.
|
Modifier and Type | Field and Description |
---|---|
static SpaceQuotaSnapshot |
NO_QUOTA
Singleton to represent a table without a quota defined.
|
Modifier and Type | Method and Description |
---|---|
Iterable<Map.Entry<HRegionInfo,Long>> |
filterBySubject(T subject)
Filters the provided
regions , returning those which match the given
subject . |
SpaceQuotaSnapshot |
getCurrentState(T subject)
Returns the current
QuotaSnapshotStore.ViolationState for the given subject . |
QuotaProtos.SpaceQuota |
getSpaceQuota(T subject)
Fetch the Quota for the given table.
|
SpaceQuotaSnapshot |
getTargetState(T subject,
QuotaProtos.SpaceQuota spaceQuota)
Computes the target
QuotaSnapshotStore.ViolationState for the given subject . |
void |
setCurrentState(T subject,
SpaceQuotaSnapshot state)
Sets the current
QuotaSnapshotStore.ViolationState for the subject . |
static final SpaceQuotaSnapshot NO_QUOTA
QuotaProtos.SpaceQuota getSpaceQuota(T subject) throws IOException
IOException
SpaceQuotaSnapshot getCurrentState(T subject)
QuotaSnapshotStore.ViolationState
for the given subject
.SpaceQuotaSnapshot getTargetState(T subject, QuotaProtos.SpaceQuota spaceQuota)
QuotaSnapshotStore.ViolationState
for the given subject
.Iterable<Map.Entry<HRegionInfo,Long>> filterBySubject(T subject)
regions
, returning those which match the given
subject
.subject
- The filter criteria.void setCurrentState(T subject, SpaceQuotaSnapshot state)
QuotaSnapshotStore.ViolationState
for the subject
.