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 classGroupStore.UpdateType
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddOrUpdateExtraneousGroupEntry(Group group)A group entry that is present in switch but not in the store.voidaddOrUpdateGroupEntry(Group group)Stores a new group entry, or updates an existing entry.voiddeleteGroupDescription(DeviceId deviceId, GroupKey appCookie)Triggers deleting the existing group entry.voiddeviceInitialAuditCompleted(DeviceId deviceId, boolean completed)Indicates the first group audit is completed.booleandeviceInitialAuditStatus(DeviceId deviceId)Retrieves the initial group audit status for a device.Iterable<Group>getExtraneousGroups(DeviceId deviceId)Returns the extraneous groups associated with a device.GroupgetGroup(DeviceId deviceId, GroupId groupId)Returns the stored group entry for an id.GroupgetGroup(DeviceId deviceId, GroupKey appCookie)Returns the stored group entry.intgetGroupCount(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.voidgroupOperationFailed(DeviceId deviceId, GroupOperation operation)Indicates the group operations failed.voidnotifyOfFailovers(Collection<Group> failoverGroups)Indicates failover within a failover group.default voidpurgeGroupEntries()Removes all group entries from store.voidpurgeGroupEntries(DeviceId deviceId, ApplicationId appId)Removes all group entries of given device and given application from store.voidpurgeGroupEntry(DeviceId deviceId)Removes all group entries of given device from store.voidpushGroupMetrics(DeviceId deviceId, Collection<Group> groupEntries)Submits the group metrics to store for a given device ID.voidremoveExtraneousGroupEntry(Group group)Remove the group entry from extraneous database.voidremoveGroupEntry(Group group)Removes the group entry from store.voidstoreGroupDescription(GroupDescription groupDesc)Stores a new group entry using the information from group description.voidupdateGroupDescription(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
void purgeGroupEntries(DeviceId deviceId, ApplicationId appId)
Removes all group entries of given device and given application from store.- Parameters:
deviceId- device idappId- application 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
-
-