+ private static void decrementBatchFailuresCounters(final List<BatchFailure> batchFailures,
+ final Map<Range<Integer>, Batch> batchMap,
+ final SyncCrudCounters counters) {
+ for (BatchFailure batchFailure : batchFailures) {
+ for (Map.Entry<Range<Integer>, Batch> rangeBatchEntry : batchMap.entrySet()) {
+ if (rangeBatchEntry.getKey().contains(batchFailure.getBatchOrder())) {
+ // get type and decrease
+ final BatchChoice batchChoice = rangeBatchEntry.getValue().getBatchChoice();
+ decrementCounters(batchChoice, counters);
+ break;
+ }
+ }
+ }
+ }
+