public void refill(long timeNanos) {
        long refillIntervalNanos = context.refillIntervalNanos;
        if (refillIntervalNanos <= 0) {
            return;
        }
        int periods = MathUtil.toInt((timeNanos - lastRefillTimeNanos) / refillIntervalNanos);
        if (periods <= 0) {
            return;
        }
        int tokenCount = tokens;
        int capacity = context.capacity;
        int newTokenCount = MathUtil.add(tokenCount,
                MathUtil.multiply(periods, context.tokensPerPeriod, capacity),
                capacity);
        if (newTokenCount > capacity) {
            newTokenCount = capacity;
        }
        if (TOKENS_UPDATER.compareAndSet(this, tokenCount, newTokenCount)) {
            lastRefillTimeNanos = timeNanos;
        } else {
            refill(timeNanos);
        }
    }
@implNote We don't validate properties here, and it should be validated when the properties
          are updated
turms-server-common/src/main/java/im/turms/server/common/infra/throttle/TokenBucket.java