Class DefaultGroupDescription

    • Constructor Detail

      • DefaultGroupDescription

        public DefaultGroupDescription​(DeviceId deviceId,
                                       GroupDescription.Type type,
                                       GroupBuckets buckets,
                                       GroupKey appCookie,
                                       Integer groupId,
                                       ApplicationId appId)
        Constructor to be used by north bound applications. NOTE: The caller of this subsystem MUST ensure the appCookie provided in this API is immutable. NOTE: The caller may choose to pass in 'null' for the groupId. This is the typical case, where the caller allows the group subsystem to choose the groupId in a globally unique way. If the caller passes in the groupId, the caller MUST ensure that the id is globally unique (not just unique per device).
        Parameters:
        deviceId - device identifier
        type - type of the group
        buckets - immutable list of group bucket
        appCookie - immutable application cookie of type DefaultGroupKey to be associated with the group
        groupId - group identifier
        appId - application id
      • DefaultGroupDescription

        public DefaultGroupDescription​(GroupDescription groupDesc)
        Constructor to be used by group subsystem internal components. Creates group description object from another object of same type.
        Parameters:
        groupDesc - group description object
      • DefaultGroupDescription

        public DefaultGroupDescription​(DeviceId deviceId,
                                       GroupDescription.Type type,
                                       GroupBuckets buckets)
        Constructor to be used by group subsystem internal components. Creates group description object from the information retrieved from data plane.
        Parameters:
        deviceId - device identifier
        type - type of the group
        buckets - immutable list of group bucket
    • Method Detail

      • deviceId

        public DeviceId deviceId()
        Returns device identifier on which this group object is created.
        Specified by:
        deviceId in interface GroupDescription
        Returns:
        DeviceId device identifier
      • appId

        public ApplicationId appId()
        Returns application identifier that has created this group object.
        Specified by:
        appId in interface GroupDescription
        Returns:
        ApplicationId application identifier
      • appCookie

        public GroupKey appCookie()
        Returns application cookie associated with a group object.
        Specified by:
        appCookie in interface GroupDescription
        Returns:
        GroupKey application cookie
      • buckets

        public GroupBuckets buckets()
        Returns group buckets of a group.
        Specified by:
        buckets in interface GroupDescription
        Returns:
        GroupBuckets immutable list of group bucket
      • givenGroupId

        public Integer givenGroupId()
        Returns groupId passed in by application.
        Specified by:
        givenGroupId in interface GroupDescription
        Returns:
        Integer group Id passed in by caller. May be null if caller passed in null during GroupDescription creation.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object