// create batches that are separated by operation type
final Map<SingleOperationType, List<SingleOperation>> separatedItemsPerType =
new TreeMap<SingleOperationType, List<SingleOperation>>();
for (int i = 0; i < batchSize; i++) {
final SingleOperation item = quarantined.get(i);
if (LOGGER.isLoggable(Level.CONFIG)) {
LOGGER.config(getThreadName() + " : processItems() : adding " + item + " to next batch");
}
List<SingleOperation> itemsPerType = separatedItemsPerType.get(item.getType());
if (null == itemsPerType) {
itemsPerType = new ArrayList<SingleOperation>();
separatedItemsPerType.put(item.getType(), itemsPerType);
}
itemsPerType.add(item);
}