Interface LockingManager

  • All Known Implementing Classes:
    DirectoryLockingManager, InProcessLockingManager

    public interface LockingManager
    This class describes a featureID based locking service.

    ContentFeatureSource, and others, may use this API to request locks on the basis of FeatureID.

    This class is also used as a public api to manage locks.

    Author:
    Jody Garnett, Refractions Research
    • Method Detail

      • exists

        boolean exists​(String authID)
        Check if any locks exist held by the authorization lockID.

        (remember that the lock may have expired)

        Parameters:
        authID - Authorization for lock
        Returns:
        true if lock was found
      • release

        boolean release​(String authID,
                        Transaction transaction)
                 throws IOException
        Release locks held by the authorization lockID.

        (remember that the lock may have expired)

        Parameters:
        authID - Authorization for lock
        transaction - Transaction with authorization for lockID
        Returns:
        true if lock was found and released
        Throws:
        IOException
      • refresh

        boolean refresh​(String authID,
                        Transaction transaction)
                 throws IOException
        Refresh locks held by the authorization lockID.

        All features locked with the provied lockID will be locked for additional time (the origional duration requested).

        (remember that the lock may have expired)

        Parameters:
        authID - Authorization for lock
        transaction - Transaction with authorization for lockID
        Returns:
        true if lock was found and refreshed
        Throws:
        IOException