NB API for packet count statistics. analytics.py demonstrates how to use it.
[affinity.git] / analytics / northbound / src / main / java / org / opendaylight / affinity / analytics / northbound / Statistics.java
1 /*
2  * Copyright (c) 2013 Plexxi, 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
9 package org.opendaylight.affinity.analytics.northbound;
10
11 import javax.xml.bind.annotation.XmlAccessType;
12 import javax.xml.bind.annotation.XmlAccessorType;
13 import javax.xml.bind.annotation.XmlElement;
14 import javax.xml.bind.annotation.XmlRootElement;
15
16 @XmlRootElement
17 @XmlAccessorType(XmlAccessType.NONE)
18 public class Statistics {
19     @XmlElement
20     private long byteCount;
21     @XmlElement
22     private long packetCount;
23     @XmlElement
24     private double duration;
25     @XmlElement
26     private double bitRate;
27
28     // To satisfy JAXB
29     @SuppressWarnings("unused")
30     private Statistics() {
31     }
32
33     public Statistics(long byteCount, long packetCount, double duration, double bitRate) {
34         super();
35         this.byteCount = byteCount;
36         this.packetCount = packetCount;
37         this.duration = duration;
38         this.bitRate = bitRate;
39     }
40
41     public long getByteCount() {
42         return this.byteCount;
43     }
44
45     public void setByteCount(long byteCount) {
46         this.byteCount = byteCount;
47     }
48
49     public long getPacketCount() {
50         return this.packetCount;
51     }
52
53     public void setPacketCount(long packetCount) {
54         this.packetCount = packetCount;
55     }
56
57     public double getDuration() {
58         return this.duration;
59     }
60
61     public void setDuration(double duration) {
62         this.duration = duration;
63     }
64
65     public double getBitRate() {
66         return this.bitRate;
67     }
68
69     public void setBitRate(double bitRate) {
70         this.bitRate = bitRate;
71     }
72 }