Class HwvtepPhysicalSwitchListener
- java.lang.Object
-
- org.opendaylight.serviceutils.tools.listener.AbstractAsyncDataTreeChangeListener<T>
-
- org.opendaylight.genius.datastoreutils.hwvtep.HwvtepAbstractDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,HwvtepPhysicalSwitchListener>
-
- org.opendaylight.netvirt.elan.l2gw.listeners.HwvtepPhysicalSwitchListener
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.util.EventListener
,org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation>
,org.opendaylight.mdsal.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.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.mdsal.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.
-
-
Constructor Summary
Constructors Constructor Description HwvtepPhysicalSwitchListener(L2GatewayServiceRecoveryHandler l2GatewayServiceRecoveryHandler, org.opendaylight.serviceutils.srm.ServiceRecoveryRegistry serviceRecoveryRegistry, org.opendaylight.mdsal.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, L2GwTransportZoneListener transportZoneListener)
Instantiates a new hwvtep physical switch listener.
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Deprecated Methods Modifier and Type Method Description void
add(T arg0)
Deprecated.void
addAfterListener(org.opendaylight.mdsal.binding.api.DataTreeChangeListener<T> arg0)
void
addBeforeListener(org.opendaylight.mdsal.binding.api.DataTreeChangeListener<T> arg0)
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
close()
void
deregisterListener()
protected org.opendaylight.mdsal.binding.api.DataBroker
getDataBroker()
protected org.opendaylight.serviceutils.tools.listener.DataStoreMetrics
getDataStoreMetrics()
void
init()
default void
onDataTreeChanged(java.util.Collection<org.opendaylight.mdsal.binding.api.DataTreeModification<T>> arg0, org.opendaylight.serviceutils.tools.listener.DataStoreMetrics arg1)
void
register()
void
registerListener()
void
remove(T arg0)
Deprecated.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)
void
update(T arg0, T arg1)
Deprecated.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.serviceutils.tools.listener.AbstractAsyncDataTreeChangeListener
getExecutorService, onDataTreeChanged
-
-
-
-
Constructor Detail
-
HwvtepPhysicalSwitchListener
@Inject public HwvtepPhysicalSwitchListener(L2GatewayServiceRecoveryHandler l2GatewayServiceRecoveryHandler, org.opendaylight.serviceutils.srm.ServiceRecoveryRegistry serviceRecoveryRegistry, org.opendaylight.mdsal.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, L2GwTransportZoneListener transportZoneListener)
Instantiates a new hwvtep physical switch listener.- Parameters:
l2GatewayServiceRecoveryHandler
- L2GatewayServiceRecoveryHandlerserviceRecoveryRegistry
- ServiceRecoveryRegistrydataBroker
- DataBrokeritmRpcService
- ItmRpcServiceelanClusterUtils
- ElanClusterUtilsl2gwServiceProvider
- L2gwServiceProviderhaListener
- HAOpClusteredListenerl2GatewayCache
- L2GatewayCachestaleVlanBindingsCleaner
- StaleVlanBindingsCleaner
-
-
Method Detail
-
init
@PostConstruct public void init()
-
register
public void register()
-
registerListener
public void registerListener()
- Specified by:
registerListener
in interfaceorg.opendaylight.serviceutils.srm.RecoverableListener
-
deregisterListener
public void deregisterListener()
- Specified by:
deregisterListener
in interfaceorg.opendaylight.serviceutils.srm.RecoverableListener
-
close
@PreDestroy public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
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 classorg.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 classorg.opendaylight.genius.datastoreutils.hwvtep.HwvtepAbstractDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,HwvtepPhysicalSwitchListener>
- Parameters:
identifier
- iidphySwitchBefore
- ps Node before updatephySwitchAfter
- 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 classorg.opendaylight.genius.datastoreutils.hwvtep.HwvtepAbstractDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,HwvtepPhysicalSwitchListener>
-
addBeforeListener
public void addBeforeListener(org.opendaylight.mdsal.binding.api.DataTreeChangeListener<T> arg0)
- Specified by:
addBeforeListener
in interfaceorg.opendaylight.serviceutils.tools.listener.ChainableDataTreeChangeListener<T extends org.opendaylight.yangtools.yang.binding.DataObject>
-
addAfterListener
public void addAfterListener(org.opendaylight.mdsal.binding.api.DataTreeChangeListener<T> arg0)
- Specified by:
addAfterListener
in interfaceorg.opendaylight.serviceutils.tools.listener.ChainableDataTreeChangeListener<T extends org.opendaylight.yangtools.yang.binding.DataObject>
-
getDataBroker
protected org.opendaylight.mdsal.binding.api.DataBroker getDataBroker()
-
getDataStoreMetrics
protected org.opendaylight.serviceutils.tools.listener.DataStoreMetrics getDataStoreMetrics()
-
add
@Deprecated public void add(T arg0)
Deprecated.
-
remove
@Deprecated public void remove(T arg0)
Deprecated.
-
update
@Deprecated public void update(T arg0, T arg1)
Deprecated.
-
onDataTreeChanged
public default void onDataTreeChanged(java.util.Collection<org.opendaylight.mdsal.binding.api.DataTreeModification<T>> arg0, org.opendaylight.serviceutils.tools.listener.DataStoreMetrics arg1)
-
-