Package pgp.cert_d

Interface PGPCertificateDirectory.LockingMechanism

    • Method Detail

      • lockDirectory

        void lockDirectory()
                    throws java.io.IOException,
                           java.lang.InterruptedException
        Lock the store for writes. Readers can continue to use the store and will always see consistent certs.
        Throws:
        java.io.IOException - in case of an IO error
        java.lang.InterruptedException - if the thread gets interrupted
      • tryLockDirectory

        boolean tryLockDirectory()
                          throws java.io.IOException
        Try top lock the store for writes. Return false without locking the store in case the store was already locked.
        Returns:
        true if locking succeeded, false otherwise
        Throws:
        java.io.IOException - in case of an IO error
      • isLocked

        boolean isLocked()
        Return true if the lock is in locked state.
        Returns:
        true if locked
      • releaseDirectory

        void releaseDirectory()
                       throws java.io.IOException
        Release the directory write-lock acquired via lockDirectory().
        Throws:
        java.io.IOException - in case of an IO error