2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.openflowplugin.impl.services.batch;
11 import java.util.ArrayList;
12 import java.util.List;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.service.batch.common.rev160322.BatchOrderGrouping;
16 * Container of CRUD actions for one type of object (flow, group, meter, ..) of same type (add, remove, update)
18 public class BatchPlanStep {
19 private final List<? extends BatchOrderGrouping> taskBag;
20 private final BatchStepType stepType;
21 private boolean barrierAfter = false;
23 public BatchPlanStep(final BatchStepType stepType) {
24 this.stepType = stepType;
25 taskBag = new ArrayList<>();
28 public <T extends BatchOrderGrouping> List<T> getTaskBag() {
29 return (List<T>) taskBag;
32 public BatchStepType getStepType() {
36 public boolean isEmpty() {
37 return taskBag.isEmpty();
40 public void setBarrierAfter(final boolean barrier) {
41 this.barrierAfter = barrier;
44 public boolean isBarrierAfter() {