public static class
QuotaServer.Builder
extends Object
Builder for QuotaServer
instances.
Public Constructor Summary
QuotaServer.Builder(Class<T> enumClass)
Sets the enum class of the supported operations.
|
Public Method Summary
Builder<T, K> |
addQuota(T operation, double qps)
Sets the
qps quota for a given operation . |
QuotaServer<T> |
build()
Builds an instance of
QuotaServer . |
Builder<T, K> |
setDefaultQps(double defaultQps)
Sets the default qps
qps if such setting is not provided for an operation. |
Inherited Method Summary
Public Constructors
public QuotaServer.Builder (Class<T> enumClass)
Sets the enum class of the supported operations.
Parameters
enumClass |
---|
Public Methods
public Builder<T, K> addQuota (T operation, double qps)
Sets the qps
quota for a given operation
.
Parameters
operation | |
---|---|
qps |
public Builder<T, K> setDefaultQps (double defaultQps)
Sets the default qps qps
if such setting is not provided for an operation.
Parameters
defaultQps |
---|