List of usage examples for com.google.common.util.concurrent Monitor tryEnter
public boolean tryEnter()
From source file:org.apache.marmotta.commons.locking.ObjectLocks.java
public boolean tryLock(Object name) { Monitor lock; synchronized (stringLocks) { lock = stringLocks.getUnchecked(name); }/*from w w w.ja v a 2s . c om*/ return lock.tryEnter(); }
From source file:clocker.docker.location.strategy.basic.GroupPlacementStrategy.java
@Override public boolean tryAcquireMutex(String mutexId, String description) { LOG.debug("Try to enter monitor {}: {}", mutexId, description); Monitor monitor = createMonitor(mutexId); return monitor.tryEnter(); }