private static class ControlRate.Throttle extends ReentrantLock
Modifier and Type | Field and Description |
---|---|
private long |
lastUpdateTime |
private ComponentLog |
logger |
private AtomicLong |
maxRate |
private long |
penalizationExpired |
private long |
penalizationPeriod |
private TimedBuffer<TimestampedLong> |
timedBuffer |
private long |
timePeriodMillis |
Constructor and Description |
---|
Throttle(int timePeriod,
TimeUnit unit,
ComponentLog logger) |
Modifier and Type | Method and Description |
---|---|
long |
lastUpdateTime() |
void |
setMaxRate(long maxRate) |
boolean |
tryAdd(long value) |
getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLock, unlock
private final AtomicLong maxRate
private final long timePeriodMillis
private final TimedBuffer<TimestampedLong> timedBuffer
private final ComponentLog logger
private volatile long penalizationPeriod
private volatile long penalizationExpired
private volatile long lastUpdateTime
public Throttle(int timePeriod, TimeUnit unit, ComponentLog logger)
Copyright © 2020 Apache NiFi Project. All rights reserved.