blob: b609f2b4a2bdc78bcbd78f5452e0f6e2a76c38bb [file] [log] [blame]
alshabiba43aa252014-10-21 21:36:41 -07001package org.onlab.onos.net.statistic;
2
3/**
4 * Simple data repository for link load information.
5 */
6public interface Load {
7
8 /**
alshabib3d643ec2014-10-22 18:33:00 -07009 * Obtain the current observed rate (in bytes/s) on a link.
alshabiba43aa252014-10-21 21:36:41 -070010 * @return long value
11 */
12 long rate();
13
14 /**
alshabib3d643ec2014-10-22 18:33:00 -070015 * Obtain the latest bytes counter viewed on that link.
alshabiba43aa252014-10-21 21:36:41 -070016 * @return long value
17 */
18 long latest();
19
alshabib3d643ec2014-10-22 18:33:00 -070020 /**
21 * Indicates whether this load was built on valid values.
22 * @return boolean
23 */
24 boolean isValid();
25
26 /**
27 * Returns when this value was seen.
28 * @return epoch time
29 */
30 long time();
31
alshabiba43aa252014-10-21 21:36:41 -070032}