@Override public void write(List<? extends T> items) throws Exception { for (T item : items) { if (item instanceof ItemIndexAware && useItemIndex) { Long index = ((ItemIndexAware) item).getIndex(); if (index != null) { jumpToItem(index.intValue()); } } if (currentItemCount < maxItemCount) { if (doWrite(item)) { currentItemCount++; } currentItemIndex++; } LOGGER.trace("[currentItemCount={}, currentItemIndex={}]", currentItemCount, currentItemIndex); } LOGGER.debug("Written {} items", items); }