com.atlassian.confluence.concurrent
Class LockOperation

java.lang.Object
  extended by com.atlassian.confluence.concurrent.LockOperation
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
LockOperationWithoutResult

public abstract class LockOperation
extends java.lang.Object
implements java.lang.Runnable

Perform a unit of work while managing the lock lifecycle automatically.

  1. Lock is acquired
  2. withLock called
  3. Lock is released

See Also:
Lock

Constructor Summary
protected LockOperation(Lock lock)
           
 
Method Summary
 java.lang.Object doOperation()
           
 void run()
           
protected abstract  java.lang.Object withLock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockOperation

protected LockOperation(Lock lock)
Method Detail

doOperation

public java.lang.Object doOperation()

run

public final void run()
Specified by:
run in interface java.lang.Runnable

withLock

protected abstract java.lang.Object withLock()


Copyright © 2003-2014 Atlassian. All Rights Reserved.