Package kafka.server
Class ReplicationQuotaManager
java.lang.Object
kafka.server.ReplicationQuotaManager
- All Implemented Interfaces:
ReplicaQuota
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReplicationQuotaManager(org.apache.kafka.server.config.ReplicationQuotaManagerConfig config, org.apache.kafka.common.metrics.Metrics metrics, org.apache.kafka.server.quota.QuotaType replicationType, org.apache.kafka.common.utils.Time time) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if the quota is currently exceededbooleanisThrottled(org.apache.kafka.common.TopicPartition topicPartition) Is the passed partition throttled by this ReplicationQuotaManagervoidmarkThrottled(String topic) Mark all replicas for this topic as throttledvoidmarkThrottled(String topic, List<Integer> partitions) Update the set of throttled partitions for this QuotaManager.voidrecord(long value) Add the passed value to the throttled rate.voidremoveThrottle(String topic) voidupdateQuota(org.apache.kafka.common.metrics.Quota quota) Update the quotalong
-
Field Details
-
ALL_REPLICAS
-
-
Constructor Details
-
ReplicationQuotaManager
public ReplicationQuotaManager(org.apache.kafka.server.config.ReplicationQuotaManagerConfig config, org.apache.kafka.common.metrics.Metrics metrics, org.apache.kafka.server.quota.QuotaType replicationType, org.apache.kafka.common.utils.Time time)
-
-
Method Details
-
updateQuota
public void updateQuota(org.apache.kafka.common.metrics.Quota quota) Update the quota -
isQuotaExceeded
public boolean isQuotaExceeded()Check if the quota is currently exceeded- Specified by:
isQuotaExceededin interfaceReplicaQuota
-
isThrottled
public boolean isThrottled(org.apache.kafka.common.TopicPartition topicPartition) Is the passed partition throttled by this ReplicationQuotaManager- Specified by:
isThrottledin interfaceReplicaQuota
-
record
public void record(long value) Add the passed value to the throttled rate. This method ignores the quota with the value being added to the rate even if the quota is exceeded- Specified by:
recordin interfaceReplicaQuota
-
markThrottled
Update the set of throttled partitions for this QuotaManager. The partitions passed, for any single topic, will replace any previous -
markThrottled
Mark all replicas for this topic as throttled -
removeThrottle
-
upperBound
public long upperBound()
-