Class NatSwitchCacheImpl
- java.lang.Object
-
- org.opendaylight.netvirt.natservice.ha.NatSwitchCacheImpl
-
- All Implemented Interfaces:
NatSwitchCache
@Singleton public class NatSwitchCacheImpl extends java.lang.Object implements NatSwitchCache
-
-
Constructor Summary
Constructors Constructor Description NatSwitchCacheImpl(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSwitch(org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Adds a switch to the scheduler pool.java.util.Set<org.opendaylight.yangtools.yang.common.Uint64>
getSwitchesConnectedToExternal(java.lang.String providerNet)
Return the switches which has external bridge mappings.boolean
isSwitchConnectedToExternal(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String providerNet)
Check whether the switch has external bridge mappings.void
register(NatSwitchCacheListener centralizedSwitchCacheListener)
Register for switch added notification.void
removeSwitch(org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Removes a switch from the scheduler pool.
-
-
-
Method Detail
-
addSwitch
public void addSwitch(org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Description copied from interface:NatSwitchCache
Adds a switch to the scheduler pool.- Specified by:
addSwitch
in interfaceNatSwitchCache
- Parameters:
dpnId
- the switch id.
-
removeSwitch
public void removeSwitch(org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Description copied from interface:NatSwitchCache
Removes a switch from the scheduler pool.- Specified by:
removeSwitch
in interfaceNatSwitchCache
- Parameters:
dpnId
- the switch id.
-
isSwitchConnectedToExternal
public boolean isSwitchConnectedToExternal(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String providerNet)
Description copied from interface:NatSwitchCache
Check whether the switch has external bridge mappings.- Specified by:
isSwitchConnectedToExternal
in interfaceNatSwitchCache
- Parameters:
dpnId
- the switch id.providerNet
- the provider network.- Returns:
- whether connected to provider network or not.
-
getSwitchesConnectedToExternal
public java.util.Set<org.opendaylight.yangtools.yang.common.Uint64> getSwitchesConnectedToExternal(java.lang.String providerNet)
Description copied from interface:NatSwitchCache
Return the switches which has external bridge mappings.- Specified by:
getSwitchesConnectedToExternal
in interfaceNatSwitchCache
- Parameters:
providerNet
- the provider network.- Returns:
- the set of switches which has the mapping
-
register
public void register(NatSwitchCacheListener centralizedSwitchCacheListener)
Description copied from interface:NatSwitchCache
Register for switch added notification.- Specified by:
register
in interfaceNatSwitchCache
- Parameters:
centralizedSwitchCacheListener
- the instance of a listener
-
-