@Singleton public class NatSwitchCacheImpl extends Object implements NatSwitchCache
Constructor and Description |
---|
NatSwitchCacheImpl(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker) |
Modifier and Type | Method and Description |
---|---|
void |
addSwitch(BigInteger dpnId)
Adds a switch to the scheduler pool.
|
void |
deregister(NatSwitchCacheListener centralizedSwitchCacheListener)
Register for switch removed notification.
|
Map<BigInteger,SwitchInfo> |
getSwitches()
Return the switches map with weight.
|
Set<BigInteger> |
getSwitchesConnectedToExternal(String providerNet)
Return the switches which has external bridge mappings.
|
boolean |
isSwitchConnectedToExternal(BigInteger dpnId,
String providerNet)
Check whether the switch has external bridge mappings.
|
void |
register(NatSwitchCacheListener centralizedSwitchCacheListener)
Register for switch added notification.
|
void |
removeSwitch(BigInteger dpnId)
Removes a switch from the scheduler pool.
|
@Inject public NatSwitchCacheImpl(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker)
public void addSwitch(BigInteger dpnId)
NatSwitchCache
addSwitch
in interface NatSwitchCache
dpnId
- the switch id.public void removeSwitch(BigInteger dpnId)
NatSwitchCache
removeSwitch
in interface NatSwitchCache
dpnId
- the switch id.public boolean isSwitchConnectedToExternal(BigInteger dpnId, String providerNet)
NatSwitchCache
isSwitchConnectedToExternal
in interface NatSwitchCache
dpnId
- the switch id.providerNet
- the provider network.public Set<BigInteger> getSwitchesConnectedToExternal(String providerNet)
NatSwitchCache
getSwitchesConnectedToExternal
in interface NatSwitchCache
providerNet
- the provider network.public void register(NatSwitchCacheListener centralizedSwitchCacheListener)
NatSwitchCache
register
in interface NatSwitchCache
centralizedSwitchCacheListener
- the instance of a listenerpublic void deregister(NatSwitchCacheListener centralizedSwitchCacheListener)
NatSwitchCache
deregister
in interface NatSwitchCache
centralizedSwitchCacheListener
- the instance of a listenerpublic Map<BigInteger,SwitchInfo> getSwitches()
NatSwitchCache
getSwitches
in interface NatSwitchCache
Copyright © 2019 OpenDaylight. All rights reserved.