com.atlassian.confluence.concurrent
Class LockAdapter

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

public final class LockAdapter
extends Object
implements 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.
 Condition newCondition()
          Not supported by this implementation.
 boolean tryLock()
           
 boolean tryLock(long time, 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 Lock

lockInterruptibly

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

Specified by:
lockInterruptibly in interface Lock

tryLock

public boolean tryLock()
Specified by:
tryLock in interface Lock

tryLock

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

Specified by:
tryLock in interface Lock

unlock

public void unlock()
Specified by:
unlock in interface Lock

newCondition

public Condition newCondition()
                       throws UnsupportedOperationException
Not supported by this implementation.

Specified by:
newCondition in interface Lock
Throws:
UnsupportedOperationException - always


Copyright © 2003-2012 Atlassian. All Rights Reserved.