Package org.onosproject.net.meter
Class MeterId
- java.lang.Object
- 
- org.onlab.util.Identifier<java.lang.Long>
- 
- org.onosproject.net.meter.MeterId
 
 
- 
- All Implemented Interfaces:
- MeterCellId
 
 public final class MeterId extends Identifier<java.lang.Long> implements MeterCellId A representation of a meter cell identifier. Uniquely identifies a meter cell in the scope of a single device.This ID uniquely identifies a meter cell within in a switch that maintains only one meter instance. If a switch supports multiple meter instances (like in P4), then PiMeterCellIdshould be used. In this case, meter cells are defined starting with id=1 up to the maximum number of cells that the switch can support. The OpenFlow protocol also defines some additional virtual meter cells that can not be associated with flows.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.onosproject.net.meter.MeterCellIdMeterCellId.MeterCellType
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static MeterIdALLRepresents all meters for stat requests commands.static MeterIdCONTROLLERMeter for controller connection.static longMAXFlow meters can use any number up to MAX.static MeterIdSLOWPATHMeter for slow datapath, if any.- 
Fields inherited from class org.onlab.util.Identifieridentifier
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MeterIdmeterId(long id)Creates a new meter identifier.java.lang.StringtoString()Returns a string representation of a DeviceKeyId.MeterCellId.MeterCellTypetype()Return the type of this meter cell identifier.- 
Methods inherited from class org.onlab.util.Identifierequals, hashCode, id
 
- 
 
- 
- 
- 
Field Detail- 
MAXpublic static final long MAX Flow meters can use any number up to MAX.- See Also:
- Constant Field Values
 
 - 
SLOWPATHpublic static final MeterId SLOWPATH Meter for slow datapath, if any.
 - 
CONTROLLERpublic static final MeterId CONTROLLER Meter for controller connection.
 - 
ALLpublic static final MeterId ALL Represents all meters for stat requests commands.
 
- 
 - 
Method Detail- 
toStringpublic java.lang.String toString() Description copied from class:IdentifierReturns a string representation of a DeviceKeyId.- Overrides:
- toStringin class- Identifier<java.lang.Long>
- Returns:
- string
 
 - 
meterIdpublic static MeterId meterId(long id) Creates a new meter identifier.- Parameters:
- id- the backing identifier value
- Returns:
- meter identifier
 
 - 
typepublic MeterCellId.MeterCellType type() Description copied from interface:MeterCellIdReturn the type of this meter cell identifier.- Specified by:
- typein interface- MeterCellId
- Returns:
- type
 
 
- 
 
-