@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)
CentralizedSwitchSchedulerscheduleCentralizedSwitch in interface CentralizedSwitchSchedulerrouter - the external router.public boolean updateCentralizedSwitch(Routers oldRouter, Routers newRouter)
CentralizedSwitchSchedulerupdateCentralizedSwitch in interface CentralizedSwitchScheduleroldRouter - the existing external router.newRouter - the new external router.public boolean releaseCentralizedSwitch(Routers router)
CentralizedSwitchSchedulerreleaseCentralizedSwitch in interface CentralizedSwitchSchedulerrouter - the external router.public void switchAddedToCache(SwitchInfo switchInfo)
NatSwitchCacheListenerswitchAddedToCache in interface NatSwitchCacheListenerswitchInfo - the switch details.public void switchRemovedFromCache(SwitchInfo switchInfo)
NatSwitchCacheListenerswitchRemovedFromCache in interface NatSwitchCacheListenerswitchInfo - the switch details.@Nullable public BigInteger getCentralizedSwitch(String routerName)
CentralizedSwitchSchedulergetCentralizedSwitch in interface CentralizedSwitchSchedulerrouterName - the router name.Copyright © 2019 OpenDaylight. All rights reserved.