Bug 6745 Improve compression queue locking and handle InterruptedException
[openflowplugin.git] / applications / forwardingrules-sync / src / main / java / org / opendaylight / openflowplugin / applications / frsync / util / CrudCounts.java
1 /**
2  * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
3  *
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
7  */
8 package org.opendaylight.openflowplugin.applications.frsync.util;
9
10 /**
11  * General placeholder for add/update/remove counts.
12  */
13 public class CrudCounts {
14     private int added;
15     private int updated;
16     private int removed;
17
18     public int getAdded() {
19         return added;
20     }
21
22     public void setAdded(final int added) {
23         this.added = added;
24     }
25
26     public int getUpdated() {
27         return updated;
28     }
29
30     public void setUpdated(final int updated) {
31         this.updated = updated;
32     }
33
34     public int getRemoved() {
35         return removed;
36     }
37
38     public void setRemoved(final int removed) {
39         this.removed = removed;
40     }
41
42     public void incAdded() {
43         added++;
44     }
45
46     public void incUpdated() {
47         updated++;
48     }
49
50     public void incRemoved() {
51         removed++;
52     }
53
54     public void decAdded() {
55         added--;
56     }
57
58     public void decUpdated() {
59         updated--;
60     }
61
62     public void decRemoved() {
63         removed--;
64     }
65 }