Class DistributedHostStore

  • All Implemented Interfaces:
    org.onosproject.net.host.HostStore, org.onosproject.store.Store<org.onosproject.net.host.HostEvent,​org.onosproject.net.host.HostStoreDelegate>

    public class DistributedHostStore
    extends org.onosproject.store.AbstractStore<org.onosproject.net.host.HostEvent,​org.onosproject.net.host.HostStoreDelegate>
    implements org.onosproject.net.host.HostStore
    Manages the inventory of hosts using a EventuallyConsistentMap.
    • 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
      void activate()  
      void appendLocation​(org.onosproject.net.HostId hostId, org.onosproject.net.HostLocation location)  
      org.onosproject.net.host.HostEvent createOrUpdateHost​(org.onosproject.net.provider.ProviderId providerId, org.onosproject.net.HostId hostId, org.onosproject.net.host.HostDescription hostDescription, boolean replaceIPs)  
      void deactivate()  
      java.util.Set<org.onosproject.net.Host> getConnectedHosts​(org.onosproject.net.ConnectPoint connectPoint)  
      java.util.Set<org.onosproject.net.Host> getConnectedHosts​(org.onosproject.net.ConnectPoint connectPoint, boolean matchAuxLocations)  
      java.util.Set<org.onosproject.net.Host> getConnectedHosts​(org.onosproject.net.DeviceId deviceId)  
      org.onosproject.net.Host getHost​(org.onosproject.net.HostId hostId)  
      int getHostCount()  
      java.lang.Iterable<org.onosproject.net.Host> getHosts()  
      java.util.Set<org.onosproject.net.Host> getHosts​(org.onlab.packet.IpAddress ip)  
      java.util.Set<org.onosproject.net.Host> getHosts​(org.onlab.packet.MacAddress mac)  
      java.util.Set<org.onosproject.net.Host> getHosts​(org.onlab.packet.VlanId vlanId)  
      org.onosproject.net.host.HostEvent removeHost​(org.onosproject.net.HostId hostId)  
      org.onosproject.net.host.HostEvent removeIp​(org.onosproject.net.HostId hostId, org.onlab.packet.IpAddress ipAddress)  
      void removeLocation​(org.onosproject.net.HostId hostId, org.onosproject.net.HostLocation location)  
      void suspend​(org.onosproject.net.HostId hostId)  
      void unsuspend​(org.onosproject.net.HostId hostId)  
      • 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.net.host.HostStore

        addPendingHostLocation, removePendingHostLocation
      • Methods inherited from interface org.onosproject.store.Store

        hasDelegate, setDelegate, unsetDelegate
    • Field Detail

      • storageService

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

      • DistributedHostStore

        public DistributedHostStore()
    • Method Detail

      • activate

        public void activate()
      • deactivate

        public void deactivate()
      • createOrUpdateHost

        public org.onosproject.net.host.HostEvent createOrUpdateHost​(org.onosproject.net.provider.ProviderId providerId,
                                                                     org.onosproject.net.HostId hostId,
                                                                     org.onosproject.net.host.HostDescription hostDescription,
                                                                     boolean replaceIPs)
        Specified by:
        createOrUpdateHost in interface org.onosproject.net.host.HostStore
      • removeHost

        public org.onosproject.net.host.HostEvent removeHost​(org.onosproject.net.HostId hostId)
        Specified by:
        removeHost in interface org.onosproject.net.host.HostStore
      • removeIp

        public org.onosproject.net.host.HostEvent removeIp​(org.onosproject.net.HostId hostId,
                                                           org.onlab.packet.IpAddress ipAddress)
        Specified by:
        removeIp in interface org.onosproject.net.host.HostStore
      • appendLocation

        public void appendLocation​(org.onosproject.net.HostId hostId,
                                   org.onosproject.net.HostLocation location)
        Specified by:
        appendLocation in interface org.onosproject.net.host.HostStore
      • removeLocation

        public void removeLocation​(org.onosproject.net.HostId hostId,
                                   org.onosproject.net.HostLocation location)
        Specified by:
        removeLocation in interface org.onosproject.net.host.HostStore
      • getHostCount

        public int getHostCount()
        Specified by:
        getHostCount in interface org.onosproject.net.host.HostStore
      • getHosts

        public java.lang.Iterable<org.onosproject.net.Host> getHosts()
        Specified by:
        getHosts in interface org.onosproject.net.host.HostStore
      • getHost

        public org.onosproject.net.Host getHost​(org.onosproject.net.HostId hostId)
        Specified by:
        getHost in interface org.onosproject.net.host.HostStore
      • getHosts

        public java.util.Set<org.onosproject.net.Host> getHosts​(org.onlab.packet.VlanId vlanId)
        Specified by:
        getHosts in interface org.onosproject.net.host.HostStore
      • getHosts

        public java.util.Set<org.onosproject.net.Host> getHosts​(org.onlab.packet.MacAddress mac)
        Specified by:
        getHosts in interface org.onosproject.net.host.HostStore
      • getHosts

        public java.util.Set<org.onosproject.net.Host> getHosts​(org.onlab.packet.IpAddress ip)
        Specified by:
        getHosts in interface org.onosproject.net.host.HostStore
      • getConnectedHosts

        public java.util.Set<org.onosproject.net.Host> getConnectedHosts​(org.onosproject.net.ConnectPoint connectPoint)
        Specified by:
        getConnectedHosts in interface org.onosproject.net.host.HostStore
      • getConnectedHosts

        public java.util.Set<org.onosproject.net.Host> getConnectedHosts​(org.onosproject.net.ConnectPoint connectPoint,
                                                                         boolean matchAuxLocations)
        Specified by:
        getConnectedHosts in interface org.onosproject.net.host.HostStore
      • getConnectedHosts

        public java.util.Set<org.onosproject.net.Host> getConnectedHosts​(org.onosproject.net.DeviceId deviceId)
        Specified by:
        getConnectedHosts in interface org.onosproject.net.host.HostStore
      • suspend

        public void suspend​(org.onosproject.net.HostId hostId)
        Specified by:
        suspend in interface org.onosproject.net.host.HostStore
      • unsuspend

        public void unsuspend​(org.onosproject.net.HostId hostId)
        Specified by:
        unsuspend in interface org.onosproject.net.host.HostStore