public void advanceTail(long to) {
    monitor.enter();
    try {
      if (to < tail.get()) {
        throw new IllegalStateException("Tried to move sliding window tail backwards from " + tail + " to " + to);
      }
      tail.set(to);
    } finally {
      monitor.leave();
    }
  }
Moves the current value for the tail to {@code to}, unblocking any thread waiting on moving the head to
{@code to + windowSize}.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/SlidingWindow.java