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 java.lang.Object implements Band.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultBand
build()
Builds the band.Band.Builder
burstSize(long burstSize)
Assigns a burst size to this band.Band.Builder
dropPrecedence(short prec)
Assigns the drop precedence for this band.Band.Builder
ofType(Band.Type type)
Assigns theBand.Type
of this band.Band.Builder
withRate(long rate)
Assigns a rate to this band.
-
-
-
Method Detail
-
withRate
public Band.Builder withRate(long rate)
Description copied from interface:Band.Builder
Assigns a rate to this band. The units for this rate are defined in the encapsulating meter.- Specified by:
withRate
in interfaceBand.Builder
- Parameters:
rate
- a long value- Returns:
- this
-
burstSize
public Band.Builder burstSize(long burstSize)
Description copied from interface:Band.Builder
Assigns a burst size to this band. Only meaningful if the encapsulating meter is of burst type.- Specified by:
burstSize
in interfaceBand.Builder
- Parameters:
burstSize
- a long value.- Returns:
- this
-
dropPrecedence
public Band.Builder dropPrecedence(short prec)
Description copied from interface:Band.Builder
Assigns the drop precedence for this band. Only meaningful if the band is of REMARK type.- Specified by:
dropPrecedence
in interfaceBand.Builder
- Parameters:
prec
- a short value- Returns:
- this
-
ofType
public Band.Builder ofType(Band.Type type)
Description copied from interface:Band.Builder
Assigns theBand.Type
of this band.- Specified by:
ofType
in interfaceBand.Builder
- Parameters:
type
- a band type- Returns:
- this
-
build
public DefaultBand build()
Description copied from interface:Band.Builder
Builds the band.- Specified by:
build
in interfaceBand.Builder
- Returns:
- a band
-
-