public class MBodyMutableTableFeatures extends MBodyTableFeatures implements MutableStructure
MBodyTableFeatures
.MBodyTableFeatures.Array, MBodyTableFeatures.MutableArray
ALL_META_BITS
parseErrorCause, version
Constructor and Description |
---|
MBodyMutableTableFeatures(ProtocolVersion pv)
Constructs a mutable multipart body TABLE FEATURES element.
|
Modifier and Type | Method and Description |
---|---|
MBodyMutableTableFeatures |
addProp(TableFeatureProp prop)
Adds a table features property to this entry, describing a capability
of the table.
|
MBodyMutableTableFeatures |
maxEntries(long max)
Sets the maximum number of flow entries that can be inserted into the
table; Since 1.3.
|
MBodyMutableTableFeatures |
metadataMatch(long meta)
Sets the metadata match value; Since 1.3.
|
MBodyMutableTableFeatures |
metadataWrite(long meta)
Sets the metadata write value; Since 1.3.
|
MBodyMutableTableFeatures |
name(String name)
Sets the name of the table; Since 1.3.
|
MBodyMutableTableFeatures |
tableId(TableId tableId)
Sets the ID of the table; 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.
|
getConfig, getMaxEntries, getMetadataMatch, getMetadataWrite, getName, getProps, getTableId, getTotalLength, toDebugString, toDebugString, validate
getVersion, hex, hex, incomplete, parseErrorCause
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getVersion, toDebugString
public MBodyMutableTableFeatures(ProtocolVersion pv)
The metadata match and write fields default to MBodyTableFeatures.ALL_META_BITS
.
A valid TableId
must be present for
this element to be valid.
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 MBodyTableFeatures
public MBodyMutableTableFeatures tableId(TableId tableId)
tableId
- the table IDInvalidMutableException
- if this instance is no longer writableNullPointerException
- if tableId is nullpublic MBodyMutableTableFeatures name(String name)
Note that the maximum allowed length of the string is
MpBodyFactory.TABLE_NAME_LEN
- 1.
name
- the table nameInvalidMutableException
- if this instance is no longer writableNullPointerException
- if name is nullIllegalArgumentException
- if string length is >31public MBodyMutableTableFeatures metadataMatch(long meta)
The value set indicates the bits of the metadata field that the table
can match on, when using the
metadata
match field. A value of MBodyTableFeatures.ALL_META_BITS
indicates that the
table can match the full metadata field.
meta
- the metadata match valueInvalidMutableException
- if this instance is no longer writablepublic MBodyMutableTableFeatures metadataWrite(long meta)
The value set indicates the bits of the metadata field that the table
can write using the
write-metadata
instruction. A value of MBodyTableFeatures.ALL_META_BITS
indicates that the
table can write the full metadata field.
meta
- the metadata write valueInvalidMutableException
- if this instance is no longer writablepublic MBodyMutableTableFeatures maxEntries(long max)
max
- the maximum number of flow entriesInvalidMutableException
- if this instance is no longer writableIllegalArgumentException
- if max is not u32MBodyTableFeatures.getMaxEntries()
public MBodyMutableTableFeatures addProp(TableFeatureProp prop)
prop
- the property to addInvalidMutableException
- if this instance is no longer writableNullPointerException
- if prop is nullCopyright © 2015. All Rights Reserved.