/** * Collect {@code <T>} into a buffer, and invoke the given callback whenever * the buffer is full, during an explicit commit, or on close. */ public static <T> BatchingCallback<T> batchInto(int size, Callback<? super List<T>> out) { return new BatchingCallback<T>(size, out); }