private static class ControlRate.Throttle extends ReentrantLock
| Modifier and Type | Field and Description |
|---|---|
private LongSupplier |
currentTimeSupplier |
private long |
lastUpdateTime |
private ComponentLog |
logger |
private AtomicLong |
maxRate |
private long |
penalizationExpired |
private long |
penalizationPeriod |
private TimedBuffer<TimestampedLong> |
timedBuffer |
private long |
timePeriodMillis |
| Modifier | Constructor and Description |
|---|---|
private |
Throttle(int timePeriod,
TimeUnit unit,
ComponentLog logger,
LongSupplier currentTimeSupplier) |
| 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, unlockprivate final AtomicLong maxRate
private final long timePeriodMillis
private final TimedBuffer<TimestampedLong> timedBuffer
private final ComponentLog logger
private final LongSupplier currentTimeSupplier
private volatile long penalizationPeriod
private volatile long penalizationExpired
private volatile long lastUpdateTime
private Throttle(int timePeriod,
TimeUnit unit,
ComponentLog logger,
LongSupplier currentTimeSupplier)
Copyright © 2023 Apache NiFi Project. All rights reserved.