Class UpfCounter
- java.lang.Object
-
- org.onosproject.net.behaviour.upf.UpfCounter
-
- All Implemented Interfaces:
UpfEntity
@Beta public final class UpfCounter extends Object implements UpfEntity
A structure for compactly passing UPF counter values for a given counter ID. Contains four counts: Ingress Packets, Ingress Bytes, Egress Packets, Egress Bytes. UpfCounter can be used ONLY onapplyandreadAllcalls in theUpfDeviceinterface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUpfCounter.Builder
-
Field Summary
-
Fields inherited from interface org.onosproject.net.behaviour.upf.UpfEntity
DEFAULT_APP_ID, DEFAULT_APP_INDEX, DEFAULT_SESSION_INDEX
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UpfCounter.Builderbuilder()booleanequals(Object object)booleanexactlyEquals(UpfCounter that)Returns whether this UpfCounter is exactly equal to the given UpfCounter, including their packets and bytes values.intgetCellId()Get the cell ID (index) of the dataplane counter that produced this set of stats.longgetEgressBytes()Get the number of packet bytes that hit this counter in the dataplane egress pipeline.longgetEgressPkts()Get the number of packets that hit this counter in the dataplane egress pipeline.longgetIngressBytes()Get the number of packet bytes that hit this counter in the dataplane ingress pipeline.longgetIngressPkts()Get the number of packets that hit this counter in the dataplane ingress pipeline.inthashCode()StringtoString()UpfEntityTypetype()Returns the type of this entity.
-
-
-
Method Detail
-
builder
public static UpfCounter.Builder builder()
-
exactlyEquals
public boolean exactlyEquals(UpfCounter that)
Returns whether this UpfCounter is exactly equal to the given UpfCounter, including their packets and bytes values.- Parameters:
that- otherUpfCounterinstance to compare- Returns:
- true if exactly equals, false otherwise
-
getCellId
public int getCellId()
Get the cell ID (index) of the dataplane counter that produced this set of stats.- Returns:
- counter cell ID
-
getIngressPkts
public long getIngressPkts()
Get the number of packets that hit this counter in the dataplane ingress pipeline.- Returns:
- ingress packet count
-
getEgressPkts
public long getEgressPkts()
Get the number of packets that hit this counter in the dataplane egress pipeline.- Returns:
- egress packet count
-
getIngressBytes
public long getIngressBytes()
Get the number of packet bytes that hit this counter in the dataplane ingress pipeline.- Returns:
- ingress byte count
-
getEgressBytes
public long getEgressBytes()
Get the number of packet bytes that hit this counter in the dataplane egress pipeline.- Returns:
- egress byte count
-
type
public UpfEntityType type()
Description copied from interface:UpfEntityReturns the type of this entity.
-
-