@InterfaceAudience.Private @InterfaceStability.Evolving class NoopOperationQuota extends Object implements OperationQuota
OperationQuota.OperationType| Modifier and Type | Field and Description |
|---|---|
private static OperationQuota |
instance |
| Modifier | Constructor and Description |
|---|---|
private |
NoopOperationQuota() |
| Modifier and Type | Method and Description |
|---|---|
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
|
static OperationQuota |
get() |
long |
getReadAvailable() |
long |
getWriteAvailable() |
private static OperationQuota instance
private NoopOperationQuota()
public static OperationQuota get()
public void checkQuota(int numWrites, int numReads, int numScans) throws RpcThrottlingException
OperationQuotacheckQuota in interface 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 performedRpcThrottlingException - if the operation cannot be performed because
RPC quota is exceeded.public void close()
OperationQuotaclose in interface OperationQuotapublic void addGetResult(Result result)
OperationQuotaaddGetResult in interface OperationQuotapublic void addScanResult(List<Result> results)
OperationQuotaaddScanResult in interface OperationQuotapublic void addMutation(Mutation mutation)
OperationQuotaaddMutation in interface OperationQuotapublic long getReadAvailable()
getReadAvailable in interface OperationQuotapublic long getWriteAvailable()
getWriteAvailable in interface OperationQuotaCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.