Module org.apache.lucene.core
Package org.apache.lucene.store
Class SimpleFSLockFactory.SimpleFSLock
java.lang.Object
org.apache.lucene.store.Lock
org.apache.lucene.store.SimpleFSLockFactory.SimpleFSLock
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
SimpleFSLockFactory
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
path
-
creationTime
-
closed
private volatile boolean closed
-
-
Constructor Details
-
SimpleFSLock
SimpleFSLock(Path path, FileTime creationTime) throws IOException - Throws:
IOException
-
-
Method Details
-
ensureValid
Description copied from class:LockBest effort check that this lock is still valid. Locks could become invalidated externally for a number of reasons, for example if a user deletes the lock file manually or when a network filesystem is in use.- Specified by:
ensureValidin classLock- Throws:
IOException- if the lock is no longer valid.
-
close
Description copied from class:LockReleases exclusive access.Note that exceptions thrown from close may require human intervention, as it may mean the lock was no longer valid, or that fs permissions prevent removal of the lock file, or other reasons.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classLock- Throws:
IOException
-
toString
-