import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
+import java.util.concurrent.locks.ReentrantLock;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.opendaylight.genius.mdsalutil.instructions.InstructionWriteMetadata;
import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
import org.opendaylight.genius.mdsalutil.matches.MatchTunnelId;
+import org.opendaylight.genius.utils.JvmGlobalLocks;
import org.opendaylight.genius.utils.SystemPropertyReader;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
this.vpnName, primaryRd);
return false;
}
- synchronized (vpnName.intern()) {
+ // FIXME: separate out to somehow?
+ final ReentrantLock lock = JvmGlobalLocks.getLockForString(vpnName);
+ lock.lock();
+ try {
fibManager.addVrfTable(primaryRd, null);
+ } finally {
+ lock.unlock();
}
vpnInterfaceManager.handleVpnsExportingRoutes(this.vpnName, primaryRd);
return true;