Class BaseDirectory

    • Field Detail

      • isOpen

        protected volatile boolean isOpen
      • lockFactory

        protected final LockFactory lockFactory
        Holds the LockFactory instance (implements locking for this Directory instance).
    • Constructor Detail

      • BaseDirectory

        protected BaseDirectory​(LockFactory lockFactory)
        Sole constructor.
    • Method Detail

      • obtainLock

        public final Lock obtainLock​(java.lang.String name)
                              throws java.io.IOException
        Description copied from class: Directory
        Acquires and returns a Lock for a file with the given name.
        Specified by:
        obtainLock in class Directory
        Parameters:
        name - the name of the lock file
        Throws:
        LockObtainFailedException - (optional specific exception) if the lock could not be obtained because it is currently held elsewhere.
        java.io.IOException - if any i/o error occurs attempting to gain the lock
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Directory