com.atlassian.confluence.concurrent
Class LockAdapter

java.lang.Object
  extended by com.atlassian.confluence.concurrent.LockAdapter
All Implemented Interfaces:
java.util.concurrent.locks.Lock

public final class LockAdapter
extends java.lang.Object
implements java.util.concurrent.locks.Lock

Converts a Confluence Lock to a {java.util.concurrent.locks.Lock} so it can be used in other contexts.


Constructor Summary
LockAdapter(Lock delegate)
           
 
Method Summary
 void lock()
           
 void lockInterruptibly()
          This implementation does not support interruption, so InterruptedException is never thrown.
 java.util.concurrent.locks.Condition newCondition()
          Not supported by this implementation.
 boolean tryLock()
           
 boolean tryLock(long time, java.util.concurrent.TimeUnit unit)
          This implementation does not support timeouts, so InterruptedException is never thrown.
 void unlock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockAdapter

public LockAdapter(Lock delegate)
Method Detail

lock

public void lock()
Specified by:
lock in interface java.util.concurrent.locks.Lock

lockInterruptibly

public void lockInterruptibly()
This implementation does not support interruption, so InterruptedException is never thrown.

Specified by:
lockInterruptibly in interface java.util.concurrent.locks.Lock

tryLock

public boolean tryLock()
Specified by:
tryLock in interface java.util.concurrent.locks.Lock

tryLock

public boolean tryLock(long time,
                       java.util.concurrent.TimeUnit unit)
This implementation does not support timeouts, so InterruptedException is never thrown.

Specified by:
tryLock in interface java.util.concurrent.locks.Lock

unlock

public void unlock()
Specified by:
unlock in interface java.util.concurrent.locks.Lock

newCondition

public java.util.concurrent.locks.Condition newCondition()
                                                  throws java.lang.UnsupportedOperationException
Not supported by this implementation.

Specified by:
newCondition in interface java.util.concurrent.locks.Lock
Throws:
java.lang.UnsupportedOperationException - always


Copyright © 2003-2014 Atlassian. All Rights Reserved.