public class MBodyMutableMeterStats extends MBodyMeterStats implements MutableStructure
MBodyMeterStats
.MBodyMeterStats.Array, MBodyMeterStats.MeterBandStats, MBodyMeterStats.MutableArray
parseErrorCause, version
Constructor and Description |
---|
MBodyMutableMeterStats(ProtocolVersion pv)
Constructs a mutable multipart body METER_STATS type.
|
Modifier and Type | Method and Description |
---|---|
MBodyMutableMeterStats |
addMeterBandStat(MBodyMeterStats.MeterBandStats meterBandStats)
Adds a
MBodyMeterStats.MeterBandStats for the meter bands
applied to this meter; Since 1.3. |
MBodyMutableMeterStats |
byteInCount(long byteInCount)
Sets the number of bytes in input for this meter; Since 1.3.
|
MBodyMutableMeterStats |
duration(long seconds,
long nano)
Sets the time this meter hes been alive; Since 1.3.
|
MBodyMutableMeterStats |
flowCount(long flowCount)
Sets the count of flows bound to this meter; Since 1.3.
|
MBodyMutableMeterStats |
meterId(MeterId meterId)
Sets the meter ID for this meter stats; Since 1.3.
|
MBodyMutableMeterStats |
packetInCount(long packetInCount)
Sets the number of packet in input for this meter; Since 1.3.
|
OpenflowStructure |
toImmutable()
Returns an immutable instance of this structure.
|
String |
toString() |
boolean |
writable()
Returns true if this mutable object is still writable.
|
getBandStats, getByteInCount, getDurationNSec, getDurationSec, getFlowCount, getMeterId, getPktInCount, getTotalLength, toDebugString, toDebugString, validate
getVersion, hex, hex, incomplete, parseErrorCause
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getVersion, toDebugString
public MBodyMutableMeterStats(ProtocolVersion pv)
Note the a freshly constructed instance has MeterId.ALL
as the
default meter id value.
pv
- the protocol versionpublic OpenflowStructure toImmutable()
MutableStructure
It is expected that the reference to this mutable structure will be
dropped. Note that all method calls invoked on a
MutableStructure
after toImmutable()
has been invoked
will result in an InvalidMutableException
being thrown.
toImmutable
in interface MutableStructure
public boolean writable()
MutableObject
#toImmutable()
method (defined on a sub-interface)
has not yet been invoked.writable
in interface MutableObject
public String toString()
toString
in class MBodyMeterStats
public MBodyMutableMeterStats meterId(MeterId meterId)
meterId
- the meter IDInvalidMutableException
- if this instance is no longer writableNullPointerException
- if meterId is nullpublic MBodyMutableMeterStats flowCount(long flowCount)
flowCount
- the count of flowsInvalidMutableException
- if this instance is no longer writablepublic MBodyMutableMeterStats packetInCount(long packetInCount)
packetInCount
- the packet in countInvalidMutableException
- if this instance is no longer writablepublic MBodyMutableMeterStats byteInCount(long byteInCount)
byteInCount
- the packet in countInvalidMutableException
- if this instance is no longer writablepublic MBodyMutableMeterStats duration(long seconds, long nano)
The first parameter is the number of seconds; the second is the additional number of nanoseconds.
seconds
- the number of secondsnano
- the additional number of nanosecondsInvalidMutableException
- if this instance is no longer writableIllegalArgumentException
- if seconds or nano is not U32public MBodyMutableMeterStats addMeterBandStat(MBodyMeterStats.MeterBandStats meterBandStats)
MBodyMeterStats.MeterBandStats
for the meter bands
applied to this meter; Since 1.3.meterBandStats
- the meter band statsInvalidMutableException
- if this instance is no longer writableNullPointerException
- if meterBandStats is nullCopyright © 2015. All Rights Reserved.