Interface GroupStore

    • Method Detail

      • getGroupCount

        int getGroupCount​(DeviceId deviceId)
        Returns the number of groups for the specified device in the store.
        Parameters:
        deviceId - the device ID
        Returns:
        number of groups for the specified device
      • getGroups

        java.lang.Iterable<Group> getGroups​(DeviceId deviceId)
        Returns the groups associated with a device.
        Parameters:
        deviceId - the device ID
        Returns:
        the group entries
      • getGroup

        Group getGroup​(DeviceId deviceId,
                       GroupKey appCookie)
        Returns the stored group entry.
        Parameters:
        deviceId - the device ID
        appCookie - the group key
        Returns:
        a group associated with the key
      • getGroup

        Group getGroup​(DeviceId deviceId,
                       GroupId groupId)
        Returns the stored group entry for an id.
        Parameters:
        deviceId - the device ID
        groupId - the group identifier
        Returns:
        a group associated with the key
      • storeGroupDescription

        void storeGroupDescription​(GroupDescription groupDesc)
        Stores a new group entry using the information from group description.
        Parameters:
        groupDesc - group description to be used to store group entry
      • updateGroupDescription

        void updateGroupDescription​(DeviceId deviceId,
                                    GroupKey oldAppCookie,
                                    GroupStore.UpdateType type,
                                    GroupBuckets newBuckets,
                                    GroupKey newAppCookie)
        Updates the existing group entry with the information from group description.
        Parameters:
        deviceId - the device ID
        oldAppCookie - the current group key
        type - update type
        newBuckets - group buckets for updates
        newAppCookie - optional new group key
      • deleteGroupDescription

        void deleteGroupDescription​(DeviceId deviceId,
                                    GroupKey appCookie)
        Triggers deleting the existing group entry.
        Parameters:
        deviceId - the device ID
        appCookie - the group key
      • addOrUpdateGroupEntry

        void addOrUpdateGroupEntry​(Group group)
        Stores a new group entry, or updates an existing entry.
        Parameters:
        group - group entry
      • removeGroupEntry

        void removeGroupEntry​(Group group)
        Removes the group entry from store.
        Parameters:
        group - group entry
      • purgeGroupEntry

        void purgeGroupEntry​(DeviceId deviceId)
        Removes all group entries of given device from store.
        Parameters:
        deviceId - device id
      • purgeGroupEntries

        default void purgeGroupEntries()
        Removes all group entries from store.
      • addOrUpdateExtraneousGroupEntry

        void addOrUpdateExtraneousGroupEntry​(Group group)
        A group entry that is present in switch but not in the store.
        Parameters:
        group - group entry
      • removeExtraneousGroupEntry

        void removeExtraneousGroupEntry​(Group group)
        Remove the group entry from extraneous database.
        Parameters:
        group - group entry
      • getExtraneousGroups

        java.lang.Iterable<Group> getExtraneousGroups​(DeviceId deviceId)
        Returns the extraneous groups associated with a device.
        Parameters:
        deviceId - the device ID
        Returns:
        the extraneous group entries
      • deviceInitialAuditCompleted

        void deviceInitialAuditCompleted​(DeviceId deviceId,
                                         boolean completed)
        Indicates the first group audit is completed.
        Parameters:
        deviceId - the device ID
        completed - initial audit status
      • deviceInitialAuditStatus

        boolean deviceInitialAuditStatus​(DeviceId deviceId)
        Retrieves the initial group audit status for a device.
        Parameters:
        deviceId - the device ID
        Returns:
        initial group audit status
      • groupOperationFailed

        void groupOperationFailed​(DeviceId deviceId,
                                  GroupOperation operation)
        Indicates the group operations failed.
        Parameters:
        deviceId - the device ID
        operation - the group operation failed
      • pushGroupMetrics

        void pushGroupMetrics​(DeviceId deviceId,
                              java.util.Collection<Group> groupEntries)
        Submits the group metrics to store for a given device ID.
        Parameters:
        deviceId - the device ID
        groupEntries - the group entries as received from southbound
      • notifyOfFailovers

        void notifyOfFailovers​(java.util.Collection<Group> failoverGroups)
        Indicates failover within a failover group.
        Parameters:
        failoverGroups - groups to notify