Package org.onosproject.net.pi.runtime
Class PiMeterCellConfig
- java.lang.Object
-
- org.onosproject.net.pi.runtime.PiMeterCellConfig
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PiMeterCellConfig.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PiMeterCellConfig.Builder
builder()
Returns a meter cell configuration builder.PiMeterCellId
cellId()
Returns the cell identifier.PiMeterBand
committedBand()
Returns the committed configuration if present.boolean
equals(Object o)
PiMeterCellHandle
handle(DeviceId deviceId)
Returns a handle for this PI entity and the given device ID.int
hashCode()
boolean
isDefaultConfig()
Check if the config represents a reset operation.boolean
isModifyConfig()
Check if the config represents a modify operation.Map<PiMeterBandType,PiMeterBand>
meterBands()
Returns the map of bands of this cell.PiMeterBand
peakBand()
Returns the peak configuration if present.PiEntityType
piEntityType()
Returns the type of this entity.static PiMeterCellConfig
reset(PiMeterCellId piMeterCellId)
Returns a PiMeterCellConfig with no bands.String
toString()
-
-
-
Method Detail
-
cellId
public PiMeterCellId cellId()
Returns the cell identifier.- Returns:
- cell identifier
-
meterBands
public Map<PiMeterBandType,PiMeterBand> meterBands()
Returns the map of bands of this cell.- Returns:
- meter bands
-
isModifyConfig
public boolean isModifyConfig()
Check if the config represents a modify operation. Or it is a non-default config read from south bound.- Returns:
- true if there are exactly 2 bands
-
isDefaultConfig
public boolean isDefaultConfig()
Check if the config represents a reset operation. Or it is a default config read from south bound.- Returns:
- true if there is no band
-
committedBand
public PiMeterBand committedBand()
Returns the committed configuration if present.- Returns:
- the committed band. Null otherwise
-
peakBand
public PiMeterBand peakBand()
Returns the peak configuration if present.- Returns:
- the peak band. Null otherwise
-
reset
public static PiMeterCellConfig reset(PiMeterCellId piMeterCellId)
Returns a PiMeterCellConfig with no bands. Used to reset a PI meter cell.- Parameters:
piMeterCellId
- the PiMeterCellId need to be reset- Returns:
- a PiMeterCellConfig with no bands
-
piEntityType
public PiEntityType piEntityType()
Description copied from interface:PiEntity
Returns the type of this entity.- Specified by:
piEntityType
in interfacePiEntity
- Returns:
- entity type
-
handle
public PiMeterCellHandle handle(DeviceId deviceId)
Description copied from interface:PiEntity
Returns a handle for this PI entity and the given device ID.
-
builder
public static PiMeterCellConfig.Builder builder()
Returns a meter cell configuration builder.- Returns:
- a new builder
-
-