Class CentralizedSwitchChangeListener
- java.lang.Object
-
- org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<RouterToNaptSwitch,CentralizedSwitchChangeListener>
-
- org.opendaylight.netvirt.vpnmanager.CentralizedSwitchChangeListener
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.util.EventListener
,org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener<RouterToNaptSwitch>
,org.opendaylight.serviceutils.tools.mdsal.listener.ChainableDataTreeChangeListener<RouterToNaptSwitch>
@Singleton public class CentralizedSwitchChangeListener extends org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<RouterToNaptSwitch,CentralizedSwitchChangeListener>
CentralizedSwitchChangeListener detect changes in switch:router mapping and update flows accordingly.
The centralized switch a.k.a NAPT switch is currently defined using models residing in natservice bundle. As the roles of centralized switch will grow beyond NAT use cases, the associated models and logic need to be renamed and moved to either vpnmanager or new bundle as part of Carbon model changes
-
-
Constructor Summary
Constructors Constructor Description CentralizedSwitchChangeListener(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, IVpnManager vpnManager, ExternalRouterDataUtil externalRouterDataUtil, VpnUtil vpnUtil)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
add(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<RouterToNaptSwitch> key, RouterToNaptSwitch routerToNaptSwitch)
protected CentralizedSwitchChangeListener
getDataTreeChangeListener()
protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<RouterToNaptSwitch>
getWildCardPath()
void
init()
protected void
remove(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<RouterToNaptSwitch> key, RouterToNaptSwitch routerToNaptSwitch)
protected void
update(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<RouterToNaptSwitch> key, RouterToNaptSwitch origRouterToNaptSwitch, RouterToNaptSwitch updatedRouterToNaptSwitch)
-
-
-
Constructor Detail
-
CentralizedSwitchChangeListener
@Inject public CentralizedSwitchChangeListener(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, IVpnManager vpnManager, ExternalRouterDataUtil externalRouterDataUtil, VpnUtil vpnUtil)
-
-
Method Detail
-
init
@PostConstruct public void init()
- Overrides:
init
in classorg.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<RouterToNaptSwitch,CentralizedSwitchChangeListener>
-
getWildCardPath
protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<RouterToNaptSwitch> getWildCardPath()
- Specified by:
getWildCardPath
in classorg.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<RouterToNaptSwitch,CentralizedSwitchChangeListener>
-
remove
protected void remove(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<RouterToNaptSwitch> key, RouterToNaptSwitch routerToNaptSwitch)
- Specified by:
remove
in classorg.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<RouterToNaptSwitch,CentralizedSwitchChangeListener>
-
update
protected void update(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<RouterToNaptSwitch> key, RouterToNaptSwitch origRouterToNaptSwitch, RouterToNaptSwitch updatedRouterToNaptSwitch)
- Specified by:
update
in classorg.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<RouterToNaptSwitch,CentralizedSwitchChangeListener>
-
add
protected void add(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<RouterToNaptSwitch> key, RouterToNaptSwitch routerToNaptSwitch)
- Specified by:
add
in classorg.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<RouterToNaptSwitch,CentralizedSwitchChangeListener>
-
getDataTreeChangeListener
protected CentralizedSwitchChangeListener getDataTreeChangeListener()
- Specified by:
getDataTreeChangeListener
in classorg.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<RouterToNaptSwitch,CentralizedSwitchChangeListener>
-
-