docs: public void update(long value, long timestamp) {
          rescaleIfNeeded();
          lockForRegularUsage();
          try {
              final double itemWeight = weight(timestamp - startTime);
              final WeightedSample sample = new WeightedSample(value, itemWeight);
              final double priority = itemWeight / ThreadLocalRandom.current().nextDouble();
  
              final long newCount = count.incrementAndGet();
              if (newCount <= size) {
                  values.put(priority, sample);
              } else {
                  Double first = values.firstKey();
                  if (first < priority && values.putIfAbsent(priority, sample) == null) {
                      // ensure we always remove an item
                      while (values.remove(first) == null) {
                          first = values.firstKey();
                      }
                  }
              }
          } finally {
              unlockForRegularUsage();
          }
      }