public class MBodyMeterStats extends OpenflowStructure implements MultipartBody
Modifier and Type | Class and Description |
---|---|
static class |
MBodyMeterStats.Array
Represents an array of meter stats elements.
|
static class |
MBodyMeterStats.MeterBandStats
Represents statistics associated with a given meter band.
|
static class |
MBodyMeterStats.MutableArray
A mutable array of meter stats elements.
|
parseErrorCause, version
Constructor and Description |
---|
MBodyMeterStats(ProtocolVersion pv)
Constructs a multipart body METER_STATS type.
|
Modifier and Type | Method and Description |
---|---|
List<MBodyMeterStats.MeterBandStats> |
getBandStats()
Returns the
MBodyMeterStats.MeterBandStats for the meter bands applied to this
meter; Since 1.3. |
long |
getByteInCount()
Returns the number of bytes in input; Since 1.3.
|
long |
getDurationNSec()
Returns the time this meter has been alive in nanoseconds beyond
getDurationSec() ; Since 1.3. |
long |
getDurationSec()
Returns the time this meter has been alive in seconds; Since 1.3.
|
long |
getFlowCount()
Returns the number of flows bound to this meter; Since 1.3.
|
MeterId |
getMeterId()
Returns the meter id; Since 1.3.
|
long |
getPktInCount()
Returns the number of packets in input; Since 1.3.
|
int |
getTotalLength()
Returns the total length of the body, in bytes.
|
String |
toDebugString()
Returns a string representation useful for debugging.
|
String |
toDebugString(int indent)
Returns a multi-line representation of the Meter Stats object.
|
String |
toString() |
void |
validate()
Validates this structure for completeness and throws an exception
if the structure is considered "not complete".
|
getVersion, hex, hex, incomplete, parseErrorCause
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getVersion
public MBodyMeterStats(ProtocolVersion pv)
pv
- the protocol versionpublic int getTotalLength()
MultipartBody
getTotalLength
in interface MultipartBody
public void validate() throws IncompleteStructureException
OpenflowStructure
This default implementation does nothing, i.e. default behavior is that structures are considered complete.
Subclasses should override this method to check that mandatory fields or other internal state is present, throwing an exception if it is not.
validate
in interface MultipartBody
validate
in class OpenflowStructure
IncompleteStructureException
- if the structure is not completepublic String toString()
toString
in class OpenflowStructure
public String toDebugString()
OpenflowStructure
OpenflowStructure.toString()
, but
subclasses are free to override this behavior.toDebugString
in interface Structure
toDebugString
in class OpenflowStructure
public String toDebugString(int indent)
indent
- the additional indent (number of spaces)public MeterId getMeterId()
public long getFlowCount()
public long getPktInCount()
public long getByteInCount()
public long getDurationSec()
public long getDurationNSec()
getDurationSec()
; Since 1.3.
This value is u32.public List<MBodyMeterStats.MeterBandStats> getBandStats()
MBodyMeterStats.MeterBandStats
for the meter bands applied to this
meter; Since 1.3.Copyright © 2015. All Rights Reserved.