Package org.onosproject.net.meter
Class DefaultBand
- java.lang.Object
-
- org.onosproject.net.meter.DefaultBand
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultBand.Builder
-
Field Summary
-
Fields inherited from interface org.onosproject.net.meter.Band
ERR_MSG, MAX_PRECEDENCE, MIN_PRECEDENCE
-
-
Constructor Summary
Constructors Constructor Description DefaultBand(Band.Type type, long rate, java.lang.Long burstSize, java.lang.Short prec)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultBand.Builderbuilder()java.lang.Longburst()The burst size at which the meter applies.longbytes()Return the bytes seen by this band.java.lang.ShortdropPrecedence()Only meaningful in the case of a REMARK band type.longpackets()Returns the packets seen by this band.longrate()The rate at which this meter applies.voidsetBytes(long bytes)Sets the number of bytes seen by this band.voidsetPackets(long packets)Sets the number of packets seen by this band.java.lang.StringtoString()Band.Typetype()Signals the type of band to create.
-
-
-
Constructor Detail
-
DefaultBand
public DefaultBand(Band.Type type, long rate, java.lang.Long burstSize, java.lang.Short prec)
-
-
Method Detail
-
rate
public long rate()
Description copied from interface:BandThe rate at which this meter applies.
-
burst
public java.lang.Long burst()
Description copied from interface:BandThe burst size at which the meter applies.
-
dropPrecedence
public java.lang.Short dropPrecedence()
Description copied from interface:BandOnly meaningful in the case of a REMARK band type. indicates by which amount the drop precedence of the packet should be increase if the band is exceeded.- Specified by:
dropPrecedencein interfaceBand- Returns:
- a short value
-
type
public Band.Type type()
Description copied from interface:BandSignals the type of band to create.
-
packets
public long packets()
Description copied from interface:BandReturns the packets seen by this band.
-
bytes
public long bytes()
Description copied from interface:BandReturn the bytes seen by this band.
-
setPackets
public void setPackets(long packets)
Description copied from interface:BandEntrySets the number of packets seen by this band.- Specified by:
setPacketsin interfaceBandEntry- Parameters:
packets- a packet count
-
setBytes
public void setBytes(long bytes)
Description copied from interface:BandEntrySets the number of bytes seen by this band.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
builder
public static DefaultBand.Builder builder()
-
-