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
8 package org.opendaylight.openflowplugin.applications.frsync.util;
11 * One-shot (per sync) placeholder for counts of added/updated/removed flows/groups/meters.
13 public class SyncCrudCounters {
15 private final CrudCounts flowCrudCounts;
16 private final CrudCounts groupCrudCounts;
17 private final CrudCounts meterCrudCounts;
19 public SyncCrudCounters() {
20 flowCrudCounts = new CrudCounts();
21 groupCrudCounts = new CrudCounts();
22 meterCrudCounts = new CrudCounts();
25 public CrudCounts getFlowCrudCounts() {
26 return flowCrudCounts;
29 public CrudCounts getGroupCrudCounts() {
30 return groupCrudCounts;
33 public CrudCounts getMeterCrudCounts() {
34 return meterCrudCounts;
37 public void resetAll() {
38 getGroupCrudCounts().setUpdated(0);
39 getGroupCrudCounts().setAdded(0);
40 getGroupCrudCounts().setRemoved(0);
42 getFlowCrudCounts().setUpdated(0);
43 getFlowCrudCounts().setAdded(0);
44 getFlowCrudCounts().setRemoved(0);
46 getMeterCrudCounts().setUpdated(0);
47 getMeterCrudCounts().setAdded(0);
48 getMeterCrudCounts().setRemoved(0);