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:
java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- SimpleFSLockFactory
static final class SimpleFSLockFactory.SimpleFSLock extends Lock
-
-
Field Summary
Fields Modifier and Type Field Description private booleanclosedprivate java.nio.file.attribute.FileTimecreationTimeprivate java.nio.file.Pathpath
-
Constructor Summary
Constructors Constructor Description SimpleFSLock(java.nio.file.Path path, java.nio.file.attribute.FileTime creationTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Releases exclusive access.voidensureValid()Best effort check that this lock is still valid.java.lang.StringtoString()
-
-
-
Method Detail
-
ensureValid
public void ensureValid() throws java.io.IOExceptionDescription 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:
java.io.IOException- if the lock is no longer valid.
-
close
public void close() throws java.io.IOExceptionDescription 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.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-