Class ExclusiveLockManager
java.lang.Object
org.eclipse.rdf4j.common.concurrent.locks.ExclusiveLockManager
A lock manager for exclusive locks.
- Author:
- Arjohn Kampman, James Leigh
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an ExclusiveLockManager.ExclusiveLockManager(boolean trackLocks)
Creates an ExclusiveLockManager. -
Method Summary
Modifier and TypeMethodDescriptionGets the exclusive lock.Gets the exclusive lock, if available.
-
Constructor Details
-
ExclusiveLockManager
public ExclusiveLockManager()Creates an ExclusiveLockManager. -
ExclusiveLockManager
public ExclusiveLockManager(boolean trackLocks)Creates an ExclusiveLockManager.- Parameters:
trackLocks
- If create stack traces should be logged
-
-
Method Details
-
tryExclusiveLock
Gets the exclusive lock, if available. This method will return null if the exclusive lock is not immediately available. -
getExclusiveLock
Gets the exclusive lock. This method blocks when the exclusive lock is currently in use until it is released.- Throws:
InterruptedException
-