public class MBodyTableStats extends OpenflowStructure implements MultipartBody
Modifier and Type | Class and Description |
---|---|
static class |
MBodyTableStats.Array
Represents an array of table stats elements.
|
static class |
MBodyTableStats.MutableArray
A mutable array of table stats elements.
|
parseErrorCause, version
Constructor and Description |
---|
MBodyTableStats(ProtocolVersion pv)
Constructs an OpenFlow structure.
|
Modifier and Type | Method and Description |
---|---|
long |
getActiveCount()
Returns the number of active entries; Since 1.0.
|
long |
getLookupCount()
Returns the number of packets looked up in the table; Since 1.0.
|
long |
getMatchedCount()
Returns the number of packets that hit the table; Since 1.0.
|
long |
getMaxEntries()
Returns the maximum number of entries supported in this table;
Since 1.0; Removed at 1.3.
|
String |
getName()
Returns the table name; Since 1.0; Removed at 1.3.
|
TableId |
getTableId()
Returns the table ID; Since 1.0.
|
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 this Table 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 MBodyTableStats(ProtocolVersion pv)
pv
- the protocol versionpublic 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 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 TableId getTableId()
public String getName()
Note that the table name is stored in a 32 character field.
As of 1.3, the table name is provided in the TableFeatures multipart-reply, and not here. This method will return null for version 1.3.
MBodyTableFeatures
public long getMaxEntries()
As of 1.3, the maximum number of entries supported is provided in the TableFeatures multipart-reply, and not here. This method will return 0 for version 1.3.
MBodyTableFeatures
public long getActiveCount()
public long getLookupCount()
public long getMatchedCount()
Copyright © 2015. All Rights Reserved.