Package org.onosproject.net.group
Interface GroupStore
-
- All Superinterfaces:
Store<GroupEvent,GroupStoreDelegate>
public interface GroupStore extends Store<GroupEvent,GroupStoreDelegate>
Manages inventory of groups per device; not intended for direct use.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
GroupStore.UpdateType
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addOrUpdateExtraneousGroupEntry(Group group)
A group entry that is present in switch but not in the store.void
addOrUpdateGroupEntry(Group group)
Stores a new group entry, or updates an existing entry.void
deleteGroupDescription(DeviceId deviceId, GroupKey appCookie)
Triggers deleting the existing group entry.void
deviceInitialAuditCompleted(DeviceId deviceId, boolean completed)
Indicates the first group audit is completed.boolean
deviceInitialAuditStatus(DeviceId deviceId)
Retrieves the initial group audit status for a device.Iterable<Group>
getExtraneousGroups(DeviceId deviceId)
Returns the extraneous groups associated with a device.Group
getGroup(DeviceId deviceId, GroupId groupId)
Returns the stored group entry for an id.Group
getGroup(DeviceId deviceId, GroupKey appCookie)
Returns the stored group entry.int
getGroupCount(DeviceId deviceId)
Returns the number of groups for the specified device in the store.Iterable<Group>
getGroups(DeviceId deviceId)
Returns the groups associated with a device.void
groupOperationFailed(DeviceId deviceId, GroupOperation operation)
Indicates the group operations failed.void
notifyOfFailovers(Collection<Group> failoverGroups)
Indicates failover within a failover group.default void
purgeGroupEntries()
Removes all group entries from store.void
purgeGroupEntry(DeviceId deviceId)
Removes all group entries of given device from store.void
pushGroupMetrics(DeviceId deviceId, Collection<Group> groupEntries)
Submits the group metrics to store for a given device ID.void
removeExtraneousGroupEntry(Group group)
Remove the group entry from extraneous database.void
removeGroupEntry(Group group)
Removes the group entry from store.void
storeGroupDescription(GroupDescription groupDesc)
Stores a new group entry using the information from group description.void
updateGroupDescription(DeviceId deviceId, GroupKey oldAppCookie, GroupStore.UpdateType type, GroupBuckets newBuckets, GroupKey newAppCookie)
Updates the existing group entry with the information from group description.-
Methods inherited from interface org.onosproject.store.Store
hasDelegate, setDelegate, unsetDelegate
-
-
-
-
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
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 IDappCookie
- 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 IDgroupId
- 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 IDoldAppCookie
- the current group keytype
- update typenewBuckets
- group buckets for updatesnewAppCookie
- optional new group key
-
deleteGroupDescription
void deleteGroupDescription(DeviceId deviceId, GroupKey appCookie)
Triggers deleting the existing group entry.- Parameters:
deviceId
- the device IDappCookie
- 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
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 IDcompleted
- 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 IDoperation
- the group operation failed
-
pushGroupMetrics
void pushGroupMetrics(DeviceId deviceId, Collection<Group> groupEntries)
Submits the group metrics to store for a given device ID.- Parameters:
deviceId
- the device IDgroupEntries
- the group entries as received from southbound
-
notifyOfFailovers
void notifyOfFailovers(Collection<Group> failoverGroups)
Indicates failover within a failover group.- Parameters:
failoverGroups
- groups to notify
-
-