|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.importexport.ImportMutex
public class ImportMutex
A very simple locking mutex that is designed to prevent two import tasks from running at the same time.
Field Summary | |
---|---|
static ImportMutex |
INSTANCE
|
Method Summary | |
---|---|
boolean |
isLocked()
Queries the current state of the mutex |
void |
lockMutex(Object client)
Obtain the lock on the mutex. |
void |
unlockMutex(Object client)
Releases the lock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ImportMutex INSTANCE
Method Detail |
---|
public void lockMutex(Object client)
client
- The object that wants to "own" the mutex. Typically is the calling object.
IllegalStateException
- if the mutex is currently held by the same or another object.public void unlockMutex(Object client)
client
- the object that currently "owns" the mutex. Must be the same object that was previously passed to lockMutex(Object)
IllegalStateException
- if the mutex is not currently held by the given object.public boolean isLocked()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |