class FixedIntervalRefillStrategy implements RefillStrategy {

    @Override
    public long refill() {
        synchronized (mutex) {
            long elapsed = stopwatch.elapsed(TimeUnit.NANOSECONDS);
            if (elapsed < nextRefillTime) {
                return 0;
            }
            long numberOfIntervals = Math.max(0, (elapsed - lastRefillTime) / intervalInNanos);
            lastRefillTime += numberOfIntervals * intervalInNanos;
            nextRefillTime = lastRefillTime + intervalInNanos;

            return numberOfIntervals * numberOfTokensPerInterval;
        }
    }

    public  FixedIntervalRefillStrategy(Stopwatch stopwatch, long numberOfTokensPerInterval, long interval, TimeUnit unit);

}