I need to have sortedMap with these fields for each key [srcAddr, dstAddr, srcPort, dstPort, protocol] (this corresponds to the stream)
then this key contains a list of values, each of which contains some fields. such as: packetLenghth, timeArrival for packet 1 packetLength, timeArrival for packet 2,,, etc.
In other words, each packet is checked whether it belongs to the stream or not based on these 5 mentioned fields. then some information will be extracted for this particular package. for the next package, if it belongs to this stream, a new stream will not be added, but information about this package will be added.
I thought about the need to separate myKeys and myValues classes with the required fields. myKeys need to implement compareTo, hashCode equal to.
but I do not know if it is right for them. can anyone help me with it?
source
share