1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
| package chat.server.moquette;
|
| public class Metrics {
|
| private long readBytes;
| private long wroteBytes;
|
| public void incrementRead(long numBytes) {
| readBytes += numBytes;
| }
|
| public void incrementWrote(long numBytes) {
| wroteBytes += numBytes;
| }
|
| public long readLength() {
| return readBytes;
| }
|
| public long wroteLength() {
| return wroteBytes;
| }
|
| @Override
| public String toString() {
| return "Read bytes=" + readBytes + ", written bytes=" + wroteBytes;
| }
|
| }
|
|