public class DefaultFileNLock extends AbstractNLock
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultFileNLock.LockInfo |
protected class |
DefaultFileNLock.PollTime |
| Constructor and Description |
|---|
DefaultFileNLock(Path path,
Object lockedObject) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkFree() |
TimePeriod |
getDefaultTimePeriod() |
boolean |
isFree() |
boolean |
isHeldByCurrentThread() |
boolean |
isLocked() |
void |
lock() |
void |
lockInterruptibly() |
Condition |
newCondition() |
protected void |
relock() |
protected void |
reunlock() |
boolean |
tryLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
boolean |
tryLock(TimePeriod p) |
boolean |
tryLockImmediately() |
boolean |
tryLockImmediatelyInterruptibly() |
boolean |
tryLockInterruptibly(long time,
TimeUnit unit) |
void |
unlock() |
callWith, callWith, callWithImmediately, runWith, runWith, runWithImmediatelyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitof, ofId, ofIdPath, ofIdPath, ofPath, ofPathCompanion, ofResourcepublic TimePeriod getDefaultTimePeriod()
public boolean isLocked()
public boolean isHeldByCurrentThread()
public void lockInterruptibly()
throws InterruptedException
InterruptedExceptionpublic void lock()
public void checkFree()
public boolean isFree()
public void unlock()
public boolean tryLock()
public boolean tryLock(TimePeriod p)
public boolean tryLock(long time,
TimeUnit unit)
public boolean tryLockInterruptibly(long time,
TimeUnit unit)
throws InterruptedException
InterruptedExceptionpublic boolean tryLockImmediatelyInterruptibly()
throws InterruptedException
InterruptedExceptionpublic boolean tryLockImmediately()
public Condition newCondition()
protected void reunlock()
reunlock in class AbstractNLockprotected void relock()
relock in class AbstractNLockCopyright © 2025 vpc open source initiative. All rights reserved.