public boolean tryLock() { return ManagerUtil.tryMonitorEnter(lock, Manager.LOCK_TYPE_READ); } }
public boolean tryLock() { if (CacheConfigFactory.DSO_ACTIVE) { return ManagerUtil.tryMonitorEnter(this, Manager.LOCK_TYPE_WRITE); } synchronized (this) { if (locked) return false; locked = true; owner = Thread.currentThread(); return true; } }
public boolean tryLock() { if (Terracotta.isActive()) { return ManagerUtil.tryMonitorEnter(this, Manager.LOCK_TYPE_WRITE); } synchronized (this) { if (locked) return false; locked = true; owner = Thread.currentThread(); return true; } }
public boolean tryLock() { if (Terracotta.isActive()) { return ManagerUtil.tryMonitorEnter(this, Manager.LOCK_TYPE_WRITE); } synchronized (this) { if (locked) return false; locked = true; owner = Thread.currentThread(); return true; } }
public boolean tryLock() { if (Terracotta.isActive()) { return ManagerUtil.tryMonitorEnter(this, Manager.LOCK_TYPE_WRITE); } synchronized (this) { if (locked) return false; locked = true; owner = Thread.currentThread(); return true; } }
public boolean tryLock(int timeout, TimeUnit unit) throws InterruptedException { long timeoutInNanos = TimeUnit.NANOSECONDS.convert(timeout, unit); return ManagerUtil.tryMonitorEnter(lock, getLockType(), timeoutInNanos); }
public boolean tryLock() { if (ManagerUtil.isManaged(lock)) { try { boolean locked = ManagerUtil.tryMonitorEnter(lock, lockLevel); if (locked) lock.locked(); return locked; } catch (Error e) { if (!"com.tc.exception.TCLockUpgradeNotSupportedError".equals(e.getClass().getName())) { throw e; } return false; } } else { return true; } }
public boolean tryLock() { return ManagerUtil.tryMonitorEnter(lock, getLockType()); }
public boolean tryLock() { if (ManagerUtil.isManaged(lock)) { try { boolean locked = ManagerUtil.tryMonitorEnter(lock, lockLevel); if (locked) lock.locked(); return locked; } catch (Error e) { if (!"com.tc.exception.TCLockUpgradeNotSupportedError".equals(e.getClass().getName())) { throw e; } return false; } } else { return true; } }
public boolean tryLock() { if (ManagerUtil.isManaged(lock)) { try { return ManagerUtil.tryMonitorEnter(lock, lockLevel); } catch (Error e) { if (!"com.tc.exception.TCLockUpgradeNotSupportedError".equals(e.getClass().getName())) { throw e; } return false; } } else { return true; } }
public boolean tryLock(long timeout, TimeUnit unit) throws InterruptedException { if (ManagerUtil.isManaged(lock)) { long timeoutInNanos = TimeUnit.NANOSECONDS.convert(timeout, unit); try { boolean locked = ManagerUtil.tryMonitorEnter(lock, lockLevel, timeoutInNanos); if (locked) lock.locked(); return locked; } catch (Error e) { if (!"com.tc.exception.TCLockUpgradeNotSupportedError".equals(e.getClass().getName())) { throw e; } unit.sleep(timeout); return false; } } else { return true; } }
public boolean tryLock(long timeout, TimeUnit unit) throws InterruptedException { if (ManagerUtil.isManaged(lock)) { long timeoutInNanos = TimeUnit.NANOSECONDS.convert(timeout, unit); try { boolean locked = ManagerUtil.tryMonitorEnter(lock, lockLevel, timeoutInNanos); if (locked) lock.locked(); return locked; } catch (Error e) { if (!"com.tc.exception.TCLockUpgradeNotSupportedError".equals(e.getClass().getName())) { throw e; } unit.sleep(timeout); return false; } } else { return true; } }
public boolean tryLock(long timeout, TimeUnit unit) throws InterruptedException { if (ManagerUtil.isManaged(lock)) { long timeoutInNanos = TimeUnit.NANOSECONDS.convert(timeout, unit); try { return ManagerUtil.tryMonitorEnter(lock, lockLevel, timeoutInNanos); } catch (Error e) { if (!"com.tc.exception.TCLockUpgradeNotSupportedError".equals(e.getClass().getName())) { throw e; } unit.sleep(timeout); return false; } } else { return true; } }