Class GroupOperation


  • public final class GroupOperation
    extends java.lang.Object
    Group operation definition to be used between core and provider layers of group subsystem.
    • Method Detail

      • createAddGroupOperation

        public static GroupOperation createAddGroupOperation​(GroupId groupId,
                                                             GroupDescription.Type groupType,
                                                             GroupBuckets buckets)
        Creates ADD group operation object.
        Parameters:
        groupId - group Identifier
        groupType - type of the group
        buckets - 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 Identifier
        groupType - type of the group
        buckets - 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 Identifier
        groupType - 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 operation
        failureCode - 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:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object