Package org.onosproject.net.group
Class GroupOperation
- java.lang.Object
-
- org.onosproject.net.group.GroupOperation
-
public final class GroupOperation extends java.lang.ObjectGroup operation definition to be used between core and provider layers of group subsystem.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGroupOperation.GroupMsgErrorCodePossible error codes for a failure of a group operation.static classGroupOperation.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GroupBucketsbuckets()Returns group buckets associated with the operation.static GroupOperationcreateAddGroupOperation(GroupId groupId, GroupDescription.Type groupType, GroupBuckets buckets)Creates ADD group operation object.static GroupOperationcreateDeleteGroupOperation(GroupId groupId, GroupDescription.Type groupType)Creates DELETE group operation object.static GroupOperationcreateFailedGroupOperation(GroupOperation groupOperation, GroupOperation.GroupMsgErrorCode failureCode)Creates failure group operation object by setting failure code to inform the failure reason.static GroupOperationcreateModifyGroupOperation(GroupId groupId, GroupDescription.Type groupType, GroupBuckets buckets)Creates MODIFY group operation object.booleanequals(java.lang.Object obj)GroupOperation.GroupMsgErrorCodefailureCode()Returns the failure code representing the failure of a group operation.GroupIdgroupId()Returns group identifier attribute of the operation.GroupDescription.TypegroupType()Returns group type attribute of the operation.inthashCode()GroupOperation.TypeopType()Returns group operation type.
-
-
-
Method Detail
-
createAddGroupOperation
public static GroupOperation createAddGroupOperation(GroupId groupId, GroupDescription.Type groupType, GroupBuckets buckets)
Creates ADD group operation object.- Parameters:
groupId- group IdentifiergroupType- type of the groupbuckets- immutable list of group buckets to be part of group- Returns:
- add group operation object
-
createModifyGroupOperation
public static GroupOperation createModifyGroupOperation(GroupId groupId, GroupDescription.Type groupType, GroupBuckets buckets)
Creates MODIFY group operation object.- Parameters:
groupId- group IdentifiergroupType- type of the groupbuckets- immutable list of group buckets to be part of group- Returns:
- modify group operation object
-
createDeleteGroupOperation
public static GroupOperation createDeleteGroupOperation(GroupId groupId, GroupDescription.Type groupType)
Creates DELETE group operation object.- Parameters:
groupId- group IdentifiergroupType- type of the group- Returns:
- delete group operation object
-
createFailedGroupOperation
public static GroupOperation createFailedGroupOperation(GroupOperation groupOperation, GroupOperation.GroupMsgErrorCode failureCode)
Creates failure group operation object by setting failure code to inform the failure reason.- Parameters:
groupOperation- the original group operationfailureCode- failure code for a failed group operation- Returns:
- failed group operation object
-
opType
public GroupOperation.Type opType()
Returns group operation type.- Returns:
- GroupOpType group operation type
-
groupId
public GroupId groupId()
Returns group identifier attribute of the operation.- Returns:
- GroupId group identifier
-
groupType
public GroupDescription.Type groupType()
Returns group type attribute of the operation.- Returns:
- GroupType group type
-
buckets
public GroupBuckets buckets()
Returns group buckets associated with the operation.- Returns:
- GroupBuckets group buckets
-
failureCode
public GroupOperation.GroupMsgErrorCode failureCode()
Returns the failure code representing the failure of a group operation.- Returns:
- error code for failure of group operation
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-