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 class
DefaultBand.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.Builder
builder()
java.lang.Long
burst()
The burst size at which the meter applies.long
bytes()
Return the bytes seen by this band.java.lang.Short
dropPrecedence()
Only meaningful in the case of a REMARK band type.long
packets()
Returns the packets seen by this band.long
rate()
The rate at which this meter applies.void
setBytes(long bytes)
Sets the number of bytes seen by this band.void
setPackets(long packets)
Sets the number of packets seen by this band.java.lang.String
toString()
Band.Type
type()
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:Band
The rate at which this meter applies.
-
burst
public java.lang.Long burst()
Description copied from interface:Band
The burst size at which the meter applies.
-
dropPrecedence
public java.lang.Short dropPrecedence()
Description copied from interface:Band
Only 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:
dropPrecedence
in interfaceBand
- Returns:
- a short value
-
type
public Band.Type type()
Description copied from interface:Band
Signals the type of band to create.
-
packets
public long packets()
Description copied from interface:Band
Returns the packets seen by this band.
-
bytes
public long bytes()
Description copied from interface:Band
Return the bytes seen by this band.
-
setPackets
public void setPackets(long packets)
Description copied from interface:BandEntry
Sets the number of packets seen by this band.- Specified by:
setPackets
in interfaceBandEntry
- Parameters:
packets
- a packet count
-
setBytes
public void setBytes(long bytes)
Description copied from interface:BandEntry
Sets the number of bytes seen by this band.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
builder
public static DefaultBand.Builder builder()
-
-