class SlidingWindowHistogram {

    public synchronized void recordValue(long msValue) {
        checkArgument(msValue >= 0, "Recorded value must be a positive number.");

        long currentTime = clock.tickMillis();
        purgeOldHistograms(currentTime);

        int bucket = bucketFromTime(currentTime);
        window[bucket].recordValue(msValue);

        lastUpdateTime = currentTime;
    }

    private  SlidingWindowHistogram(Builder builder);

}