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.mdsal.binding.api.DataBroker dataBroker) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSwitch(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.booleanisSwitchConnectedToExternal(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String providerNet)Check whether the switch has external bridge mappings.voidregister(NatSwitchCacheListener centralizedSwitchCacheListener)Register for switch added notification.voidremoveSwitch(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:NatSwitchCacheAdds a switch to the scheduler pool.- Specified by:
 addSwitchin interfaceNatSwitchCache- Parameters:
 dpnId- the switch id.
 
- 
removeSwitch
public void removeSwitch(org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Description copied from interface:NatSwitchCacheRemoves a switch from the scheduler pool.- Specified by:
 removeSwitchin 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:NatSwitchCacheCheck whether the switch has external bridge mappings.- Specified by:
 isSwitchConnectedToExternalin 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:NatSwitchCacheReturn the switches which has external bridge mappings.- Specified by:
 getSwitchesConnectedToExternalin 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:NatSwitchCacheRegister for switch added notification.- Specified by:
 registerin interfaceNatSwitchCache- Parameters:
 centralizedSwitchCacheListener- the instance of a listener
 
 - 
 
 -