Class LockFactory

    • Constructor Summary

      Constructors 
      Constructor Description
      LockFactory()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void clearLock​(java.lang.String lockName)
      Attempt to clear (forcefully unlock and remove) the specified lock.
      java.lang.String getLockPrefix()
      Get the prefix in use for all locks created in this LockFactory.
      abstract Lock makeLock​(java.lang.String lockName)
      Return a new Lock instance identified by lockName.
      void setLockPrefix​(java.lang.String lockPrefix)
      Set the prefix in use for all locks created in this LockFactory.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LockFactory

        public LockFactory()
    • Method Detail

      • setLockPrefix

        public void setLockPrefix​(java.lang.String lockPrefix)
        Set the prefix in use for all locks created in this LockFactory. This is normally called once, when a Directory gets this LockFactory instance. However, you can also call this (after this instance is assigned to a Directory) to override the prefix in use. This is helpful if you're running Lucene on machines that have different mount points for the same shared directory.
      • getLockPrefix

        public java.lang.String getLockPrefix()
        Get the prefix in use for all locks created in this LockFactory.
      • makeLock

        public abstract Lock makeLock​(java.lang.String lockName)
        Return a new Lock instance identified by lockName.
        Parameters:
        lockName - name of the lock to be created.
      • clearLock

        public abstract void clearLock​(java.lang.String lockName)
                                throws java.io.IOException
        Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you are certain this lock is no longer in use.
        Parameters:
        lockName - name of the lock to be cleared.
        Throws:
        java.io.IOException