Class HwvtepPhysicalSwitchListener

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.util.EventListener, org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation>, org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation>, org.opendaylight.serviceutils.srm.RecoverableListener, org.opendaylight.serviceutils.tools.mdsal.listener.ChainableDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation>

    @Singleton
    public class HwvtepPhysicalSwitchListener
    extends org.opendaylight.genius.datastoreutils.hwvtep.HwvtepAbstractDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,​HwvtepPhysicalSwitchListener>
    implements org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation>, org.opendaylight.serviceutils.srm.RecoverableListener
    Listener to handle physical switch updates.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase

        org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase.DataTreeChangeHandler
    • Field Summary

      • Fields inherited from class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase

        clazz
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void added​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> identifier, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchAdded)  
      void deregisterListener()  
      protected HwvtepPhysicalSwitchListener getDataTreeChangeListener()  
      protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> getWildCardPath()  
      void init()  
      void registerListener()  
      protected void removed​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> identifier, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchDeleted)  
      protected void updated​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> identifier, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchBefore, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchAfter)
      Upon update checks if the tunnels Ip was null earlier and it got newly added.
      • Methods inherited from class org.opendaylight.genius.datastoreutils.hwvtep.HwvtepAbstractDataTreeChangeListener

        add, remove, update
      • Methods inherited from class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase

        addAfterListener, addBeforeListener, close, onDataTreeChanged, registerListener
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener

        onDataTreeChanged
    • Constructor Detail

      • HwvtepPhysicalSwitchListener

        @Inject
        public HwvtepPhysicalSwitchListener​(L2GatewayServiceRecoveryHandler l2GatewayServiceRecoveryHandler,
                                            org.opendaylight.serviceutils.srm.ServiceRecoveryRegistry serviceRecoveryRegistry,
                                            org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker,
                                            org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService,
                                            ElanClusterUtils elanClusterUtils,
                                            L2gwServiceProvider l2gwServiceProvider,
                                            HAOpClusteredListener haListener,
                                            L2GatewayCache l2GatewayCache,
                                            StaleVlanBindingsCleaner staleVlanBindingsCleaner,
                                            org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache hwvtepNodeHACache)
        Instantiates a new hwvtep physical switch listener.
    • Method Detail

      • init

        @PostConstruct
        public void init()
        Overrides:
        init in class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,​HwvtepPhysicalSwitchListener>
      • registerListener

        public void registerListener()
        Specified by:
        registerListener in interface org.opendaylight.serviceutils.srm.RecoverableListener
      • deregisterListener

        public void deregisterListener()
        Specified by:
        deregisterListener in interface org.opendaylight.serviceutils.srm.RecoverableListener
        Overrides:
        deregisterListener in class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,​HwvtepPhysicalSwitchListener>
      • getWildCardPath

        protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> getWildCardPath()
        Specified by:
        getWildCardPath in class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,​HwvtepPhysicalSwitchListener>
      • getDataTreeChangeListener

        protected HwvtepPhysicalSwitchListener getDataTreeChangeListener()
        Specified by:
        getDataTreeChangeListener in class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,​HwvtepPhysicalSwitchListener>
      • removed

        protected void removed​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> identifier,
                               org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchDeleted)
        Specified by:
        removed in class org.opendaylight.genius.datastoreutils.hwvtep.HwvtepAbstractDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,​HwvtepPhysicalSwitchListener>
      • updated

        protected void updated​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> identifier,
                               org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchBefore,
                               org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchAfter)
        Upon update checks if the tunnels Ip was null earlier and it got newly added. In that case simply call add. If not then check if Tunnel Ip has been updated from an old value to new value. If yes. delete old ITM tunnels of odl Tunnel Ipand add new ITM tunnels with new Tunnel IP then call added ().
        Specified by:
        updated in class org.opendaylight.genius.datastoreutils.hwvtep.HwvtepAbstractDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,​HwvtepPhysicalSwitchListener>
        Parameters:
        identifier - iid
        phySwitchBefore - ps Node before update
        phySwitchAfter - ps Node after update
      • added

        protected void added​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> identifier,
                             org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchAdded)
        Specified by:
        added in class org.opendaylight.genius.datastoreutils.hwvtep.HwvtepAbstractDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,​HwvtepPhysicalSwitchListener>