package org.opendaylight.controller.md.sal.common.impl.util;
import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
private final ReentrantReadWriteLock delegateLock = new ReentrantReadWriteLock();
private final ReadLock delegateReadLock = delegateLock.readLock();
private final WriteLock delegateWriteLock = delegateLock.writeLock();
-
-
+
+
protected Lock getDelegateReadLock() {
return delegateReadLock;
}
}
/**
- *
+ *
* @param newDelegate
* @return oldDelegate
*/
delegateWriteLock.unlock();
}
}
-
-
+
+
protected void onDelegateChanged(T oldDelegate, T newDelegate) {
// NOOP in abstract calss;
}