code: private long cleanupTime(W window) {
  		if (windowAssigner.isEventTime()) {
  			long cleanupTime = Math.max(0, window.maxTimestamp() + allowedLateness);
  			return cleanupTime >= window.maxTimestamp() ? cleanupTime : Long.MAX_VALUE;
  		} else {
  			return Math.max(0, window.maxTimestamp());
  		}
  	}
docs: Returns the cleanup time for a window, which is
  {@code window.maxTimestamp + allowedLateness}. In
  case this leads to a value greated than {@link Long#MAX_VALUE}
  then a cleanup time of {@link Long#MAX_VALUE} is
  returned.
  
  @param window the window whose cleanup time we are computing.