public long timeUntilDrain(long currentTimeMs) {
        if (drainStatus == DrainStatus.FINISHED) {
            return 0;
        } else {
            return lingerTimer.remainingMs(currentTimeMs);
        }
    }
Check the time remaining until the next needed drain. If the accumulator
is empty, then {@link Long#MAX_VALUE} will be returned.

@param currentTimeMs current time in milliseconds
@return the delay in milliseconds before the next expected drain
raft/src/main/java/org/apache/kafka/raft/internals/BatchAccumulator.java