@Override public Notify notify(final LockID lock, final Object waitObject) throws AbortedOperationException { if (clusteredLockingEnabled(lock) && (lock instanceof DsoLockID)) { this.txManager.notify(this.lockManager.notify(lock, waitObject)); } else { waitObject.notify(); } return NotifyImpl.NULL; }
@Override public Notify notifyAll(final LockID lock, final Object waitObject) throws AbortedOperationException { if (clusteredLockingEnabled(lock) && (lock instanceof DsoLockID)) { this.txManager.notify(this.lockManager.notifyAll(lock, waitObject)); } else { waitObject.notifyAll(); } return NotifyImpl.NULL; }
@Override public Notify notifyAll(final LockID lock, final Object waitObject) throws AbortedOperationException { if (clusteredLockingEnabled(lock) && (lock instanceof DsoLockID)) { this.txManager.notify(this.lockManager.notifyAll(lock, waitObject)); } else { waitObject.notifyAll(); } return NotifyImpl.NULL; }
@Override public Notify notify(final LockID lock, final Object waitObject) throws AbortedOperationException { if (clusteredLockingEnabled(lock) && (lock instanceof DsoLockID)) { this.txManager.notify(this.lockManager.notify(lock, waitObject)); } else { waitObject.notify(); } return NotifyImpl.NULL; }
@Override public void lockInterruptibly(final LockID lock, final LockLevel level) throws InterruptedException, AbortedOperationException { if (clusteredLockingEnabled(lock)) { this.lockManager.lockInterruptibly(lock, level); this.txManager.begin(lock, level, false); } }
@Override public void unlock(final LockID lock, final LockLevel level) throws AbortedOperationException { if (clusteredLockingEnabled(lock)) { // LockManager Unlock callback will be called on commit of current transaction by txnManager. this.txManager.commit(lock, level, false, getUnlockCallback(lock, level)); } }
@Override public boolean tryLock(final LockID lock, final LockLevel level) throws AbortedOperationException { if (clusteredLockingEnabled(lock)) { if (this.lockManager.tryLock(lock, level)) { this.txManager.begin(lock, level, false); return true; } else { return false; } } else { return true; } }
@Override public void lock(final LockID lock, final LockLevel level) throws AbortedOperationException { if (clusteredLockingEnabled(lock)) { this.lockManager.lock(lock, level); this.txManager.begin(lock, level, false); } }
@Override public void lock(final LockID lock, final LockLevel level) throws AbortedOperationException { if (clusteredLockingEnabled(lock)) { this.lockManager.lock(lock, level); this.txManager.begin(lock, level, false); } }
@Override public void unlock(final LockID lock, final LockLevel level) throws AbortedOperationException { if (clusteredLockingEnabled(lock)) { // LockManager Unlock callback will be called on commit of current transaction by txnManager. this.txManager.commit(lock, level, false, getUnlockCallback(lock, level)); } }
@Override public void lockInterruptibly(final LockID lock, final LockLevel level) throws InterruptedException, AbortedOperationException { if (clusteredLockingEnabled(lock)) { this.lockManager.lockInterruptibly(lock, level); this.txManager.begin(lock, level, false); } }
@Override public boolean tryLock(final LockID lock, final LockLevel level) throws AbortedOperationException { if (clusteredLockingEnabled(lock)) { if (this.lockManager.tryLock(lock, level)) { this.txManager.begin(lock, level, false); return true; } else { return false; } } else { return true; } }
@Override public boolean tryLock(final LockID lock, final LockLevel level, final long timeout) throws InterruptedException, AbortedOperationException { if (clusteredLockingEnabled(lock)) { if (this.lockManager.tryLock(lock, level, timeout)) { this.txManager.begin(lock, level, false); return true; } else { return false; } } else { return true; } }
@Override public boolean tryLock(final LockID lock, final LockLevel level, final long timeout) throws InterruptedException, AbortedOperationException { if (clusteredLockingEnabled(lock)) { if (this.lockManager.tryLock(lock, level, timeout)) { this.txManager.begin(lock, level, false); return true; } else { return false; } } else { return true; } }
@Override public void wait(final LockID lock, final Object waitObject, final long timeout) throws InterruptedException, AbortedOperationException { if (clusteredLockingEnabled(lock) && (lock instanceof DsoLockID)) { if (isCurrentTransactionAtomic()) { throw new UnsupportedOperationException( "Wait is not supported under an atomic transaction"); } try { this.txManager.commit(lock, LockLevel.WRITE, false, null); } catch (final UnlockedSharedObjectException e) { throw new IllegalMonitorStateException(); } try { this.lockManager.wait(lock, waitObject, timeout); } finally { // XXX this is questionable this.txManager.begin(lock, LockLevel.WRITE, false); } } else { waitObject.wait(timeout); } }
@Override public void wait(final LockID lock, final Object waitObject) throws InterruptedException, AbortedOperationException { if (clusteredLockingEnabled(lock) && (lock instanceof DsoLockID)) { if (isCurrentTransactionAtomic()) { throw new UnsupportedOperationException( "Wait is not supported under an atomic transaction"); } try { this.txManager.commit(lock, LockLevel.WRITE, false, null); } catch (final UnlockedSharedObjectException e) { throw new IllegalMonitorStateException(); } try { this.lockManager.wait(lock, waitObject); } finally { // XXX this is questionable this.txManager.begin(lock, LockLevel.WRITE, false); } } else { waitObject.wait(); } }
@Override public void wait(final LockID lock, final Object waitObject) throws InterruptedException, AbortedOperationException { if (clusteredLockingEnabled(lock) && (lock instanceof DsoLockID)) { if (isCurrentTransactionAtomic()) { throw new UnsupportedOperationException( "Wait is not supported under an atomic transaction"); } try { this.txManager.commit(lock, LockLevel.WRITE, false, null); } catch (final UnlockedSharedObjectException e) { throw new IllegalMonitorStateException(); } try { this.lockManager.wait(lock, waitObject); } finally { // XXX this is questionable this.txManager.begin(lock, LockLevel.WRITE, false); } } else { waitObject.wait(); } }
@Override public void wait(final LockID lock, final Object waitObject, final long timeout) throws InterruptedException, AbortedOperationException { if (clusteredLockingEnabled(lock) && (lock instanceof DsoLockID)) { if (isCurrentTransactionAtomic()) { throw new UnsupportedOperationException( "Wait is not supported under an atomic transaction"); } try { this.txManager.commit(lock, LockLevel.WRITE, false, null); } catch (final UnlockedSharedObjectException e) { throw new IllegalMonitorStateException(); } try { this.lockManager.wait(lock, waitObject, timeout); } finally { // XXX this is questionable this.txManager.begin(lock, LockLevel.WRITE, false); } } else { waitObject.wait(timeout); } }