@Singleton public class WeightedCentralizedSwitchScheduler extends Object implements CentralizedSwitchScheduler, NatSwitchCacheListener
Constructor and Description |
---|
WeightedCentralizedSwitchScheduler(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker,
org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService interfaceManager,
IVpnFootprintService vpnFootprintService,
NatserviceConfig config,
NatSwitchCache natSwitchCache) |
Modifier and Type | Method and Description |
---|---|
BigInteger |
getCentralizedSwitch(String routerName)
Retrieves the centralized switch scheduled for the router.
|
boolean |
releaseCentralizedSwitch(Routers router)
Releases the centralized switch scheduled for the router.
|
boolean |
scheduleCentralizedSwitch(Routers router)
Schedule the centralized switch for the router.
|
void |
switchAddedToCache(SwitchInfo switchInfo)
Switch is added.
|
void |
switchRemovedFromCache(SwitchInfo switchInfo)
Switch is removed.
|
boolean |
updateCentralizedSwitch(Routers oldRouter,
Routers newRouter)
Update the centralized switch scheduled for the router.
|
@Inject public WeightedCentralizedSwitchScheduler(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService interfaceManager, IVpnFootprintService vpnFootprintService, NatserviceConfig config, NatSwitchCache natSwitchCache)
public boolean scheduleCentralizedSwitch(Routers router)
CentralizedSwitchScheduler
scheduleCentralizedSwitch
in interface CentralizedSwitchScheduler
router
- the external router.public boolean updateCentralizedSwitch(Routers oldRouter, Routers newRouter)
CentralizedSwitchScheduler
updateCentralizedSwitch
in interface CentralizedSwitchScheduler
oldRouter
- the existing external router.newRouter
- the new external router.public boolean releaseCentralizedSwitch(Routers router)
CentralizedSwitchScheduler
releaseCentralizedSwitch
in interface CentralizedSwitchScheduler
router
- the external router.public void switchAddedToCache(SwitchInfo switchInfo)
NatSwitchCacheListener
switchAddedToCache
in interface NatSwitchCacheListener
switchInfo
- the switch details.public void switchRemovedFromCache(SwitchInfo switchInfo)
NatSwitchCacheListener
switchRemovedFromCache
in interface NatSwitchCacheListener
switchInfo
- the switch details.@Nullable public BigInteger getCentralizedSwitch(String routerName)
CentralizedSwitchScheduler
getCentralizedSwitch
in interface CentralizedSwitchScheduler
routerName
- the router name.Copyright © 2019 OpenDaylight. All rights reserved.