public class MutableBucket extends Bucket implements MutableStructure
Bucket
.parseErrorCause, version
Constructor and Description |
---|
MutableBucket(ProtocolVersion pv)
Constructs a mutable bucket.
|
Modifier and Type | Method and Description |
---|---|
MutableBucket |
addAction(Action action)
Adds the specified action to this bucket; Since 1.1.
|
OpenflowStructure |
toImmutable()
Returns an immutable instance of this structure.
|
String |
toString() |
MutableBucket |
watchGroup(GroupId watchGroup)
Sets the watch group for this bucket; Since 1.1.
|
MutableBucket |
watchPort(BigPortNumber watchPort)
Sets the watch port for this bucket; Since 1.1.
|
MutableBucket |
weight(int weight)
Sets the weight (u16) for this bucket; Since 1.1.
|
boolean |
writable()
Returns true if this mutable object is still writable.
|
getActions, getWatchGroup, getWatchPort, getWeight, toDebugString, toDebugString
getVersion, hex, hex, incomplete, parseErrorCause, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getVersion, toDebugString
public MutableBucket(ProtocolVersion pv)
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 MutableBucket weight(int weight)
weight
- the bucket weightInvalidMutableException
- if this instance is no longer writableIllegalArgumentException
- if the weight is not u16public MutableBucket watchPort(BigPortNumber watchPort)
watchPort
- the watch portInvalidMutableException
- if this instance is no longer writableNullPointerException
- if watchPort is nullIllegalArgumentException
- if the port number is invalidpublic MutableBucket watchGroup(GroupId watchGroup)
watchGroup
- the watch groupInvalidMutableException
- if this instance is no longer writableNullPointerException
- if watchGroup is nullpublic MutableBucket addAction(Action action)
action
- the action to addInvalidMutableException
- if this instance is no longer writableNullPointerException
- if action is nullCopyright © 2015. All Rights Reserved.