public interface GroupStore extends Store<GroupEvent,GroupStoreDelegate>
Modifier and Type | Interface and Description |
---|---|
static class |
GroupStore.UpdateType |
Modifier and Type | Method and 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.
|
java.lang.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.
|
java.lang.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(java.util.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,
java.util.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.
|
hasDelegate, setDelegate, unsetDelegate
int getGroupCount(DeviceId deviceId)
deviceId
- the device IDjava.lang.Iterable<Group> getGroups(DeviceId deviceId)
deviceId
- the device IDGroup getGroup(DeviceId deviceId, GroupKey appCookie)
deviceId
- the device IDappCookie
- the group keyGroup getGroup(DeviceId deviceId, GroupId groupId)
deviceId
- the device IDgroupId
- the group identifiervoid storeGroupDescription(GroupDescription groupDesc)
groupDesc
- group description to be used to store group entryvoid updateGroupDescription(DeviceId deviceId, GroupKey oldAppCookie, GroupStore.UpdateType type, GroupBuckets newBuckets, GroupKey newAppCookie)
deviceId
- the device IDoldAppCookie
- the current group keytype
- update typenewBuckets
- group buckets for updatesnewAppCookie
- optional new group keyvoid deleteGroupDescription(DeviceId deviceId, GroupKey appCookie)
deviceId
- the device IDappCookie
- the group keyvoid addOrUpdateGroupEntry(Group group)
group
- group entryvoid removeGroupEntry(Group group)
group
- group entryvoid purgeGroupEntry(DeviceId deviceId)
deviceId
- device iddefault void purgeGroupEntries()
void addOrUpdateExtraneousGroupEntry(Group group)
group
- group entryvoid removeExtraneousGroupEntry(Group group)
group
- group entryjava.lang.Iterable<Group> getExtraneousGroups(DeviceId deviceId)
deviceId
- the device IDvoid deviceInitialAuditCompleted(DeviceId deviceId, boolean completed)
deviceId
- the device IDcompleted
- initial audit statusboolean deviceInitialAuditStatus(DeviceId deviceId)
deviceId
- the device IDvoid groupOperationFailed(DeviceId deviceId, GroupOperation operation)
deviceId
- the device IDoperation
- the group operation failedvoid pushGroupMetrics(DeviceId deviceId, java.util.Collection<Group> groupEntries)
deviceId
- the device IDgroupEntries
- the group entries as received from southboundvoid notifyOfFailovers(java.util.Collection<Group> failoverGroups)
failoverGroups
- groups to notify