|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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(java.lang.Object client)
Obtain the lock on the mutex. |
void |
unlockMutex(java.lang.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(java.lang.Object client)
client - The object that wants to "own" the mutex. Typically is the calling object.
java.lang.IllegalStateException - if the mutex is currently held by the same or another object.public void unlockMutex(java.lang.Object client)
client - the object that currently "owns" the mutex. Must be the same object that was previously passed to lockMutex(Object)
java.lang.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 | |||||||||