private class VerifyingLockFactory.CheckedLock extends Lock
Constructor and Description |
---|
CheckedLock(Lock lock) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases exclusive access.
|
void |
ensureValid()
Best effort check that this lock is still valid.
|
private void |
verify(byte message) |
private final Lock lock
public CheckedLock(Lock lock) throws java.io.IOException
java.io.IOException
public void ensureValid() throws java.io.IOException
Lock
ensureValid
in class Lock
java.io.IOException
- if the lock is no longer valid.public void close() throws java.io.IOException
Lock
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.
private void verify(byte message) throws java.io.IOException
java.io.IOException