@InterfaceAudience.Private @InterfaceStability.Evolving public class DefaultOperationQuota extends Object implements OperationQuota
OperationQuota.OperationType| 构造器和说明 |
|---|
DefaultOperationQuota(List<QuotaLimiter> limiters)
NOTE: The order matters.
|
DefaultOperationQuota(QuotaLimiter... limiters) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addGetResult(Result result)
Add a get result.
|
void |
addMutation(Mutation mutation)
Add a mutation result.
|
void |
addScanResult(List<Result> results)
Add a scan result.
|
void |
checkQuota(int numWrites,
int numReads,
int numScans)
Checks if it is possible to execute the specified operation.
|
void |
close()
Cleanup method on operation completion
|
long |
getReadAvailable() |
long |
getWriteAvailable() |
public DefaultOperationQuota(QuotaLimiter... limiters)
public DefaultOperationQuota(List<QuotaLimiter> limiters)
public void checkQuota(int numWrites,
int numReads,
int numScans)
throws ThrottlingException
OperationQuotacheckQuota 在接口中 OperationQuotanumWrites - number of write operation that will be performednumReads - number of small-read operation that will be performednumScans - number of long-read operation that will be performedThrottlingException - if the operation cannot be performedpublic void close()
OperationQuotaclose 在接口中 OperationQuotapublic long getReadAvailable()
getReadAvailable 在接口中 OperationQuotapublic long getWriteAvailable()
getWriteAvailable 在接口中 OperationQuotapublic void addGetResult(Result result)
OperationQuotaaddGetResult 在接口中 OperationQuotapublic void addScanResult(List<Result> results)
OperationQuotaaddScanResult 在接口中 OperationQuotapublic void addMutation(Mutation mutation)
OperationQuotaaddMutation 在接口中 OperationQuotaCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.