@Service
public class GroupManager
extends org.onosproject.net.provider.AbstractListenerProviderRegistry<org.onosproject.net.group.GroupEvent,org.onosproject.net.group.GroupListener,org.onosproject.net.group.GroupProvider,org.onosproject.net.group.GroupProviderService>
implements org.onosproject.net.group.GroupService, org.onosproject.net.group.GroupProviderRegistry
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.cfg.ComponentConfigService |
cfgService |
protected org.onosproject.net.device.DeviceService |
deviceService |
protected org.onosproject.net.group.GroupStore |
store |
| Constructor and Description |
|---|
GroupManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(org.osgi.service.component.ComponentContext context) |
void |
addBucketsToGroup(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.group.GroupKey oldCookie,
org.onosproject.net.group.GroupBuckets buckets,
org.onosproject.net.group.GroupKey newCookie,
org.onosproject.core.ApplicationId appId)
Append buckets to existing group.
|
void |
addGroup(org.onosproject.net.group.GroupDescription groupDesc)
Create a group in the specified device with the provided parameters.
|
protected org.onosproject.net.group.GroupProviderService |
createProviderService(org.onosproject.net.group.GroupProvider provider) |
void |
deactivate() |
protected org.onosproject.net.group.GroupProvider |
defaultProvider() |
org.onosproject.net.group.Group |
getGroup(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.group.GroupKey appCookie)
Return a group object associated to an application cookie.
|
Iterable<org.onosproject.net.group.Group> |
getGroups(org.onosproject.net.DeviceId deviceId) |
Iterable<org.onosproject.net.group.Group> |
getGroups(org.onosproject.net.DeviceId deviceId,
org.onosproject.core.ApplicationId appId)
Retrieve all groups created by an application in the specified device
as seen by current controller instance.
|
void |
modified(org.osgi.service.component.ComponentContext context) |
void |
purgeGroupEntries(org.onosproject.net.DeviceId deviceId) |
void |
removeBucketsFromGroup(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.group.GroupKey oldCookie,
org.onosproject.net.group.GroupBuckets buckets,
org.onosproject.net.group.GroupKey newCookie,
org.onosproject.core.ApplicationId appId)
Remove buckets from existing group.
|
void |
removeGroup(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.group.GroupKey appCookie,
org.onosproject.core.ApplicationId appId)
Delete a group associated to an application cookie.
|
addListener, bindEventDispatcher, post, removeListener, unbindEventDispatchergetProvider, getProvider, getProvider, getProviders, register, unregister@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.net.group.GroupStore store
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.net.device.DeviceService deviceService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cfg.ComponentConfigService cfgService
@Activate public void activate(org.osgi.service.component.ComponentContext context)
@Deactivate public void deactivate()
@Modified public void modified(org.osgi.service.component.ComponentContext context)
protected org.onosproject.net.group.GroupProvider defaultProvider()
defaultProvider in class org.onosproject.net.provider.AbstractProviderRegistry<org.onosproject.net.group.GroupProvider,org.onosproject.net.group.GroupProviderService>public void addGroup(org.onosproject.net.group.GroupDescription groupDesc)
addGroup in interface org.onosproject.net.group.GroupServicegroupDesc - group creation parameterspublic org.onosproject.net.group.Group getGroup(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.group.GroupKey appCookie)
NOTE1: The presence of group object in the system does not guarantee that the "group" is actually created in device. GROUP_ADDED notification would confirm the creation of this group in data plane.
getGroup in interface org.onosproject.net.group.GroupServicedeviceId - device identifierappCookie - application cookie to be used for lookuppublic void addBucketsToGroup(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.group.GroupKey oldCookie,
org.onosproject.net.group.GroupBuckets buckets,
org.onosproject.net.group.GroupKey newCookie,
org.onosproject.core.ApplicationId appId)
addBucketsToGroup in interface org.onosproject.net.group.GroupServicedeviceId - 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 Idpublic void removeBucketsFromGroup(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.group.GroupKey oldCookie,
org.onosproject.net.group.GroupBuckets buckets,
org.onosproject.net.group.GroupKey newCookie,
org.onosproject.core.ApplicationId appId)
removeBucketsFromGroup in interface org.onosproject.net.group.GroupServicedeviceId - 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 Idpublic void purgeGroupEntries(org.onosproject.net.DeviceId deviceId)
purgeGroupEntries in interface org.onosproject.net.group.GroupServicepublic void removeGroup(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.group.GroupKey appCookie,
org.onosproject.core.ApplicationId appId)
removeGroup in interface org.onosproject.net.group.GroupServicedeviceId - device identifierappCookie - application cookie to be used for lookupappId - Application Idpublic Iterable<org.onosproject.net.group.Group> getGroups(org.onosproject.net.DeviceId deviceId, org.onosproject.core.ApplicationId appId)
getGroups in interface org.onosproject.net.group.GroupServicedeviceId - device identifierappId - application idpublic Iterable<org.onosproject.net.group.Group> getGroups(org.onosproject.net.DeviceId deviceId)
getGroups in interface org.onosproject.net.group.GroupServiceprotected org.onosproject.net.group.GroupProviderService createProviderService(org.onosproject.net.group.GroupProvider provider)
createProviderService in class org.onosproject.net.provider.AbstractProviderRegistry<org.onosproject.net.group.GroupProvider,org.onosproject.net.group.GroupProviderService>