Package org.onosproject.net.meter
Class DefaultBand.Builder
- java.lang.Object
-
- org.onosproject.net.meter.DefaultBand.Builder
-
- All Implemented Interfaces:
Band.Builder
- Enclosing class:
- DefaultBand
public static final class DefaultBand.Builder extends Object implements Band.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultBandbuild()Builds the band.Band.BuilderburstSize(long burstSize)Assigns a burst size to this band.Band.BuilderdropPrecedence(short prec)Assigns the drop precedence for this band.Band.BuilderofType(Band.Type type)Assigns theBand.Typeof this band.Band.BuilderwithRate(long rate)Assigns a rate to this band.
-
-
-
Method Detail
-
withRate
public Band.Builder withRate(long rate)
Description copied from interface:Band.BuilderAssigns a rate to this band. The units for this rate are defined in the encapsulating meter.- Specified by:
withRatein interfaceBand.Builder- Parameters:
rate- a long value- Returns:
- this
-
burstSize
public Band.Builder burstSize(long burstSize)
Description copied from interface:Band.BuilderAssigns a burst size to this band. Only meaningful if the encapsulating meter is of burst type.- Specified by:
burstSizein interfaceBand.Builder- Parameters:
burstSize- a long value.- Returns:
- this
-
dropPrecedence
public Band.Builder dropPrecedence(short prec)
Description copied from interface:Band.BuilderAssigns the drop precedence for this band. Only meaningful if the band is of REMARK type.- Specified by:
dropPrecedencein interfaceBand.Builder- Parameters:
prec- a short value- Returns:
- this
-
ofType
public Band.Builder ofType(Band.Type type)
Description copied from interface:Band.BuilderAssigns theBand.Typeof this band.- Specified by:
ofTypein interfaceBand.Builder- Parameters:
type- a band type- Returns:
- this
-
build
public DefaultBand build()
Description copied from interface:Band.BuilderBuilds the band.- Specified by:
buildin interfaceBand.Builder- Returns:
- a band
-
-