Class UpfMeter
- java.lang.Object
-
- org.onosproject.net.behaviour.upf.UpfMeter
-
- All Implemented Interfaces:
UpfEntity
@Beta public final class UpfMeter extends Object implements UpfEntity
A structure representing a UPF meter, either for metering session (UE), application traffic, or slice traffic. UPF meters represent PFCP QER MBR and GBR information and slice maximum rate. UPF meters of type session and slice support only the peak band. UPF meters of type application support both peak and committed bands.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UpfMeter.Builder
Builder of UpfMeter object.
-
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 UpfMeter.Builder
builder()
int
cellId()
Get the meter cell index of this meter.Optional<Band>
committedBand()
Get the committed band of this meter.boolean
equals(Object object)
int
hashCode()
boolean
isApplication()
Check if this UPF meter is for application traffic.boolean
isReset()
Check if this UPF meter is a reset.boolean
isSession()
Check if this UPF meter is for sessions (UE) traffic.Optional<Band>
peakBand()
Get the peak band of this meter.static UpfMeter
resetApplication(int cellId)
Return an application UPF meter with no bands.static UpfMeter
resetSession(int cellId)
Return a session UPF meter with no bands.static UpfMeter
resetSlice(int cellId)
Return a slice meter with no bands.String
toString()
UpfEntityType
type()
Returns the type of this entity.
-
-
-
Method Detail
-
type
public UpfEntityType type()
Description copied from interface:UpfEntity
Returns the type of this entity.
-
cellId
public int cellId()
Get the meter cell index of this meter.- Returns:
- the cell index
-
committedBand
public Optional<Band> committedBand()
Get the committed band of this meter.- Returns:
- the committed band, Empty if none
-
peakBand
public Optional<Band> peakBand()
Get the peak band of this meter.- Returns:
- the peak band, Empty if none
-
isSession
public boolean isSession()
Check if this UPF meter is for sessions (UE) traffic.- Returns:
- true if the meter is for session traffic
-
isApplication
public boolean isApplication()
Check if this UPF meter is for application traffic.- Returns:
- true if the meter is for application traffic
-
isReset
public boolean isReset()
Check if this UPF meter is a reset.- Returns:
- true if this represents a meter reset.
-
resetSession
public static UpfMeter resetSession(int cellId)
Return a session UPF meter with no bands. Used to reset the meter.- Parameters:
cellId
- the meter cell index of this meter- Returns:
- a UpfMeter of type session with no bands
-
resetApplication
public static UpfMeter resetApplication(int cellId)
Return an application UPF meter with no bands. Used to reset the meter.- Parameters:
cellId
- the meter cell index of this meter- Returns:
- a UpfMeter of type application with no bands
-
resetSlice
public static UpfMeter resetSlice(int cellId)
Return a slice meter with no bands. Used to reset the meter.- Parameters:
cellId
- the meter cell index of this meter- Returns:
- a UpfMeter of type slice with no bands
-
builder
public static UpfMeter.Builder builder()
-
-