Class ImportMutex
- java.lang.Object
-
- com.atlassian.confluence.importexport.ImportMutex
-
@Deprecated public class ImportMutex extends Object
Deprecated.since 7.17.0.A very simple locking mutex that is designed to prevent two import tasks from running at the same time.- Since:
- 5.6
-
-
Field Summary
Fields Modifier and Type Field Description static ImportMutex
INSTANCE
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
isLocked()
Deprecated.Queries the current state of the mutexvoid
lockMutex(Object client)
Deprecated.Obtain the lock on the mutex.void
unlockMutex(Object client)
Deprecated.Releases the lock
-
-
-
Field Detail
-
INSTANCE
public static final ImportMutex INSTANCE
Deprecated.
-
-
Method Detail
-
lockMutex
public void lockMutex(Object client)
Deprecated.Obtain the lock on the mutex.- Parameters:
client
- The object that wants to "own" the mutex. Typically is the calling object.- Throws:
IllegalStateException
- if the mutex is currently held by the same or another object.
-
unlockMutex
public void unlockMutex(Object client)
Deprecated.Releases the lock- Parameters:
client
- the object that currently "owns" the mutex. Must be the same object that was previously passed tolockMutex(Object)
- Throws:
IllegalStateException
- if the mutex is not currently held by the given object.
-
isLocked
public boolean isLocked()
Deprecated.Queries the current state of the mutex- Returns:
- true if the mutex is currently held, false otherwise.
-
-