public class ImportMutex extends Object
Modifier and Type | Field and Description |
---|---|
static ImportMutex |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
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
|
public static final ImportMutex INSTANCE
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()
Copyright © 2003–2017 Atlassian. All rights reserved.