Java 类com.google.common.util.concurrent.Monitor 实例源码

项目:marmotta    文件:ObjectLocks.java   
public void unlock(Object name) {
    Monitor lock;
    synchronized (stringLocks) {
        lock = stringLocks.getUnchecked(name);
    }
    lock.leave();
}
项目:marmotta    文件:ObjectLocks.java   
public boolean tryLock(Object name) {
    Monitor lock;
    synchronized (stringLocks) {
        lock = stringLocks.getUnchecked(name);
    }
    return lock.tryEnter();
}
项目:martini-jmeter-extension    文件:MartiniPreProcessor.java   
@Override
public void testStarted() {
    monitor = new Monitor();
    ref = new AtomicReference<>();
}
项目:marmotta    文件:ObjectLocks.java   
@Override
public Monitor load(Object key) throws Exception {
    return new Monitor();
}