Toggle navigation
Home
java.util.concurrent.locks.Lock to org.apache.ignite.CacheLock
No. of Instances - 4
No. of Commits - 1
No. of Projects - {'ignite'}
Hierarchy/Composition: R_SUPER_T
Primitive Info: -
NameSpace: Jdk -> Internal
Mapping:
Cascading Type Change (Similar)
Lock
to
CacheLock
Update Anonymous class
{ @Override public void lock(){ try { delegate.lockAll(keys,0); } catch ( GridInterruptedException ignored) { } catch ( IgniteCheckedException e) { throw new CacheException(e.getMessage(),e); } } @Override public void lockInterruptibly() throws InterruptedException { if (Thread.interrupted()) throw new InterruptedException(); try { delegate.lockAll(keys,0); } catch ( GridInterruptedException e) { if (e.getCause() instanceof InterruptedException) throw (InterruptedException)e.getCause(); throw new InterruptedException(); } catch ( IgniteCheckedException e) { throw new CacheException(e.getMessage(),e); } } @Override public boolean tryLock(){ try { return delegate.lockAll(keys,-1); } catch ( IgniteCheckedException e) { throw new CacheException(e.getMessage(),e); } } @Override public boolean tryLock( long time, TimeUnit unit) throws InterruptedException { try { return delegate.lockAll(keys,unit.toMillis(time)); } catch ( GridInterruptedException e) { if (e.getCause() instanceof InterruptedException) throw (InterruptedException)e.getCause(); throw new InterruptedException(); } catch ( IgniteCheckedException e) { throw new CacheException(e.getMessage(),e); } } @Override public void unlock(){ try { delegate.unlockAll(keys); } catch ( IgniteCheckedException e) { throw new CacheException(e.getMessage(),e); } } @NotNull @Override public Condition newCondition(){ throw new UnsupportedOperationException(); } }
to
{ @Override public boolean isLocked(){ for ( K key : keys) { if (!delegate.isLocked(key)) return false; } return true; } @Override public boolean isLockedByThread(){ for ( K key : keys) { if (!delegate.isLockedByThread(key)) return false; } return true; } @Override public IgniteFuture<Boolean> lockAsync(){ return delegate.lockAllAsync(keys,0); } @Override public IgniteFuture<Boolean> lockAsync( long timeout, TimeUnit unit){ return delegate.lockAllAsync(keys,unit.toMillis(timeout)); } @Override public void lock(){ try { delegate.lockAll(keys,0); } catch ( GridInterruptedException ignored) { } catch ( IgniteCheckedException e) { throw new CacheException(e.getMessage(),e); } } @Override public void lockInterruptibly() throws InterruptedException { if (Thread.interrupted()) throw new InterruptedException(); try { delegate.lockAll(keys,0); } catch ( GridInterruptedException e) { if (e.getCause() instanceof InterruptedException) throw (InterruptedException)e.getCause(); throw new InterruptedException(); } catch ( IgniteCheckedException e) { throw new CacheException(e.getMessage(),e); } } @Override public boolean tryLock(){ try { return delegate.lockAll(keys,-1); } catch ( IgniteCheckedException e) { throw new CacheException(e.getMessage(),e); } } @Override public boolean tryLock( long time, TimeUnit unit) throws InterruptedException { try { return delegate.lockAll(keys,unit.toMillis(time)); } catch ( GridInterruptedException e) { if (e.getCause() instanceof InterruptedException) throw (InterruptedException)e.getCause(); throw new InterruptedException(); } catch ( IgniteCheckedException e) { throw new CacheException(e.getMessage(),e); } } @Override public void unlock(){ try { delegate.unlockAll(keys); } catch ( IgniteCheckedException e) { throw new CacheException(e.getMessage(),e); } } @NotNull @Override public Condition newCondition(){ throw new UnsupportedOperationException(); } }