org.eclipse.rdf4j.sail

## Interface LockManager

- All Known Implementing Classes:
    DirectoryLockManager

      public interface LockManager

  Author:
    james

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getLocation()` Technical description of where the lock is located, such as a URL.
    `boolean` | `isLocked()` Determines if the SAIL is locked.
    `Lock` | `lockOrFail()` Creates a lock in a SAIL if it does not yet exist.
    `boolean` | `revokeLock()` Revokes a lock owned by another process.
    `Lock` | `tryLock()` Creates a lock in a SAIL if it does not yet exist.

- - ### Method Detail

    - #### getLocation

          String getLocation()

      Technical description of where the lock is located, such as a URL.

    - #### isLocked

          boolean isLocked()

      Determines if the SAIL is locked.
      Returns:
        `true` if the SAIL is already locked.

    - #### tryLock

          Lock tryLock()

      Creates a lock in a SAIL if it does not yet exist.
      Returns:
        a newly acquired lock or null if the SAIL is already locked.

    - #### lockOrFail

          Lock lockOrFail()
                   throws SailLockedException

      Creates a lock in a SAIL if it does not yet exist.
      Returns:
        a newly acquired lock.
      Throws:
        `SailLockedException` - if the directory is already locked.

    - #### revokeLock

          boolean revokeLock()

      Revokes a lock owned by another process.
      Returns:
        `true` if a lock was successfully revoked.

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