public static <E> BoundedList<E> newArrayBacked(int maxLength, int initialCapacity) {
        if (initialCapacity <= 0) {
            throw new IllegalArgumentException("Invalid non-positive initialCapacity of " + initialCapacity);
        }
        return new BoundedList<>(maxLength, new ArrayList<>(initialCapacity));
    }
A list which cannot grow beyond a certain length. If the maximum length would be exceeded by an
operation, the operation throws a BoundedListTooLongException exception rather than completing.
For simplicity, mutation through iterators or sublists is not allowed.

@param <E> the element type
server-common/src/main/java/org/apache/kafka/server/mutable/BoundedList.java