public class MutableBucket extends Bucket implements MutableStructure
Bucket.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, toDebugStringgetVersion, hex, hex, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetVersion, toDebugStringpublic 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 MutableStructurepublic boolean writable()
MutableObject#toImmutable() method (defined on a sub-interface)
has not yet been invoked.writable in interface MutableObjectpublic 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 © 2014. All Rights Reserved.