Module org.apache.lucene.core
Package org.apache.lucene.store
Class VerifyingLockFactory.CheckedLock
- java.lang.Object
-
- org.apache.lucene.store.Lock
-
- org.apache.lucene.store.VerifyingLockFactory.CheckedLock
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- VerifyingLockFactory
private class VerifyingLockFactory.CheckedLock extends Lock
-
-
Constructor Summary
Constructors Constructor Description CheckedLock(Lock lock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Releases exclusive access.void
ensureValid()
Best effort check that this lock is still valid.private void
verify(byte message)
-
-
-
Field Detail
-
lock
private final Lock lock
-
-
Constructor Detail
-
CheckedLock
public CheckedLock(Lock lock) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
ensureValid
public void ensureValid() throws java.io.IOException
Description copied from class:Lock
Best 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:
ensureValid
in classLock
- Throws:
java.io.IOException
- if the lock is no longer valid.
-
close
public void close() throws java.io.IOException
Description copied from class:Lock
Releases 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.
-
verify
private void verify(byte message) throws java.io.IOException
- Throws:
java.io.IOException
-
-