public interface GroupService extends ListenerService<GroupEvent,GroupListener>
Modifier and Type | Method and Description |
---|---|
void |
addBucketsToGroup(DeviceId deviceId,
GroupKey oldCookie,
GroupBuckets buckets,
GroupKey newCookie,
ApplicationId appId)
Appends buckets to existing group.
|
void |
addGroup(GroupDescription groupDesc)
Creates a group in the specified device with the provided buckets.
|
Group |
getGroup(DeviceId deviceId,
GroupKey appCookie)
Returns a group object associated to an application cookie.
|
java.lang.Iterable<Group> |
getGroups(DeviceId deviceId)
Returns all groups associated with the given device.
|
java.lang.Iterable<Group> |
getGroups(DeviceId deviceId,
ApplicationId appId)
Retrieves all groups created by an application in the specified device
as seen by current controller instance.
|
default void |
purgeGroupEntries()
Purges all group entries.
|
void |
purgeGroupEntries(DeviceId deviceId)
Purges all the group entries on the specified device.
|
void |
removeBucketsFromGroup(DeviceId deviceId,
GroupKey oldCookie,
GroupBuckets buckets,
GroupKey newCookie,
ApplicationId appId)
Removes buckets from existing group.
|
void |
removeGroup(DeviceId deviceId,
GroupKey appCookie,
ApplicationId appId)
Deletes a group associated to an application cookie.
|
default void |
setBucketsForGroup(DeviceId deviceId,
GroupKey oldCookie,
GroupBuckets buckets,
GroupKey newCookie,
ApplicationId appId)
Set buckets for an existing group.
|
addListener, removeListener
void addGroup(GroupDescription groupDesc)
groupDesc
- group creation parametersGroup getGroup(DeviceId deviceId, GroupKey appCookie)
deviceId
- device identifierappCookie
- application cookie to be used for lookupvoid addBucketsToGroup(DeviceId deviceId, GroupKey oldCookie, GroupBuckets buckets, GroupKey newCookie, ApplicationId appId)
deviceId
- device identifieroldCookie
- cookie to be used to retrieve the existing groupbuckets
- immutable list of group bucket to be addednewCookie
- immutable cookie to be used post update operationappId
- Application Idvoid removeBucketsFromGroup(DeviceId deviceId, GroupKey oldCookie, GroupBuckets buckets, GroupKey newCookie, ApplicationId appId)
deviceId
- device identifieroldCookie
- cookie to be used to retrieve the existing groupbuckets
- immutable list of group bucket to be removednewCookie
- immutable cookie to be used post update operationappId
- Application Iddefault void setBucketsForGroup(DeviceId deviceId, GroupKey oldCookie, GroupBuckets buckets, GroupKey newCookie, ApplicationId appId)
deviceId
- device identifieroldCookie
- cookie to be used to retrieve the existing groupbuckets
- immutable list of group buckets to be setnewCookie
- immutable cookie to be used post update operationappId
- Application Idvoid purgeGroupEntries(DeviceId deviceId)
deviceId
- device identifierdefault void purgeGroupEntries()
void removeGroup(DeviceId deviceId, GroupKey appCookie, ApplicationId appId)
deviceId
- device identifierappCookie
- application cookie to be used for lookupappId
- Application Idjava.lang.Iterable<Group> getGroups(DeviceId deviceId, ApplicationId appId)
deviceId
- device identifierappId
- application id