Class DistributedRegionStore

  • All Implemented Interfaces:
    org.onosproject.net.region.RegionStore, org.onosproject.store.Store<org.onosproject.net.region.RegionEvent,​org.onosproject.net.region.RegionStoreDelegate>

    public class DistributedRegionStore
    extends org.onosproject.store.AbstractStore<org.onosproject.net.region.RegionEvent,​org.onosproject.net.region.RegionStoreDelegate>
    implements org.onosproject.net.region.RegionStore
    Consistent store implementation for tracking region definitions and device region affiliation.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.onosproject.store.service.StorageService storageService  
      • Fields inherited from class org.onosproject.store.AbstractStore

        delegate
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void activate()  
      void addDevices​(org.onosproject.net.region.RegionId regionId, java.util.Collection<org.onosproject.net.DeviceId> deviceIds)  
      org.onosproject.net.region.Region createRegion​(org.onosproject.net.region.RegionId regionId, java.lang.String name, org.onosproject.net.region.Region.Type type, org.onosproject.net.Annotations annots, java.util.List<java.util.Set<org.onosproject.cluster.NodeId>> masterNodeIds)  
      protected void deactivate()  
      org.onosproject.net.region.Region getRegion​(org.onosproject.net.region.RegionId regionId)  
      java.util.Set<org.onosproject.net.DeviceId> getRegionDevices​(org.onosproject.net.region.RegionId regionId)  
      org.onosproject.net.region.Region getRegionForDevice​(org.onosproject.net.DeviceId deviceId)  
      java.util.Set<org.onosproject.net.region.Region> getRegions()  
      void removeDevices​(org.onosproject.net.region.RegionId regionId, java.util.Collection<org.onosproject.net.DeviceId> deviceIds)  
      void removeRegion​(org.onosproject.net.region.RegionId regionId)  
      org.onosproject.net.region.Region updateRegion​(org.onosproject.net.region.RegionId regionId, java.lang.String name, org.onosproject.net.region.Region.Type type, org.onosproject.net.Annotations annots, java.util.List<java.util.Set<org.onosproject.cluster.NodeId>> masterNodeIds)  
      • Methods inherited from class org.onosproject.store.AbstractStore

        hasDelegate, notifyDelegate, notifyDelegate, setDelegate, unsetDelegate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.onosproject.store.Store

        hasDelegate, setDelegate, unsetDelegate
    • Field Detail

      • storageService

        protected org.onosproject.store.service.StorageService storageService
    • Constructor Detail

      • DistributedRegionStore

        public DistributedRegionStore()
    • Method Detail

      • activate

        protected void activate()
      • deactivate

        protected void deactivate()
      • getRegions

        public java.util.Set<org.onosproject.net.region.Region> getRegions()
        Specified by:
        getRegions in interface org.onosproject.net.region.RegionStore
      • getRegion

        public org.onosproject.net.region.Region getRegion​(org.onosproject.net.region.RegionId regionId)
        Specified by:
        getRegion in interface org.onosproject.net.region.RegionStore
      • getRegionForDevice

        public org.onosproject.net.region.Region getRegionForDevice​(org.onosproject.net.DeviceId deviceId)
        Specified by:
        getRegionForDevice in interface org.onosproject.net.region.RegionStore
      • getRegionDevices

        public java.util.Set<org.onosproject.net.DeviceId> getRegionDevices​(org.onosproject.net.region.RegionId regionId)
        Specified by:
        getRegionDevices in interface org.onosproject.net.region.RegionStore
      • createRegion

        public org.onosproject.net.region.Region createRegion​(org.onosproject.net.region.RegionId regionId,
                                                              java.lang.String name,
                                                              org.onosproject.net.region.Region.Type type,
                                                              org.onosproject.net.Annotations annots,
                                                              java.util.List<java.util.Set<org.onosproject.cluster.NodeId>> masterNodeIds)
        Specified by:
        createRegion in interface org.onosproject.net.region.RegionStore
      • updateRegion

        public org.onosproject.net.region.Region updateRegion​(org.onosproject.net.region.RegionId regionId,
                                                              java.lang.String name,
                                                              org.onosproject.net.region.Region.Type type,
                                                              org.onosproject.net.Annotations annots,
                                                              java.util.List<java.util.Set<org.onosproject.cluster.NodeId>> masterNodeIds)
        Specified by:
        updateRegion in interface org.onosproject.net.region.RegionStore
      • removeRegion

        public void removeRegion​(org.onosproject.net.region.RegionId regionId)
        Specified by:
        removeRegion in interface org.onosproject.net.region.RegionStore
      • addDevices

        public void addDevices​(org.onosproject.net.region.RegionId regionId,
                               java.util.Collection<org.onosproject.net.DeviceId> deviceIds)
        Specified by:
        addDevices in interface org.onosproject.net.region.RegionStore
      • removeDevices

        public void removeDevices​(org.onosproject.net.region.RegionId regionId,
                                  java.util.Collection<org.onosproject.net.DeviceId> deviceIds)
        Specified by:
        removeDevices in interface org.onosproject.net.region.RegionStore