org.eclipse.rdf4j.common.concurrent.locks

## Class ExclusiveLockManager

- java.lang.Object
- - org.eclipse.rdf4j.common.concurrent.locks.ExclusiveLockManager

-     public class ExclusiveLockManager
      extends Object

  A lock manager for exclusive locks.
  Author:
    Arjohn Kampman, James Leigh

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExclusiveLockManager()` Creates an ExclusiveLockManager.
    `ExclusiveLockManager(boolean trackLocks)` Creates an ExclusiveLockManager.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Lock` | `getExclusiveLock()` Gets the exclusive lock.
    `Lock` | `tryExclusiveLock()` Gets the exclusive lock, if available.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ExclusiveLockManager

          public ExclusiveLockManager()

      Creates an ExclusiveLockManager.

    - #### ExclusiveLockManager

          public ExclusiveLockManager(boolean trackLocks)

      Creates an ExclusiveLockManager.
      Parameters:
        `trackLocks` - If create stack traces should be logged

  - ### Method Detail

    - #### tryExclusiveLock

          public Lock tryExclusiveLock()

      Gets the exclusive lock, if available. This method will return `null` if the exclusive lock is not immediately available.

    - #### getExclusiveLock

          public Lock getExclusiveLock()
                                throws InterruptedException

      Gets the exclusive lock. This method blocks when the exclusive lock is currently in use until it is released.
      Throws:
        `InterruptedException`

Copyright © 2015-2021 Eclipse Foundation. All Rights Reserved.