3b359cb812408d0112b07b5e653b6c3e567a9a5b
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / reader / NodeTableStatistics.java
1 /*
2  * Copyright (c) 2013 Big Switch Networks, Inc.  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.controller.sal.reader;
9
10 import java.io.Serializable;
11
12 import javax.xml.bind.annotation.XmlAccessType;
13 import javax.xml.bind.annotation.XmlAccessorType;
14 import javax.xml.bind.annotation.XmlElement;
15 import javax.xml.bind.annotation.XmlRootElement;
16
17 import org.opendaylight.controller.sal.core.NodeTable;
18
19 /**
20  * @author Aditya Prakash Vaja <aditya.vaja@bigswitch.com>
21  * Represents the Table statistics for the node
22  *
23  */
24
25 @XmlRootElement
26 @XmlAccessorType(XmlAccessType.NONE)
27 public class NodeTableStatistics implements Serializable {
28     private static final long serialVersionUID = 1L;
29
30     @XmlElement
31     private NodeTable nodeTable;
32     @XmlElement
33     private String name;
34     @XmlElement
35     private int activeCount;
36     @XmlElement
37     private long lookupCount;
38     @XmlElement
39     private long matchedCount;
40
41
42     //To Satisfy JAXB
43     public NodeTableStatistics() {
44
45     }
46
47     /**
48      * @return the node table
49      */
50     public NodeTable getNodeTable() {
51         return nodeTable;
52     }
53
54     /**
55      * @param table of the node
56      */
57     public void setNodeTable(NodeTable table) {
58         this.nodeTable = table;
59     }
60
61     /**
62      * @return name of the table
63      */
64     public String getName() {
65         return name;
66     }
67
68     /**
69      * @param name - set the table name to name
70      */
71     public void setName(String name) {
72         this.name = name;
73     }
74
75     /**
76      * @return the activeCount
77      */
78     public int getActiveCount() {
79         return activeCount;
80     }
81
82     /**
83      * @param activeCount the activeCount to set
84      */
85     public void setActiveCount(int activeCount) {
86         this.activeCount = activeCount;
87     }
88
89     /**
90      * @return the lookupCount
91      */
92     public long getLookupCount() {
93         return lookupCount;
94     }
95
96     /**
97      * @param lookupCount the lookupCount to set
98      */
99     public void setLookupCount(long lookupCount) {
100         this.lookupCount = lookupCount;
101     }
102
103     /**
104      * @return the matchedCount
105      */
106     public long getMatchedCount() {
107         return matchedCount;
108     }
109
110     /**
111      * @param matchedCount the matchedCount to set
112      */
113     public void setMatchedCount(long matchedCount) {
114         this.matchedCount = matchedCount;
115     }
116
117     @Override
118     public String toString() {
119         return "NodeTableStats[tableId = " + nodeTable
120                 + ", activeCount = " + activeCount
121                 + ", lookupCount = " + lookupCount
122                 + ", matchedCount = " + matchedCount + "]";
123     }
124 }