Package org.onosproject.net.meter
Class DefaultMeter.Builder
- java.lang.Object
- 
- org.onosproject.net.meter.DefaultMeter.Builder
 
- 
- All Implemented Interfaces:
- Meter.Builder
 - Enclosing class:
- DefaultMeter
 
 public static final class DefaultMeter.Builder extends java.lang.Object implements Meter.Builder 
- 
- 
Constructor SummaryConstructors Constructor Description Builder()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultMeterbuild()Builds the meter based on the specified parameters.Meter.Builderburst()Sets this meter as applicable to burst traffic only.Meter.BuilderforDevice(DeviceId deviceId)Assigns the target device for this meter.Meter.BuilderfromApp(ApplicationId appId)Assigns the application that built this meter.Meter.BuilderwithBands(java.util.Collection<Band> bands)Assigns bands to this meter.Meter.BuilderwithCellId(MeterCellId cellId)Assigns the id to this meter cell.Meter.BuilderwithId(MeterId id)Assigns the id to this meter.Meter.BuilderwithUnit(Meter.Unit unit)Assigns the @See Unit to use for this meter.
 
- 
- 
- 
Method Detail- 
forDevicepublic Meter.Builder forDevice(DeviceId deviceId) Description copied from interface:Meter.BuilderAssigns the target device for this meter.- Specified by:
- forDevicein interface- Meter.Builder
- Parameters:
- deviceId- a device id
- Returns:
- this
 
 - 
withIdpublic Meter.Builder withId(MeterId id) Description copied from interface:Meter.BuilderAssigns the id to this meter.- Specified by:
- withIdin interface- Meter.Builder
- Parameters:
- id- a e
- Returns:
- this
 
 - 
withCellIdpublic Meter.Builder withCellId(MeterCellId cellId) Description copied from interface:Meter.BuilderAssigns the id to this meter cell.- Specified by:
- withCellIdin interface- Meter.Builder
- Parameters:
- cellId- a meter cell identifier
- Returns:
- this
 
 - 
fromApppublic Meter.Builder fromApp(ApplicationId appId) Description copied from interface:Meter.BuilderAssigns the application that built this meter.- Specified by:
- fromAppin interface- Meter.Builder
- Parameters:
- appId- an application id
- Returns:
- this
 
 - 
withUnitpublic Meter.Builder withUnit(Meter.Unit unit) Description copied from interface:Meter.BuilderAssigns the @See Unit to use for this meter. Defaults to kb/s- Specified by:
- withUnitin interface- Meter.Builder
- Parameters:
- unit- a unit
- Returns:
- this
 
 - 
burstpublic Meter.Builder burst() Description copied from interface:Meter.BuilderSets this meter as applicable to burst traffic only. Defaults to false.- Specified by:
- burstin interface- Meter.Builder
- Returns:
- this
 
 - 
withBandspublic Meter.Builder withBands(java.util.Collection<Band> bands) Description copied from interface:Meter.BuilderAssigns bands to this meter. There must be at least one band.- Specified by:
- withBandsin interface- Meter.Builder
- Parameters:
- bands- a collection of bands
- Returns:
- this
 
 - 
buildpublic DefaultMeter build() Description copied from interface:Meter.BuilderBuilds the meter based on the specified parameters.- Specified by:
- buildin interface- Meter.Builder
- Returns:
- a meter
 
 
- 
 
-